Include Directive

gravatar

John Minkjan

On of the big risks is that BIML file have a tendency to become “LARGE” and thus become unreadable. Luckily you can use the Include directive to cut you BIML into readable blocks. For me a rule of thumb is a 100 line or less. Based on the script I did here: http://biml101.blogspot.nl/2012/09/biml-add-row-number-to-file-export.html I brought the Flat File definitions and the scripcompent C# part to external txt files. This also increases the reusability of code.!

published 09.23.12

last updated 09.23.12


Share

Tags

  • Include
                            


<Biml xmlns="http://schemas.varigence.com/biml.xsd">
	<Annotations>
		<Annotation>
			File: Add.RowNumber.Include.biml
			Demo on using the Include file
			Enviroment:
			DB: MS-SQL2012
			BIML: 1.6 VS2010 BIDS Helper
			(c) John Minkjan biml101.blogspot.com
		</Annotation>
	</Annotations>
	<FileFormats>
		<#@ include file="C:\BIML\FFF\FFF AdventureWorks2012 Person Address.txt" #>
	</FileFormats>
	<Connections>
		<#@ include file="C:\BIML\CN\CnOleDBAdventureWorks2012.txt" #>			
		<FlatFileConnection Name ="CnFFAdventureWorks2012PersonAddress"
							FileFormat ="FFF AdventureWorks2012 Person Address" 
							FilePath="C:\AdventureWorks2012.Person.Address.dat"></FlatFileConnection>
	</Connections>
	<Packages>
		<Package Name="Add.RowNumber.Include" ConstraintMode="Linear">
			<Tasks>
				<Dataflow Name="DFT Add Rownumber">
					<Transformations>
						<OleDbSource Name ="ODS AdventureWorks2012 Person Address" 
									 ConnectionName ="CnOleDBAdventureWorks2012">
							<DirectInput>
								SELECT [AddressID]
                        

File: Add.RowNumber.Include.biml Demo on using the Include file Enviroment: DB: MS-SQL2012 BIML: 1.6 VS2010 BIDS Helper (c) John Minkjan biml101.blogspot.com also published here: http://biml101.blogspot.nl/2012/09/biml-include.html

You are not authorized to comment. A verification email has been sent to your email address. Please verify your account.

Comments

There are no comments yet.