I’m Speaking At SQL Saturday 192 In Tampa

sqlsat192_speaking

Coming this 2nd day of March, I will be speaking at SQL Saturday #192 in Tampa, Florida! It’s going to be off the chain no doubt, as the kids say.

I’ll be presenting my session, MDXplosion! Intro To MDX. The MDX query language is a powerful tool for extracting data from your cube but can often seem confusing and overwhelming to the untrained eye. But have no fear! It’s easier than you might think. In this session, we’ll go over the basic MDX query syntax, how to navigate a hierarchy, how to create dynamic time calculations, and how to add calculations to your cube. It’s going to be a blast and I’m really looking forward to it!

If you’re in the area or can make it down, get registered for this event! It’s going to be a great time and with the opportunity for free training at this amazing quality from industry pro’s, it’d be crazy to pass on this event!

Browsing SQL Server Databases With DBA xPress

image

With the latest release of the Pragmatic Workbench, we are exposed to the Object Browser. The Object Browser is a very cool feature that is party of the DBA xPress package of tools designed with the database administrator in mind. This is the first time I’m exploring this tool, so I wanted to walk through the feature with you and give my take on it (even though I’m not a DBA, but nonetheless…).

When you first launch Object Browser, you must first point to the server where your database exists. So far so good.

image

After connecting, we’re immediately treated to a nifty tree view of our database and the objects within that database. In this case, of course, I’ve connected to the Adventure Works DW 2008 R2 database.

image

The browser is extremely responsive and very quick. Drilling down and exploring the database is slick and fast. Once you’ve connected to the database, you can browse it and search for a single object using the search function. All I had to do is type in my search term and the tree view filtered faster than Google.

image

One of the really cool features is that you can see the SQL script to create the object you’ve selected. whether it’s a table, a view, a column in a table, a procedure, or a role. Very handy! We can also hover over the objects and view the meta data for that object.

image

Another neat feature is the ability to take a snapshot of the database. Click the Take Snapshot button at the top of the Object Browser. A nice, clean XML file is the output and can be saved to the location of your choosing.

image

To learn more about DBA xPress and download the free trial, head here.

Create XML Files With SSIS

imageIf you’ve ever tried to write data to an XML file with SSIS you know there’s not a slick, easy way to do it. You could use a Script Component in a Data Flow Task, as illustrated by fellow Pragmatic Works employee, Jason Strate. But there is an easier way. In comes Task Factory with its new XML Generator Transform Data Flow component.

image

The Task Factory XML Transform component allows you to specify the XSD file, which contains the schema information for the XML data to be output. Once you’ve selected the XSD file, any column from the source data that should be included in the XML document needs to be mapped to a matching field from the XSD file.

image

Next, you need to specify the relationship between the parent and child elements. Then map the field to establish the relationship.

Send the data to a Flat File Destination pointed at an XML file and you’re in business. Download the free trial of Task Factory to check out the XML Generator Transform and the 36 other tasks and transforms.

Import Native SSIS Performance Data With BI xPress

imageOne of the most powerful features of BI xPress is the Auditing Framework, which allows you to apply a standardized and robust auditing framework to multiple packages in just a few clicks. I’ve blogged about the BI xPress Auditing Framework before because its an extremely impressive tool that has saved me and the teams I’ve worked with countless hours. But now that SQL Server 2012 has been released, we have a whole slew of execution and performance data available to us natively within the 2012 SSIS Catalog. Wouldn’t it be great if we could view the native execution and performance data within the BI xPress Monitoring Console even if the BI xPress Auditing Framework has not been applied?

Your prayers have been answered. If you’re running SSIS 2012, you can now easily import the native execution and performance data into the BI xPress database for even more in depth reporting on the execution of your SSIS packages. Of course, this feature only works if you’re running 2012 :).

To import the SSIS Catalog data into the BI xPress database, click the SSIS Catalog Import button located on the Pragmatic Workbench home screen.

image

Next specify the location of the BI xPress database that is your target for the import. Then add the SSIS Catalog as the source for the import.

image

imageAnd the really nice part is that you can turn on Auto Importing so that the native performance and execution data will be automatically imported into the BI xPress database!

Now that the data has been imported into the BI xPress database, any native SSIS 2012 package stored in the SSIS Catalog can now monitored and measured in the BI xPress Monitoring Console. Head over to PragmaticWorks.com for more information and a trial download.

Gotchas With Referenced Dimensions

image

A referenced dimension relationship allows us to create a relationship between a measure group and a dimension that is indirectly related to the measure group using an intermediate dimension. This is great, because we can now create relationships between our facts and dimensions that may not be directly related. Unfortunately, there are a couple of gotchas that you may not be aware of, which I read about here and here. I’m just offering my take on these issues, so thanks to Alberto and Jesse for the great content.

You can see several examples of referenced relationship types in the Adventure Works cube. One of those examples is the relationship between the Sales Target measure group and the Sales Territory dimension.

image

If you’ve ever created a referenced dimension relationship, you know that the Materialize option is checked by default. So one might assume this is the best option to go with.

To Materialize?
image

But before we can decide if the option to materialize the relationship is best, we must first understand what the materialize option really does. When we check the materialize option, the link between the referenced dimension and the facts is materialized. During processing of the measure group, a join is made to the dimension to look up the referenced dimension’s key value. This leads to slower cube processing but better cube query performance.

There is, however, an important thing to realize: The materialized relationship link between the facts and the correct attribute members is created during the processing of the partition, not the dimension! Why is this important? Imagine we need to update the relationships between the facts and the referenced dimension. We can no longer simply process the dimension. The link to the older referenced dimension attribute member still exists in the partition! The partition must be processed! This could be a huge issue if your cube is very large and you’re only planning to process the most recent partition. If the relationships changed in the referenced dimension, you could find yourself forced to process more than just the most recent partition in order to ensure the relationships between the facts and the referenced dimension are correct.

To Not Materialize?
image

So what’s the other option? We could leave the option to materialize the relationship unchecked. The downside to this is that query performance will suffer since the member will need to be looked up on the fly. The upside is that processing will be faster and we no longer need to process the partition to update the relationship since its looked up at query time.

But there is also a gotcha with using un-materialized referenced dimension relationships. Aggregations can not be created for a referenced dimension when the relationship is not materialized. If you run the Aggregation wizard, you’ll notice that any referenced dimensions with un-materialized relationships will be left out. This is by design. An aggregation should not be created (which is possible to do manually) for an un-materialized referenced dimension relationship because the relationship is resolved at query time.

What About the TSQL Query?

But what happens with the TSQL query during processing of the measure group? Here’s an example in the Adventure Works cube that we can look at:

image

This referenced relationship between the Reseller Sales measure group is materialized. When the Reseller Sales measure group is processed, a join is made to the intermediate dimension, to look up the Geography Key, which you can see here:

image

This join allows SSAS to add the referenced key to the measure group providing better MDX query performance for the users. But if we’re dealing with a significant amount of data in the fact table and a large intermediate dimension, the processing performance impact could be very significant.

But what if I de-materialize the relationship? The good news is that the TSQL query used to load the measure group will perform better because we’re no longer making a join to the intermediate dimension:

image

The bad news is that during executions of MDX queries, SSAS will need to look up the key value for the referenced dimension leading to slower MDX query performance.

The Conclusion

My personal recommendation would be to add the referenced key to the fact table so that way you can eliminate the dilemma altogether. I’ve personally seen referenced relationships in a multi TB cube destroy processing performance. The resolution for this particular client’s issue was to add the referenced key to the fact tables and create the regular relationships between the measure groups and the referenced dimensions. After implementing the fix, processing for the partitions was very fast.

If for some reason you can’t add the referenced key to the fact table and you must decide between materializing the relationship or not, of course the answer is “It depends”. If your cube is extremely large featuring an incremental processing strategy, I would recommend to not materialize the relationship. This will prevent you from having to process the entire cube should something in the referenced dimension change. You’ll just have to live with the somewhat slower MDX query performance.

If, however, your cube is relatively small or your data warehouse is completely reloaded each night, I would probably recommend materializing the relationships. The increased time to process won’t be that big of a deal since the cube is small and your query times will benefit because of the materialized relationship. You’ll also be able to create aggregations since the relationship is materialized. Of course, the “it depends” applies differently to every situation.

Feedback?

I hope you found this useful! If you did, please share it!

Also, if you have any questions or feedback, please leave a comment below! Thanks for reading!

Migrating From Informatica To SSIS?

image

If you’re even considering migrating your Informatica Workflows to SSIS packages, you’re going to need a clear understanding of the level of difficulty you’re going to be up against. That’s where Workflow Profiler comes in.

The Workflow Profiler allows you to gather a complete list of of repository objects at the most granular level with the goal of determining their reusability. The Workflow Profilers also identifies connections utilized within the Workflows. Once the workflows have been documented, detailed reports are generated detailing the objects contained in the Informatica workflows.

First, identify the repository connection.

Then select the Workflows you want to document.

Next, you can select the type of report you’d like to generate. You can also specify if you would like to filter out certain types of objects.

And you’re report is ready for viewing and exporting to Excel, Word, or PDF formats.

Head over to PragmaticWorks.com and download the free trial of Workflow Profiler. If you’re considering migrating your ETL to SSIS, this is a tool you don’t want to miss out on.

Notes From SQL Saturday 168: Introduction To SSIS 2012

Thank you to everyone who attended my session, “SSIS 2012 In Yo’ Face: Introduction to SSIS”! I had a great time presenting and it was a whole lot of fun. Also, a big thank you to my co-presenter, Mitchell Pearson (blog | twitter)!

Also, thanks to everyone who attended my second bonus session, “What’s New In SSIS 2012”.

For those of you interested, here is the package we created in “SSIS 2012 In Yo’ Face”. Simple place the content of the zip file in the C:\Projects\SQLSaturday168 folder and unzip the SSIS project to the directory of your choice. If you have any questions, please feel free to post them here or send me a message on Twitter (@SQLDusty).

Again, thanks to everyone who came to my sessions! I hope you enjoyed the sessions and maybe even learned a little something.

BI xPress Report Deployment Tool

imageIf you’ve followed my blog for a while, you’ve probably seen me blog about BI xPress because its such an awesome tool. I use BI xPress on every gig I go on, even if the client has not purchased a license. There’s been several great enhancements since the earlier versions of BI xPress, but one of the more useful is the new Report Deployment Tool.

The practical need the Report Deployment Tool meets for the SSRS developer or administrator is the need to easily and quickly deploy SSRS reports from one environment to the next. With its drag and drop interface, I can move SSRS reports from the QA environment up to Production (or any other environment within my domain) simply by dragging and dropping the report.

After connecting to both SSRS servers, I can easily compare which reports exist in one environment versus the next. I can also bi-directionally move reports that are ready for deployment into Production.

I would highly recommend this tool for anyone who finds themselves facing challenging SSRS report deployment scenarios or for anyone who just wants to very easily move reports across servers in a split second. To learn more about BI xPress and the Report Deployment Tool, head over here.

PowerPivot 101 Training Webinar with Q&A

To watch the free recording of my webinar called PowerPivot 101, just head over to PragmaticWorks.com, create a free login and you’re all set! Please let me know if you have any questions.

PowerPivot 101 free webinar training

Once again, thanks to everyone that attended my session on PowerPivot. Here are my responses to some of the questions I received during my session but did not have time to answer until now.

1. Does the current version of PP support drill through?

The current version of PowerPivot does support drill through. All you have to do is right-click a measure in your spreadsheet and select Show More Details or alternatively you can double-click the measure.

image

2. Is PowerPivot add-in required for SharePoint?

PowerPivot for SharePoint is required if you wish you share Excel workbooks that contain PowerPivot data via SharePoint. For more information on installing and setting up PowerPivot for SharePoint, check this out.

3. Where will a replay of the PowerPivot 101 webinar be available?

Head over to the Pragmatic Works Learning Center to view the recording of this webinar as well as the recordings of all the previous webinars!

4. Book/website recommendations?

Definitely check out PowerPivotPro.com run by Rob Collie. It’s a great website with tons of cool PowerPivot-y stuff, plus Rob is a cool dude.

Check out these books!

image4

PowerPivot for Excel 2010: Give Your Data Meaning
Marco Russo & Alberto Ferrari

image10

Practical PowerPivot & DAX Formulas for Excel 2010
Art Tennick

5. What is the name of the component/function in SharePoint that would make the “live” data connections possible in published PowerPivot?

I assume the question is directed at utilizing a live connection to a data source, such as SQL Server. To my knowledge, this is not natively supported with PowerPivot. The data in your PowerPivot workbook must be refreshed.

There are two ways to refresh data in a PowerPivot workbook. You can refresh it manually anytime you want or you can schedule a refresh through SharePoint like I showed during the webinar. For more information on refreshing data in a PowerPivot workbook, check out MSDN.

6. I thought DAX was only supported using the Tabular mode of SSAS. My understanding is that PowerPivot is built on the Multidimensional model. I wouldn’t think DAX would be supported. Can you comment?

DAX (Data Analysis Expression language) is the formula language for PowerPivot and Tabular modeling and is used to specify calculations and to create new columns. It’s basically an extension of the Excel formula language. For more information related to DAX in regards to PowerPivot and Tabular modeling, read this and this.

7. Can you blog about having a calculated field that I can put on a slicer to filter by number of records (i.e. products with more than 100 records).

To filter records where a measure is greater than or less than a certain amount is pretty easy. In your workbook, just click the drop down arrow above the attribute you wish to filter, go to Value Filters, and select Greater Than, Less Than, or whichever option you desire.

image

Then you can select which measure you want to use and what quantity to use.

image

Thanks for all the great questions everyone. Don’t forget to check the recording of the webinar in case you missed anything!

PowerPivot 101 Recording Now Available

Thanks to everyone who attended my PowerPivot 101 webinar last Tuesday morning! It was a blast and I had a great time presenting for the 300 strong crowd that attended!

In case you missed the webinar, you can easily view the recording here free of charge! Also, don’t forget to check out the dozens of other free webinar recordings. With this kind of free training available, there really is no excuse for you to not be learning something new!

If you’re looking for a great book to get you started with PowerPivot and DAX, I would suggest checking out the following books:

image

PowerPivot for Excel 2010: Give Your Data Meaning
Marco Russo & Alberto Ferrari

 

 

 

image

Practical PowerPivot & DAX Formulas for Excel 2010
Art Tennick

 

 

 

Also, check back for my PowerPivot Q&A responses in a later blog post! Thanks again to everyone who attended my session!

Dustin Ryan is a Data Specialist interested in Azure, SQL Server, and Power BI.

%d bloggers like this: