Biml Snippets
Partition
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Tables>
<Table Name="JuniorSurveyResponses" ConnectionName="SportsData" SchemaName="dbo">
<Columns>
<Column Name="SurveyId" IsNullable="true" />
<Column Name="Attribute" DataType="StringFixedLength" Length="10" IsNullable="true" />
<Column Name="Response" DataType="String" Length="50" IsNullable="true" />
</Columns>
<!-- Custom extensions are used to perform certain tasks such as partitioning a table.
The custom extensions are run after table creation. -->
<CustomExtensions>
<CustomExtension Name="CustomExtension" ConstraintMode="Parallel">
<Tasks>
<ExecuteSQL Name="Execute SQL Task 1" ConnectionName="SportsData">
<DirectInput>CREATE PARTITION FUNCTION MyPartitionFunction (int)
AS RANGE LEFT FOR VALUES (12);
CREATE PARTITION SCHEME MyPartitionScheme
AS PARTITION MyPartitionFunction
ALL TO ( [PRIMARY] );
GO
CREATE CLUSTERED INDEX idx_PARTITION_JrSurveyResponse ON [SportsData].[dbo].[JuniorSurveyResponses] ( SurveyId )
ON [MyPartitionScheme](SurveyId);
GO
</DirectInput>
</ExecuteSQL>
</Tasks>
</CustomExtension>
</CustomExtensions>
</Table>
</Tables>
</Biml>