Last active
July 1, 2016 13:59
-
-
Save mlongoria/822cb0de12b40f1f38591f25b8148fd4 to your computer and use it in GitHub Desktop.
Caller file for Type 1 SCD design pattern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#*This file retrieves variable values from a database | |
and passes them to another Biml file file that contains | |
the design pattern for a type 1 SCD*#> | |
<#*The items directly below this comment are directives*#> | |
<#@ template language="C#" hostspecific="true" #> | |
<#@ import namespace="System.Data" #> | |
<#@ import namespace="System.Data.SqlClient" #> | |
<#@ import namespace="System.IO" #> | |
<Biml xmlns="http://schemas.varigence.com/biml.xsd"> | |
<!-- | |
<# | |
string AuditConnectionString = "Data Source=.\\SQL2014;Initial Catalog=AWBIML;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"; | |
string SrcTableQuery = @" | |
SELECT | |
[PackageName] | |
,[DestinationSchemaName] | |
,[DestinationTableName] | |
,[DestinationConnection] | |
,[DataFlowSourceName] | |
,[SourceConnection] | |
,[DataFlowQuery] | |
,[UpdateSchemaName] | |
,[UpdateTableName] | |
,[UpdateConnection] | |
,[UpdateSQLStatement] | |
,[AuditConnection] | |
,[AuditSchema] | |
FROM [BIML].[DimensionPackageVariables] | |
where PackageType ='Dim1' | |
; | |
"; | |
DataTable dt = null; | |
dt = ExternalDataAccess.GetDataTable(AuditConnectionString, SrcTableQuery); | |
#> | |
--> | |
<#@ include file="ProjectConnections.biml" #> | |
<Packages> | |
<# foreach (DataRow dr in dt.Rows) { #> | |
<#=CallBimlScript("Dim1.biml", dr[0].ToString(), dr[1].ToString(), dr[2].ToString(), dr[3].ToString(), dr[4].ToString(), dr[5].ToString(), dr[6].ToString(), dr[7].ToString(), dr[8].ToString(), dr[9].ToString(), dr[10].ToString(), dr[11].ToString(), dr[12].ToString())#> | |
<# } #> | |
</Packages> | |
</Biml> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment