Skip to content

Instantly share code, notes, and snippets.

@mlongoria

mlongoria/Dim1Caller.biml

Last active Jul 1, 2016
Embed
What would you like to do?
Caller file for Type 1 SCD design pattern.
<#*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
You can’t perform that action at this time.