Wednesday, May 14, 2008
On Metadata-Driven Analysis Management Objects (New Link)
Cheers to Windows Live SkyDrive. Jeers to Ripway.
- Adrian Downes
Wednesday, March 5, 2008
On the Gathering Clouds of Software as a Service (SaaS)
For those of us building solutions in the Business Intelligence space, and haven't already spared a thought about SaaS, it is important to be consider of the mid-to-long term implications of a hosted system-of-record (S-OR) application.
Think about the major ERP vendors moving their product to a hosted, SaaS offering (like the SAP BusinessOne trials in India in 2007). In this business model, one customer may leverage a hosted ERP, for example, paying a monthly or annual fee to use only CRM and Financials services, whilst another may prefer to use additional services for managing Suppliers, Inventory, Employees (etc.). Quickly, the third-party hosted provider is able to leverage (potentially) incredible economies of scale.
Basically we are talking about a web-based “data-in” proposition, where a business collectively enters transactional data securely via the browser for one or more key business functions. On the opposite side of the fence, BI fundamentally is a “data-out” paradigm where business data is refined and exposed as information for decision making (either strategic, operational or even individual).
Now, some of you may recall the famous book and articles by Nicholas Garr (Does IT Matter, Harvard Business School Press, 2004), who discusses the commoditisation of IT into a utility of services (aka. utility computing). Naturally there was something of a backlash from IT Managers/Directors, CTOs, and CIOs (three guesses as to why). This is what SaaS is all about and where many in the IT industry (Gartner, Forrester, IDC, and obviously the major vendors) believe the trend is heading.
From a BI Practitioner perspective, there is certainly food for thought:
First, consider the S-OR application to be, in general, the ideal data source for our BI solutions since such systems typically encompass multiple business functions or domains (again, Customers, Financials, Suppliers, Employees, Inventory, etc.). The S-OR is the end goal of a Master Data Management effort, and (as I'm sure must may currently/historically agree) often the oasis of many data integration (ETL) efforts.
Next, consider our accessibility to S-OR applications should they become hosted (or “in the cloud”). Suddenly, it seems building a BI infrastructure on-site for a customer becomes somewhat less of an issue. Right? "Cool", you might say, "web-based BI" or "hosted BI".
Now consider the shifting burden of information from a customer environment to a third-party hosting provider. Do you think it will be easier or more difficult to access data and build those lovely BI solutions for customers?
Finally, consider this: if utility computing takes root, and the hosted system of record becomes a feasible and sustainable model for business, guess where BI is going next? More profoundly, who do you suppose will be in the most likely position to deliver this likely "new form" of BI?
What are your thoughts?
- Adrian Downes
Saturday, September 15, 2007
On Preparing for the MCITP: BI Developer Certification
- Adrian Downes
Tuesday, July 24, 2007
On "Mythbusting" Business Intelligence
Cheers, Jamie.... thanks for the healthy wakeup call on current BI (mis)perceptions!
- Adrian Downes
Monday, June 25, 2007
On Metadata-Driven Analysis Management Objects (Part 3)
Enhancements to the CreateNewAggregationDesign Function
Most BI practitioners will be taking full advantage of multiple-measure group support in SSAS 2005 cubes (UDMs) for a variety of reasons including support for one of the many-to-many dimension design patterns eloquently positioned by Marco Russo in his work "The Many to Many Revolution". I have two successful implementations which build on his great ideas, and, it was during this phase of development that I came across an opportunity to enhance our code base for our modest Metadata-Driven-AMO “quiver of arrows” (to quote a good friend of mine).
In order to take better advantage of multiple measure-group support in SSAS 2005 cubes, using the code listings from Part 2 of the Metadata-Driven AMO posts, you will find that it is far more appropriate to leverage the MeasureGroupDimension class instead of the CubeDimension class when adding AggregationDesignDimension objects to the .Dimensions collection of the AggregationDesign object. As you may recall, we use the AggregationDesign object to define which aggregations we will store in our cube, based on counts of dimension key attributes found in the incoming data for our new partition. The reason for this change is simple: as you iterate through a collection of CubeDimension objects, you may come across a perfectly valid CubeDimension which is not associated to the measure group partition we are generating. By using the MeasureGroupDimension class, you ensure that you are only creating aggregations relevant to your measure group partition. Moreover, both the MeasureGroupDimension class and AggregationDesignDimension class share the same inheritance lineage, so we are able to take advantage of the .CubeDimensionID property without any fuss. In Listing 10, the minor changes can be found in Section 4.
Update (14-MAY-2008):
All Listings described above may now be accessed at the link below...
- Adrian Downes
Friday, May 25, 2007
On New Thinking in Service-Oriented Business Intelligence
- Adrian Downes
Wednesday, May 2, 2007
On Three Perspectives of Performance Management
Lately, when I reflect on performance management as a business discipline, I find that my thinking has changed somewhat.
Consider the following value propositions:
The Data Management value proposition
A known quantity in of SQL Server 2005 "BI Services" in terms of centralising and surfacing structured data as KPI values and other measures to BI applications
The Information Management value proposition
Involving, through MOSS 2007, the optimisation of document and content control (un/semi-structured information) with human access and workflow/business process interactions.
As always I tend to relate in terms of Microsoft technology, but feel free to substitute specific technologies mentioned with those you work with...
If performance management really intends to align corporate strategy with information, people and processes, then both "data management" and "information management" capabilities need to be considered-- simply proposing a PerformancePoint & SQL Server solution in support of Strategy Map and KPI shape business requirements is not enough for a performance management initiative.
The art and science of performance management has many incarnations spanning well over 100 years of industrialisation and automation, arguably starting with the formal positioning of Scientific Management (1911), which reflects the ideas and concepts put forth by Frederick Taylor (1856 - 1915). Taylor built on earlier companies-as-machines metaphors, and introduced time-and-motion studies which attempt to uncover optimal performance in work processes (both human and early machines). In the Information Age of the 21st century, the theme of aligning technical and human domains with strategic direction can be found in a number of performance management methodologies:
Performance Pyramid (McNair, Lynch & Cross, 1990)
The Performance Pyramid approach views organisation as having four interdependent levels, specifically: corporate management, business unit, processes germane a given parent business unit (such as those geared toward customer satisfaction or market share) and operational goals which support a given process. At the operational goal-level, values such as time and quality are determined at different frequencies and used to meet management requirements at higher levels.
Note: some publicly-accessible references to the Performance Pyramid only cite Lynch & Cross
Effective Process/Performance Measurement (EP2M) Model (Adams & Roberts, 1993)
EP2M also views an organisation as having four taxonomies of measurements: top-down measures which are used to manage strategy and change, bottom-up measures which consider human action and the outcomes of ownership and accountability, internal measures which are used to improve and sustain both process efficiency and effectiveness, as well as external facing measures geared towards markets, customers and suppliers.
Balanced Scorecard (Kaplan & Norton, 1992)
Probably most familiar in business circles these days, the Balanced Scorecard is a framework that can be applied (and modified if necessary) to suit critical perspectives of a given organisation. Typically four perspectives are employed: financial, customer, internal process and learning and growth. Each perspective represents a high-level collection of relevant key strategies, objectives and KPIs, and, is often represented visually with tools like the Strategy Map.
In each the methodologies listed, process and human factors (and, strangely, the number four) play important roles in organisational performance. It is becoming an increasingly accepted practice in business to consider such factors, alongside traditional financial measurements, in order to arrive at a more complete organisational picture. It follows that both factors become passive organisational elements subject to measurement, and, active elements for organisational communication and collaboration across performance management cycles.
Indeed, it would seem that effective performance management comes about at the intersection of corporate strategy (fleshed out by a suitable performance management methodology), data management (providing structured data for decision-making) and information management (representing unstructured content, semi-structured processes and sometimes pretty complex people). Moreover, encouraging the use of MOSS 2007 alongside SQL Server 2005 and PerformancePoint would probably prove more valuable in the long-run (albeit more expensive, unless Windows SharePoint Services 3.0 is considered) to a performance management initiative.
Thanks for reading! How would you rate the value of information management in performance management?
- Adrian Downes
Tuesday, April 17, 2007
On Metadata-Driven Analysis Management Objects (Part 2)
In order to take advantage of AMO we naturally need to make use of the classes available in Microsoft.AnalysisServices.dll. Once we have defined the variables (discussed in Part 1) within the SSIS package, and wired them up to the single-row output from our metadata store using an Execute SQL Task, we can reliably retrieve and use them within the package Script Task. Our script task uses three files:
- ScriptMain: serves as an entry point, connecting variable values with PartitionGeneratorController
- PartitionGeneratorContorller: class file which governs execution of a PartitionGenerator object
- PartitionGenerator: class containing all the properties and methods for creating and processing partitions and aggregations
Listing 1 is a snippet within ScriptMain, showing how the variables values are captured from the incoming DTS.Variables collection.
Next, we use the controller class to field the incoming arguments, and supply them to our PartitionGenerator object, which then creates a connection to the server (supplied by OLAPServerName and OLAPConnectionString) and iterates through collections of databases, cubes, measure groups and finally partitions. We use the metadata supplied to help us mine our way from collection to collection. Essentially, at the leaf-partition-level, the incoming partition name will always be new, since we concatentate a new DateKey to the PartitionName prefix. As mentioned in Part 1, this approach follows a "new partition each day" approach for both loading new data into the relational fact table as well as the target cube measure group. Listing 2 shows part of the nested-loop logic.
Once we have determined that the incoming partiton does not exist, we create a new partition with PartitionGenerator's .CreateNewPartition function. In Listing 3, arguments for the function are supplied as current SSAS 2005 objects we identified along the way through the nested For Each loops.
PartitionGenerator uses the QueryBindingString metadata value as an argument to define the QueryBinding property for the new partition. An object argument for the measure group is applied since it contains a reliable .ID property value that is used to define a new partition within an existing collection, within an existing measure group. We are also sure to use the Cube.Update method to ensure that the new partition is saved to the target cube measure group. Listing 4 provides the complete code for the function .CreateNewPartition. Back in the controller, provided .CreateNewPartition returns a new partition object safe and sound, we can go ahead and process it (shown in Listing 5, this follows on from the controller code shown in Listing 3).
Using the method .ProcessNewPartition, the PartitionGenerator object accepts the newly created partition, along with the measure group and cube objects This method uses the ProcessType.ProcessData enumeration option, to optimise "fast-loading" of the new partition. Using ProcessData means that we only process the fact data for the partition, and does not handle any dependent objects. A separate step (not discussed in this series of posts) handles dimensions separately. Listing 6 provides the complete code for .ProcessNewPartition. In our testing, we found that we needed to separate partition and aggregation processing logic into discrete operations, delineated by Cube.Update operations, in order for the SSIS Script Task to work effectively. The beneficial by-product of using ProcessData to load our partition is that we can quickly process aggregations with the ProcessType.ProcessIndex option.
In order to create and process aggregations, PartitionGenerator exposes another function .CreateNewAggregationDesign, which uses a dynamically-generated partition count document stored in the variable OLAPPartitionKeyCounts. This document describes the alignment between a fact table key column and its corresponding cube dimension attribute found in the partition. The PartitionCount attribute defines the distinct counts of dimension key members from the newly-generated relational fact table partition (this is also handled by a separate process, and is not covered here). Listing 7 shows what an example PartitionCount document looks like.
Further in the controller, provided the new partition is created and "fast-loaded" successfully, .CreateNewAggregationDesign is called (see Listing 8), returning a new AggregationDesign object driven by PartitionCount. The AggregationDesign is resident within a measure group, and is applied to the new partition; the ProcessType.ProcessIndexes enumeration is used to build the aggregation data and bitmap indexes for the new partition.
Inside .CreateNewAggregationDesign, the following steps are taken:
1. Determine whether an AggregationDesign already exists within the measure group (if it does, this represents a condition where the process itself is being re-run, thus the existing AggregationDesign object is overwritten by a new one with the same name)
2. Specify the EstimatedPerformanceGain property value for the AggregationDesign object (used for annotation purposes, this accomplished via the OptimisationLimit metadata value)
3. Specify the EstimatedRowCount property value from the PartitionCount document, in order to the specify the total number of rows for the partition
4. Add AggregationDesignDimension objects to the .Dimensions collection of the AggregationDesign object
5. From the PartitionCount XML document, set the EstimatedCount property value for each specified AggregationDesignDimension attribute
6. Design Aggregations for the AggregationDesign object, using the OptimisationLimit value, and return the object.
That's pretty much all there is to it. We now have a package in place which, with the right metadata, can process any partition on any cube measure group. On examining the completed partition (either via SSMS, or directly in XML), all the annotations, aggregation designs (visible at the measure group level), and aggregations are present. It should come as no suprise that our client queries tested significantly faster with the aggregations over no aggregations at all.
For those of you eager to rip the Listings to bits, bear in mind that a few alternates were considered before this final approach. One of the alternatives to applying the .NET code in an SSIS Script Task would be to create a stored procedure that calls a PartitionGenerator assembly (wrapping both the core class and its controller). Both Microsoft.AnalysisServices.dll and PartitionGenerator.dll would need to be registered, and, you would need to assign the permission set UNSAFE. On paper this is fine, but when you try to register Microsoft.AnalysisServices in the Database Engine, you may receive the following message in Management Studio.
Warning: The SQL Server client assembly 'microsoft.analysisservices, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
The risk conveyed by the warning was sufficient for us to explore alternatives. By the way, trying to register version 9.0.3042.0 of the .dll from SQL Server 2005 Service Pack 2 returned the same message in our environment.
Other serialisation issues also surfaced as we tried to iterate through collections of AggregationDesign objects. Such issues may be addressed by decorating one or more of the classes and methods with the Serializable() attribute in PartitionGenerator, although, since AMO is leveraged behind the scenes, it follows that they would likely need to expose classes that are serializable as well. Unfortunately, we did not have the time to research this any deeper, but I would like to hear if anyone else has found success taking this approach.
Other solutions, such as creating an SSAS assembly, or passing ASSL (XML/A) statements (either via an assembly or through a script task), did not satisfy our 'ease of support' requirements as mentioned in Part 1. I'm quite certain, however, that dynamic creation and execution of ASSL would work nicely.
While it does not profess to be the magic bullet solution, I hope it proves helpful to anyone coming to grips with AMO. As always, I welcome your feedback; if you have found a better or more efficient way around some of the issues raised, then please feel free to share!
Update (14-MAY-2008):
All Listings described above may now be accessed at the link below...
- Adrian Downes
Friday, April 13, 2007
On Metadata-Driven Analysis Management Objects (Part 1)
Over the last few months we have been hard at work on a metadata-driven ETL pipeline for an 880Gb SQL Server 2005 BI solution. Powered by SSIS, metadata has allowed us to create a single SSIS package for a generic task, re-using it many times based entirely on the information we supply to it.
For instance, our solution has a single "Import Flat File" package which uses metadata describing the source file, the system from which it originated (for traceability, among other reasons), the target "Import" table as well as a destination "Archive" folder for the file itself, once the package completes.
We take the same approach for performing surrogate-key generation, referential-integrity checks, data transformations, loads, archives and some maintennance operations in the solution.
Further along the value-chain, we have an SSAS 2005 database which houses a single cube (UDM) supporting a number of measure groups. Each of the measure groups is front-loaded by day-level partitions, allowing our users to continue working with their desired perspective while the new data is being processed in. The measure groups are aligned to corresponding relational fact table partitions by (you guessed it) metadata.
Altogether, the SSIS facet of the solution operates on just 8 small packages. Essentially, if there are any errors raised by the process- governing schedule by a problematic process, the problem is 99% of the time metadata-related. More to the point, we continue to add value to the system, by only implementing new structures (either in the relational or multi-dimensional areas of the solution) and metadata to describe it along established standards.
In keeping with our approach of metadata-driven reusability, we created a single package to process a new partition for any measure group, driven by a process code, and group of related metadata describing:
- ServerName (the target SSAS 2005 server instance)
- DatabaseName (the target SSAS 2005 database within the server instance)
- CubeName (the target UDM within the SSAS 2005 database)
- MeasureGroupName (the name of the measure group, which has metadata mappings to a corresponding relational fact table)
- PartitionName (stored as a partition prefix in the format "MeasureGroupName_" which is concatenated to a DateKey to describe the "slice" of data within a given partition)
- DateKey (an 8 digit integer, also known as a "smart key" in the format YYYYMMDD, and used as the basis for relational fact table partitioning)
- QueryBinding (the query string used to define the dimension attribute keys and measure members for a measuregroup, sliced by the DateKey)
- ConnectionString (relevant for dynamically connecting to a given SSAS 2005 database at run-time, providing future-proofed flexibility if another SSAS 2005 database needs to be implemented)
- PartitionKeyCounts (an XML document which describes the association between a dimension key column in the relational fact table and the corresponding cube dimension attribute in the UDM.)
- OptmisationLimit (reflects the "Performance Gain Reaches" property in the Aggregation Design Wizard)
This collection of metadata allows us precise control over which measure group is to be front-loaded with a new partition, and provides a high degree of flexibility for multi-server, multi-database scenarios as they may emerge.
The high volume of data the system is subject to, and, the demand for high query performance warrants precise counts of partition fact keys. Thus, in order to dynamically build and process our partitions, in addition to building and processing our aggregations at run time, we looked to AMO for simplicity in handling metadata. A generic SPROC, called by the SSIS package in an Execute SQL Task, with the appropriate process code would retrieve the "OLAP Partition Processing" metadata described above as a single row result-set, mapped to package variables, and supplied to an SSIS Script Task. We also chose to look beyond the stock control-flow tasks (Analysis Services Execute DDL Task, Analysis Services Processing Task) and data-flow tasks (Partition Processing Task) in order to ease supportability for administrators since they already understood VB.NET over ASSL (XML based Analysis Services Scripting Language).
In the second installment of this post I will show some of the code samples used to leverage AMO, and the metadata supplied to it, in an SSIS Script task.
- Adrian Downes
Saturday, March 17, 2007
On Market and Product Consolidation
Consider Microsoft Office Business Scorecard Manager 2005, for example. BSM 2005 currently supports monitoring, and analysis tasks through scorecard and report views displayed to users through SharePoint. However, to complete the remaining tasks in a typical performance management cycle, further off-line work would be required with additional tools like Microsoft Office Excel 2003 (or later) to assist with planning / budgeting tasks. Subsequent forecasting could be supported, with more work using SQL Server 2005 Analysis Services data mining models. Some have actually extended BSM 2005's data visualization capability by integrating with ProClariy Analytics helping users to better understand what's happening behind a given performance measurement or KPI.
The Microsoft example notwithstanding, the net effect of having multiple BI applications involved for a specific need becomes risky and problematic due to issues such as:
• potentially incompatibility among certain BI applications, from different vendors
• duplication of effort among BI applications
• increased licensing costs for separate BI applications
In SQL Server 2005 such problems don't exist, since integration, analysis, and reporting functions are consolidated into the single product. Consolidation is a great thing from a consumer perspective, since it solves the BI application issues (above) and provides increased value-for-dollar for the product itself. Moreover, the growing movement towards performance management demands an application that addresses each of the discipline’s tasks or phases.
The very idea that such aggressive consolidation in the increasingly competitive BI software marketplace is occurring simply means that we as consumers will benefit from a push for better features, bundled into a single offer (regardless of the vendor), and ultimately lowering the total cost of ownership on our part. Most vendors now realize that the way to deliver performance management effectively is through an investment in a BI system. Microsoft reported in their announcement of PerformancePoint Server last June that they have been listening to customer issues and responded with a bundled approach of their own, rolling together monitoring and analysis with planning, budgeting and forecasting functions in a single product.
While some may speculate whether the Oracle play is a "me-too" tactic or a defensive posture to retain existing Oracle customers, the bottom line that change is happening-- and change is definitely good for us with performance management needs.
What do you think? Is the current state of the BI software market a good thing for consumers? Or, is it all becoming too confusing?
- Adrian Downes