I've had some time to experiment with the new report designer in the November CTP and continue to believe this will be a reasonable alternative to the Visual Studio interface for business users who participate in the report development process, as I mentioned in my post Looking Forward to Report Designer Features in Katmai's Reporting Services. I think hard-core report developers will be happy about some changes and not happy about others which I'll explain shortly. In the November CTP, the new report designer features (as well as the Tablix report item) are available only in a separate client tool. Today I'll comment on my general experiences without getting into a deep dive on everything there is to know about the report designer and Tablix. For that sort of detailed information, check out Books Online here for the report designer and here for Tablix.
 
The first thing that tends to throw people is the absence of a Tablix control on the Insert menu.
 
 
You actually get it when you add insert either a Table or a Matrix into your report. There's no such thing as a table or matrix element anymore. They have both been replaced by the tablix element which is a hybrid of the two. By choosing table or matrix, you define your starting layout for the tablix but you can change your mind as you go. I like this feature a lot because one of my clients inevitably wants a report that started its life as a table to turn into a matrix.
 
Here's a screenshot of a report I was working on:
 
 
The next thing I really like is the ability to put captions into the column headers for rows in my matrix. In the example above, the captions I added are Products and Total. My client who likes to see data in a matrix more often than not also likes column captions - so I am constantly fussing with rectangles and textboxes in the matrix to get it right. (It's not hard the first time, and it's not hard to add new columns "headers", but it's a pain to take them away I have found. Thank goodness SQL Server 2008 Reporting Services offers a new and better solution!)
 
Another nice feature is the ability to have different sets of static columns. Traditionally (i.e. SQL Server 2000 and SQL Server 2005), you can present columns of numeric data as a single static group underneath the group(s) defined on columns. Here you can see I've created something independently of the dynamic columns. The Avg Sale column is to the right of the CalendarYear group. You can tell it's outside of the group because the bracket in the column handles includes only CalendarYear. Compare this with the brackets on rows - one group is indicated for EnglishProductSubcategoryName and a second group including the first group is indicated for EnglishProductCategoryName.
 
Notice also you don't see standard expressions in the textboxes. Instead there are expression placeholders, like <<Expr>>. I'm not sure I'm wild about this, but it may be less intimidating to business users. For hard-core types, you can open the Properties pane and see the expression you're accustomed to seeing in the Value property box. The Properties pane isn't visible by default so timid business users don't need to be frightened by its presence unnecessarily. To set properties, they can use Office-like dialog boxes. Now I found that to be a relatively tedious process (by my standards) to set something simple like a currency format with 0 decimals as compared to a simple C0 in the Properties pane, but that's the hard-core developer type in me coming out.
 
Speaking of panes, notice the Data pane on the left. It contains your data source and dataset information. To edit, you just right-click the applicable item. The Built-in Fields folder contains all the global variables like ReportName, PageNumber, etc., making it much easier to enhance your report with these items.
 
Another huge improvement is the addition of the Row Groups and  Column Groups panes. Instead of having to navigate through the dialog boxes to get to your group properties - or even to see the hierarchical arrangement of them when using multiple groups - all is available right next to the report design surface. Just right-click on a group and click Edit to access its properties. To create a group, by the way, you just drag a field from the Data pane into the Row Group or Column Group and position it where you like. That's about as easy as it gets!
 
Other cool features - when you enable the ruler, you get more than markings on the vertical and horizontal edges. The position of your cursor becomes a crosshair that travels along those edges so you can get incredible precision on the report design surface. And if you're having difficulty seeing the details, the slider in the bottom right corner lets you zoom in as much as you like. I can't tell you how many times I wished I could do this in earlier versions.
 
The report designer has the same paradigm as the standard BIDS designer - design view versus preview. Here's a section of the report in preview mode:
 
 
Nothing unfamiliar here. However, I did notice that the ReportName global variable didn't show up here - a little CTP bug - although the ExecutionTime global variable did appear correctly. ReportName did show up when I deployed the report to the server.
 
So now that you see the final report, you can see more clearly that this is a hybrid of a table plus a matrix... table+(matr)ix...tablix! How so? In a standard matrix in previous versions, the row groups would appear in separate columns. Here they appear in a single column - which I can easily do with grouping in a table. I have standard matrix style with dynamic columns but a new capability with the non-grouped column for Avg Sale at the end. Of course, you can nest a tablix inside of a tablix, which can make for some very interesting possibilities, I'm sure!
 
That's it for today. More to come on Tablix in future blog posts. --Stacia

Categories:

Maintaining data quality is important throughout the organization, but certainly BI applications are expected to maintain an even higher standard because we have greater control over the data going into the data warehouse. As with most things in life, the ideal seldom matches the real for a number of reasons. In SQL Server 2008 (November CTP), the new Data Profiling Task in Integration Services should help a lot becase not only can you perform data quality assessments on an ad hoc basis, but you can also automate data quality by integrating the quality assessment into the ETL process. One important caveat about this task is that it works only with SQL Server sources (2000 or higher).
 
This one little task has lots of options which I will address over a series of blog posts. Today, I will introduce the Quick Profile feature of the task and show you the output.
 
To get started with the Data Profiling task - whether you're using the Quick Profile or not - you must define either a file connection or a variable to hold the output. The output will be generated in XML format. In the editor, there is a Quick Profile button to open the Quick Profile Editor. Consider this the quick and easy approach to profiling a single table (or view).
 
Now I must say I did read BOL to get an overview of the task, but one little detail about the connection for the Quick Profile escaped detection. I had dutifully created a OLE DB connection manager to AdventureWorks, because how else does one connect to SQL Server databases? But that connection did not show up in the connection drop-down list in the Quick Profile Editor. (Neither did it give me the option to create one, which might have given me a clue. Most other places to set connections give me the ability to create a new connection on the spot, so this seemed odd to me, but it IS a CTP...). Then I went back and re-read BOL to discover that the Quick Profile edtor requires an ADO.NET connection manager using the SqlClient provider. Not particularly intuitive, in my opinion, but it is documented so I can't complain too loudly. Once I set up the correct connection type, it appeared in the drop-down list and I was set to continue.
 
Once the connection is set, you have the opportunity define which profiles you want to create. Just for kicks, I decided to profile the Product table in AdventureWorks and kept the default profile selections:
 
 
 
The Quick Profile editor adds all the profiles you selected to the Profile Requests page of the Data Profiling Task Editor.
If you click on a particular request, you can view, and of course change, the properties of the selected request:
 
 
You then execute the package and get the results. If you output the results to a file, you can use the Data Profile Viewer. Just click Start, Run, and type DataProfileViewer and click OK. (It's actually found in C:\Program Files\Microsoft SQL Server\100\DTS\Binn if you're curious.) Use the Open button there to navigate to your output file fromthe package execution.
 
Here's an example of the Candidate Key Profile:
 
 
Now in the case of an existing table, this particular profile isn't particularly enlightening. After all, the key has already been defined. It's more useful for data we haven't seen before, perhaps an extract sent to us by a business partner, and we want to evaluate the contents so we can build a table appropriately for it. In terms of data quality, this profile on the Product table tells us that the combination of columns - ProductID, Name, and ProductNumber uniquely identify each record in the table. That's a good result because that's what we'd expect! If there were any key violations, they would be listed in the viewer.
 
Here's an example of the Column Null Ratio Profile for the Color column:
 
 
This profile tells us there are 248 records that have a null value in the column which represents 49% of the total records in the table. That seems like a high number of records, so this is could be an opportunity to do some data clean-up in the source. If that's not an option, then you might want to consider replacing NULL with some value acceptable to business users before loading into your data warehouse.
 
Here's an example of the Column Value Distribution Profile for the Color column:
 
 
This information shows the breakdown of records by distinct value showing both the actual count and the percentage. This is useful for validating distinct values and ensuring you don't have any surprises. This is where dirty data that likes to pop up after you've built an Analysis Services database. Now you have an opportunity to spot potential problems and fix them before the data gets to the data warehouse.
 
Here's an example of drilldown:
 
 
When examining a profile, you can select a profile row and click the drilldown button to view the records associated with that profile characteristic. This drilldown ability lets you know exactly which records fit this aspect of the profile - no need to stop and write a query to figure it out. (Not all profiles - at least in CTP5 - have drilldown capability.)
 
Here's an example of the Column Statistics Profile on the StandardCost column:
 
 
This profile is useful for checking the min and max values in a column as well as the mean and standard deviation. If you see ranges you don't expect, you should investigate and clean up accordingly.
 
Here's an example of the Column Length Distribution Profile:
 
 
This profile identifies the maximum length of values in the column and provides counts and precentage of total records for each length found. This is most useful for columns in which you expect a constant length. For example, if Style should have only values of 1 character, but some records have 2-character values, then you need to find and fix those records with invalid values.
 
So, you can see the default Quick Profile of the Data Profiling Task provides quite a lot of information without a lot of setup. Many of the profiles can be configured to fine-tune the profiling process which I will explain in a future blog post. --Stacia

Categories:

The most anticipated change to the Script Task and Script Component has certainly been the change from VSA to VSTA for developing the script code. As a result of this change, the script language is no longer limited to Visual Basic .NET; now developers can choose to code using Visual C# .NET instead. Virtually every introduction to Integration Services I've conducted generates at least one complaint from the audience about the lack of support for Visual C# .NET in SQL Server 2005, so I'm glad to see this capability added.
 
All the buzz I've seen around the Script Task and Script Component focuses on the C# capability, but misses other changes that I think are also important to know about. Let's take a closer look at other features introduced in these items with SQL Server 2008 Integraton Services.
 
ReadOnlyVariables and ReadWriteVariables properties

In the editor, the ReadOnlyVariables and ReadWriteVariables in SQL Server 2005 required you to type in the variable names. You can still do this, but I always ask, why type when you can select an item from a list? It saves keystrokes, and more importantly, ensures a correct value! In SQL Server 2008 there is an ellipsis button to click which opens a Select Variables dialog box which displays all the variables in the System and User namespaces. The downside (at least in the November CTP in which I most recentely tested this feature) is that this list seems to be a bit random and you can't sort by name or type.

Precompilation

The PrecompileScriptIntoBinaryCode property in SQL Server 2005 is removed in SQL Server 2008. The removal of this property means you no longer get the choice of whether to precompile the code before package execution (which gets better performance at the expense of a larger package) or to compile just-in-time.

The default behavior in SQL Server 2008 is to precompile your script. When you're editing the script, a set of VSTA project files are created (or re-opened), but they are deleted from your hard disk and persisted only in the package.

Edit Script button (formerly known as the Design Script button)

This is such a little change, but it means a lot to me and I'm sure to a lot of others. While intellectually I understand that it doesn't require a lot of physical effort to click the mouse a few extra times, I invariably am annoyed when I feel I'm clicking much more than necesary to accomplish a task or to reach a destination. With regard to the Script Task and Script Component, I appreciate that the Edit Script button is now on the first page of the editor. Hooray! What really happened here was the order of the pages was changed. In SQL Server 2005, the pages in the Editor are General, Script, and Expressions whereas, in SQL Server 2008, the pages are Script, General, and Expressions. Microsoft acknowledged that the most frequent reason people open the editor is to edit the script and thus shortened the path to get there.

Access to External Assemblies

If you want to add a reference to a DLL in your script in SQL Server 2005, the VSA interface limits access to external assemblies in the Windows\Microsoft.NET\Framework\v2.0.50727 folder on your development machine and to GAC or this folder on the machine running the package. The Add Reference dialog presents a list of DLLs which you can add to your script, but there is no way to browse to another location where you might prefer to (or must) store your DLLs.  Furthermore, there is no way to add a Web reference if you want to interact with a Web service. Instead, you have to create your own proxy class first, register the class on the dev and production machines, and then reference that class in your script. Not impossible, but lots of extra steps required.

In SQL Server 2008, the VSTA interface in the Script Task and Script Component makes development much easier. First, the Add Reference dialog box has all the tabs you'd expect in a full IDE - .NET, COM, Projects, Browse, and Recent. The key point here is you can browse to the location of the DLL you want to use now. Second, you have the ability to add a Web reference and thereby get the proxy class created automatically for you without having to go through all the steps required to get this behavior in SQL Server 2005. Jamie Thomson has posted a video demonstrating how to consume a Web service with VSTA in SQL Server 2008 Integration Services which you should check out if this sort of functionality is useful in your environment. --Stacia

Categories:

Theme design by Nukeation based on Jelle Druyts