A bit about Azure Data Factory: A SQL Script for creating Structure from SQL Tables

by Julie Smith

I have been working with Microsoft’s shiny new Azure Data Integration tool, Azure Data Factory. ADF was made generally available on August 12th
ADF is available on the Azure portal, and you can use it to create pipelines to move data to and from other cloud based data stores and on premise data stores using Data Management Gateways.
There is a lot of documentation and info about ADF online. If you are brand new to it, I’d recommend starting here with the learning path from Microsoft. ADF has been in preview since 2014, and one caution I’d give you is that the domain specific JSON used by ADF went through a major rewrite mid July. So if you find a post previous to that, understand that any of the JSON in it will be old and need to be translated. In my experience, the JSON editor on the portal attempts to translate it for you. There is also a GitHub site  with a translator
Reza Rad is sharing a lot of great content as well on his blog.
This post is going to be a “skip to the chase,” targeted post with a script to help you speed up your JSON descriptions of SQL tables. As I mentioned, ADF is ALL JSON –ALL THE TIME. Continue reading

Using Biml with SQL Server 2000; There IS a Way.

by Audrey and Julie

Summary: The BimlScript methods of Business Intelligence Markup Language (Biml) will only work (ie access SQL metadata) with SQL Server versions 2005 and higher. This article briefly tells the story of how Innovative Architects worked around this limitation for one of our projects and successfully tricked Biml by creating system views in SQL Server 2000. They ddl script for the views is found in a link at the end of the post.

————————————- Continue reading

Power Query Functions–Some Scenarios

By Julie Smith

I was happy to co-present a session at this week’s Atlanta BI User Group with Rob Volk (@SQL_R) meeting entitled “Harvesting XML Data from the Web with Power Query and Curl.” The demo gods were not with me on my grand finale demo that night however. I had spent the demo building a Power Query Function and when I tried to invoke it against a list of values, I got a failure which I couldn’t resolve that night. Of course, as soon as I opened the spreadsheet the next day I immediately saw the problem, which I will share here, as I think it is probably going to be something people encounter frequently as they start to work with Power Query.

What the Function Did:

Here’s the setup: www.SQLSaturday.com contains a page for every SQL Saturday, and if it’s available, the schedule for the event. Atlanta’s last event was this month and was SQL Saturday #285-hence, its schedule is located at  http://sqlsaturday.com/285/schedule.aspx. Any other SQL Saturday event number works in the same manner. If I want to use Power Query to view this data as a page, I would enter that url as the source in Power Query:

After choosing Table 1 from the choices on the Navigator pane: Continue reading

Another NULL Handling SSIS Expression

by Julie Smith

So two days ago I posted this. It’s a way to generate an SSIS Expression for use in an Incremental Load’s Conditional Split. A friend had pointed out that this pattern was not the best– as NULL handling is not always as easy as replacing the NULL with what you might consider a safe value. I also got a very thoughtful comment on the post from a lovely gentlemen expressing the same concern. So obsessed, I went back to tinkering.  I came up with ANOTHER expression (and consequently another T-SQL generator for it). I like this one a little better as it seems to me that it performs what is asked without introducing risk of replacing NULL values. So folks please read this, use it, bash it up and let me know what you think.

Here’s the new (to me, sure someone had already figured this out) NULL Handling expression for DELTA rows, using the column Color as an example:

This does NOT break the Conditional Split if there are NULLS. There can be NULLS in either the source or the destination or both and it does not break the pipeline. I love that.

How to read it from the left:

The whole expression will evaluate as TRUE and the row split into the Delta path when either the yellow portion or the Green and blue portion together evaluate to True.

The yellow highlighted expression asks: is either side NULL while the other is not? If yes, then evaluate to TRUE.

The Green highlighted section: Are both sides NOT NULL ? If yes, Then Blue highlighted section asks: are they unequal? If yes,  then evaluate to True.

If both sides are non null, yet equal, or if both sides are NULL, then the condition is not met and the row is ignored. Just like we want it to be.

Now the SQL to generate the whole expression can be datatype agnostic. I love that too. Here is the SQL to generate the whole concatenated shebang for all of your columns:

Click on the SQL below to get a copy/past version 🙂

Click on this to get copy/paste version.

Continue reading

Using SQL Metadata to Create NULL Handling SSIS Expressions

By Julie Smith

Happy 2014! Happy to report that Audrey and I were both renewed as SQL Server MVPs today!  To celebrate I’m publishing a really long blog post.

This is a MONSTER long post. The main point of this post was to give you guys some T-SQL code which can be used against the information schema view of a SQL Server table destination to spit out a complex SSIS Expression. While that was the point of the post, I felt like I also needed to provide context of what I was trying to do or what you might be doing when the need for such SQL would arise. 

also, I had Audrey read it over and she scolded me for a sad lack of chuckles. So I’m adding in some random Chuckle-y interludes. Enjoy them. Or skip them completely. Chuckle interludes are indicated by the face Chuck Norris doesn't sleep. He waits. of Chuck Norris for easy recognition.

One of the most common scenarios encountered while ETL’in is an Incremental Load –that is determining if a source row already exists in the target database (often your warehouse), and if it does, has it changed since the last time it was loaded? The pseudo code goes like this: Continue reading

Power Query –Where did my query script icon go?!?

by Julie

 

I hadn’t played with Data Explorer Power Query since it became Power Query last week with the announcement of Power BI for Office 365. Since I am presenting on it at the Microsoft Integration Architects group this week, I opened it up to prep the demos. By the way, Power Query is very cool. It’s an Excel Add-in that allows an information worker to perform self service BI. With Power Pivot and Power View, it completes a self service BI trifecta of ETL, compressed storage and presentation. Now that Power BI is available as a cloud service, this not only gives users a complete stack of BI tools, but allows those tools to be more easily accessed via mobile devices.

Since Power Query is designed to be a self service tool, it focuses on ETL by way of drag and drop/gui tools. However, one of my favorite features of Power Query was that you can access and copy the underlying code (which is a language called “M” by the way), make a few slight changes to it and reuse. For instance if I needed data from several tables on the internet on different urls, but they all have the same structure, I could labor through the first page with the gui, then copy that code, paste it into notepad, change the url address of the source only and paste the new code into a new Power Query. and BAM! It’ done.

This was all accomplished via the query script icon, a cute little fella that looks like a scrolled piece of paper.

powerquery

All of the steps on the right hand column above represent pieces of work done via the gui to get the data in this format. By clicking on the query script icon, I get this:

powerqueryM

which I can modify and paste into new queries.

But back to my story of a
change between Data Explorer and Power Query. In Data Explorer, the query script icon was always there. I spent a good ten minutes one night this week in a cold panic, wondering if I had forgotten how to “work” Power Query, because I couldn’t find it after upgrading. It appears that now you have to expressly enable this feature by going to Options under Machine Settings and clicking “Enable Advanced Query Editing.” See my steps 1,2, and 3 below.

enablingScrollyThingie

So there you have it people. Happy Advanced Querying.

Shameless plugs:

Going to be in the Indianapolis area August 9th? Interested in learning the basics of how to create and load a data warehouse? Join Audrey and me for “From Here to BI: Data Warehousing with SQL Server MVPs Audrey Hammonds and Julie Smith.” We’ll also be presenting for SQL Saturday #242 main event on August 10th. Look forward to seeing you there.

Also don’t miss Audrey’s session for 24 Hours of PASS– Design Matters! The Performance Impact of Database Design

Excited to be participating in the Global Windows Azure Bootcamp Next Saturday April 27th, 2013

from Julie Smith

Saturday I was at Innovative Architects with several of my colleagues prepping labs for an exciting event being held April 27th. It’s the Global Windows Azure Bootcamp and it’s a very cool idea and thing that Microsoft is doing.  There will be sessions all over the world (see below map) where Microsoft will be hosting free training on Azure.  While we are all training, we will also each deploy a processor to a Global Render Farm. Here is a cute video explaining what a render farm is:  http://www.youtube.com/watch?v=4VUWrZRCtI8 (this video is a plug for renderfarm.fi , which is a volunteer/free service, NOT affiliated with Microsoft, I just thought it offered a cute and good explanation of what a render farm is.)  Here (link) is another video showing creator Alan Smith explaining the render farm he created for Azure.

The session in Atlanta will be hosted by two of my colleagues from Innovative Architects, Vaishali Shah and Rob Bramhill.  They have devoted weeks of time to prepping the day and their hard work was very evident yesterday as we were doing final preparations.

Apparently penguins are participating from Antarctica.
Apparently penguins are participating from Antarctica.

I look forward to working more with Azure, specifically creating HDInsight clusters to apply the same type of scalability to data as this Render Farm experiment applies to processing animations.

Importing Values into DQS Domains from Excel, and Gratitude

by Julie Smith

I’m back from the MVP Summit and processing a staggering number of thoughts. Not only am I processing the brain dump of NDA technical goodness of exciting new stuff coming to the product, but a number of personal reflections. How lucky I am to have been somehow deemed worthy of this honor. How fortunate the SQL MVPs are in the number of sessions, pampering and genuine respect we receive from the SQL Server Product team. How lucky I am to be a part of one of the closest technical communities out there. The SQL Community calls itself family because we truly have a network of close, warm friendships. It dawned on me recently that I could go practically anywhere in the world (the world!) and find a colleague I have met from being a part of the SQL Community. I am a happy lady right now (in spite of the double ear infection).

1badge

Another benefit to you, my readers from my attendance to the Summit is a new motivation to continue sharing my knowledge with the community. That said, let me be the millionth prodigal blogger to apologize for my lack of blogging. Insert every lame but true excuse here: I’ve been busy, I’ve had things come up in my personal life, all true, but I know you want to hear from me.

So from the back logs of my “things I wanted to blog about” I picked a random DQS tidbit: How to import domain values and synonyms into DQS from Excel. Get ready for a wee bit of technical content! Continue reading

Full Day of Training Offered by the DataChix! (On Pi Day, no less)

Do you want to learn about Data Warehouses? Do you want to learn about Extract, Transform, Load with SSIS?

Do you like Pi?

piday











Do you like Pie?

Learn DataWarehousing with the DataChix!

SQL Server MVPs and popular blogging team Audrey Hammonds and Julie Smith of DataChix.com offer this one day of training to benefit The Cloverleaf School of Atlanta in cooperation with The American Legion Post 251, Duluth, GA. Audrey will take you on a guided tour of converting a transactional model into Dimension and Fact tables. After the model has been created, Julie will guide you through loading those tables using SQL Server Integration Services.

To top it all off, it’s happening on March 14th folks.

That’s right. 3/14 Pi Day. Could there be a better way to celebrate the irrational number which represents the ratio of a circle’s circumference to its diameter than by using SSIS? NOPE! But maybe we’ll get some delicious Pie to celebrate as well!

Audrey and Julie bring over 25 years of warehousing experience to this fantastic day of training, but don’t say that to their faces!

audreyjulieaction2

Part I Dimensional Modeling with Audrey

Why Transactional databases are the way they are—Codd’s rules to live by

Why Codd’s rules don’t work for Reporting– Kimball’s rules to live by

Fun at the whiteboard converting a transactional model to a dimensional model.

Part II Extract Transform and Load using SSIS with Julie

A tour of SSIS

audreyjulieaction3












Control Flow Basics

Data Flow Basics

How to load Dimensions with SSIS

How to load Facts with SSIS

Why SSIS has got such a bad rap sometimes.

Frameworks

What happened and when

When things go wrong, how to know the details

Top quirks of SSIS—what, why, and how to get around them.

Data Quality! We’ll throw in a little Data Quality Services with our ETL!

Lunch and Continental Breakfast provided. Please contact the organizer at the above email for any special dietary considerations! Thanks and see you on Pi Day!

FOR TICKETS—–http://datawarehousingdatachix.eventbrite.com/#

Can’t make it to this great day of SSIS training to benefit the school, but you’d still like to support our mission? http://t.co/VX6yGftC