Project Description


Automate t-sql merge statements for loading dimension tables.

At a high-level, the script does the following:

  • Creates a database called ExampleDw, to run the demo
  • Creates the following schemas in the database: stg, customer, etl, devtools
    • stg schema holds the example staging tables
    • customer holds the example Customer dimension, DimCustomer
    • etl holds all the load stored procedures
    • devtools - the important of all - holds the custom datamap table, DimDataMap and the procedure, usp_WriteMerge that creates the Merge statement

To use usp_WriteMerge in your environment other than ExampleDw,

  • create the objects (DimDataMap and usp_WriteMerge) from devtools schema in the database of your choice
  • update the datamap table, DimDataMap accordingly

 

Last edited Feb 4, 2014 at 2:04 AM by SamuelVanga, version 3