<#@ template language="C#" tier="2" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <Package Name="Create Tables" AutoCreateConfigurationsType="None" ConstraintMode="Linear"> <Tasks> <# foreach(var table in RootNode.Tables) {#> <ExecuteSQL Name="Create <#=table.Name#>" ConnectionName="<#=table.Connection.Name#>"> <DirectInput> <#=table.GetTableSql()#> </DirectInput> </ExecuteSQL> <# } #> <# foreach(var table in RootNode.Dimensions) {#> <ExecuteSQL Name="Create <#=table.Name#>" ConnectionName="<#=table.Connection.Name#>"> <DirectInput> <#=table.GetTableSql()#> </DirectInput> </ExecuteSQL> <# } #> <# foreach(var table in RootNode.Facts) {#> <ExecuteSQL Name="Create <#=table.Name#>" ConnectionName="<#=table.Connection.Name#>"> <DirectInput> <#=table.GetTableSql()#> </DirectInput> </ExecuteSQL> <# } #> </Tasks> </Package> </Packages> </Biml>
Use GetTableSql() Utility Extension to Create T-SQL CREATE TABLE Scripts
Paul S. Waters
Often times it is desirable to create SSIS Packages to create tables in a target database from Tables, Dimensions, and Facts modeled in Biml. The Biml representation of the tables can either be from Biml files with no BimlScript, or dynamically generated from BimlScript. In BIDS Helper , this BimlScript works by executing it with other Biml or BimlScript files.
published 10.05.12
last updated 10.05.12
Comments
There are no comments yet.