Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Kimball ETL (subsystem 1) – Data Profiling via TSQL

By Ira Whiteside, 2012/06/11

I have an earlier post covering Kimball ETL (subsystem 1) – Data Profiling via SIS Data Flow, here is the script for TSQL> 

This script will generate a report providing all normally expected statistics for data profiling as follows:

 [SchemaName],

 [TableName],

 [ColumnName],

 [RecordCount],

 [DistinctDomainCount],

 [MinDomain],

 [MaxDomain],

 [MinColumnPattern],

 [MaxColumnPattern],

 [MinDomainLength],

 [MaxDomainLength],

 [NullDomainCount],

 [BlankDomainCount]

Figure 1. Results for Adventure Works DimGeography table . PostalCode column.

Simply replace the values in the following and run.

SET @tablename ='DimGeography'
SET @columnname ='PostalCode'
SET @schemaname='dbo'

Also note the script will create a function in the dbo scheam unless modified.

Total article views: 2170 | Views in the last 30 days: 24
 
Related Articles
FORUM
FORUM

Script

Need Automated Script

FORUM

drop script

drop script

FORUM

script errors

script errors

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones