Data Warehouse Efficiency

How quickly do you get from the business coming to you with “we need a data warehouse” to delivering that warehouse?  If you’ve sat through any Biml talk, you’ve undoubtedly heard stories of thousands of staging packages being generated per hour.  You may have even heard tales of source systems being analyzed in hours, rather than months. Very few have heard of data warehouses being produced with the push of a button.  In the next few blog entries, I want to walk you through an actual project I’m working on now.

Project Kickoff

At the beginning of every project is a project kickoff meeting.  During this meeting, the client shares their vision of what the project will do for them and some of their thought process up to this point.  We also will share the project plan with the client.  If there are any discrepancies between our plans and the client’s expectations, we compromise and find the best fit for both parties.  We also lay out a communications schedule along with a list of needs in order for our project plan to be successful. Generally, this list includes the key stakeholders and subject matter experts we’ll need to communicate with in order to learn the nuances of their business.

For this project, the client is my own company I began with a friend back in 2011.  I was the data guy.  After nearly five years, I realized that I couldn’t justify paying my own salary, so I moved back into consulting, freeing up that money to pay for continued development.  I still help when I can, so when the chance to help build a data warehouse to support our Focus Missions product, I jumped!

Focus Missions is a Software-as-a-Service product that helps churches run their mission trips more efficiently.  Gone are the days of the giant manila folder full of Applications, copies of passports, and paperwork of all shapes, sizes, and darkness of coffee stains.  The process of raising funds and tracking that money for both tax and auditing reasons… that’s gone too! Getting everything signed and notarized by hand… eliminated!  Over 3,000 trips have been organized with Focus Missions.  There are certain KPIs and metrics that these missionaries want to see.

The product owner also serves as the lead developer.  He’s already worked through some ideas of what these questions are, and how to effectively communicate this information to the users.  During the kickoff meeting, I was given the following design.

Given the previous diagram, the product owner presented a possible architecture for the data warehouse.  I presented my standard fact-dimension model architecture.  I spent the better part of this meeting showing how analytics work in this schema, and in the end, the product owner approved of the design. So the design and roadmap were approved.

Since I was involved in the initial design of the database for Focus MIssions, I would serve as the Subject Matter Expert (SME) for access to the source data, and information on the source schema.  So there was no need to set up a list of SMEs, there would just be two: the product owner and myself.  That saves a lot of time in the communications schedule.

In general, a kick-off meeting takes 1-2 hours.  For this project, we’re right on track with a two-hour kickoff meeting.  So no big gains in efficiency yet.

Designing the Data Warehouse Schema

Much of the destination schema was hammered out during the kickoff meeting.  That’s because I’ve used the fact-dimension design for so long, I can sketch it out while holding a conversation.  

Here’s a part of the design we talked through in our kickoff meeting.  I’ve worked with many clients who dragged this design process out weeks. Traditionally this process would be estimated at over 160 hours for design, documentation, and approvals.  This design was sketched out and approved during the initial two-hour meeting.

We’re ahead by 160 hours!

Designing the Data Warehouse Schema

Since we’re ahead, I went ahead and implemented the destination schema too. The only thing about this design that’s slightly out of the ordinary is the fact we’re allowing for multiple tenants.  That means each table gets TenantID, an integer that represents which tenant a given row belongs to.  Also, in this case, since a tenant will have the ability to define their own calendars (think fiscal years), even DimDate will get TenantID.

I like to follow a certain format for my create table statements. So I built a quick Bimlscript that lays out a template for me.  I set the SchemaName, Table Type, and table base name, and the script spits out a partial template for me.

I can spit out Stage, Transform, Dim and Fact templates with this script.  All I have to do is save and add them to the solution.  For this destination schema, I finished the DW schema in less than an hour.

In past projects Building the destination schema has taken up to 40 hours. This is less than the design phase because the prior step gets all the administrative costs.

At this point in the project, we’re already ahead by 199 hours!

Next time

We’ll dive into the interrogation step and then generate our staging tables and packages.  After that, we get to talk about automating the transformation step. That gets interesting in this project since the application layer will be able to write analytics directly to the DW from a job rather than using SSIS or a T-SQL statement.  Until then, if you have any questions, please send them in. I’m here to help!

By Shannon Lowder

Shannon Lowder is the Database Engineer you've been looking for! Look no further for expertise in: Business Analysis to gather the business requirements for the database; Database Architecting to design the logical design of the database; Database Development to actually build the objects needed by the business logic; finally, Database Administration to keep the database running in top form, and making sure there is a disaster recovery plan.

Leave a comment

Your email address will not be published. Required fields are marked *