This article is going to walk through the process of creating a simple package using
Biml and the
Biml Package Generator feature in BIDS Helper. To start out, you need to install the
latest version of BIDS Helper from CodePlex. Once that is set up, you should create a new Integration Services project in BIDS. In the project, right-click on the Project in the Solution Explorer. There’s
a new item in this menu – Add New Biml File.
Clicking Add New Biml File will add a new file to the Miscellaneous folder in the solution named BimlScript.biml. (The name is automatically generated, so it may be BimlScript1.biml, etc). You can right-click on the file and choose rename to give the file
a more specific name. For this example, rename the file “BasicPackage.biml”.
Double-clicking on the file will open the XML editor inside of BIDS. The editor supports Intellisense for Biml, so typing an opening tag (“<”) will give you a list of valid options for tags you can use. (If you aren’t seeing the Intellisense,
check this link for troubleshooting steps.)
For this example, copy and paste the following Biml into the document. Since the code below includes the document root tags (<Biml>), you’ll want to make sure you replace the entire contents of the Biml file.
<Connection Name="AdventureWorks" ConnectionString="Server=.;Initial Catalog=AdventureWorks;Integrated Security=SSPI;Provider=SQLNCLI10"/>
<Package Name="Biml Sample" AutoCreateConfigurationsType="None" ConstraintMode="Linear">
<Dataflow Name="Extract Table List">
<OleDbSource Name="Get Table List" ConnectionName="AdventureWorks">
<DirectInput>SELECT * FROM sys.tables</DirectInput>
The first section (<Connections>) of this Biml defines an OleDbConnection that points to the AdventureWorks database. The next section (inside the <Packages> tag) defines a single package that contains a Dataflow task (the <Dataflow> tag).
The Dataflow task contains two components, an OleDb Source and an Union All transformation.
The next step is to take this definition of a package, and actually generate the package from it. To do this, right-click on the Biml file, and choose Expand Biml File from the context menu.
(In later versions of BIDS Helper, the option is called "Generate SSIS Packages".)
A new package will be added to the SSIS Packages folder, named Biml Sample.dtsx. If you review the generated package, you’ll see that it matches up to what was defined in the Biml code.
That’s a quick introduction to the Biml functionality in BIDS Helper. In the next article, we’ll set the stage for some more advanced (read: more interesting) uses of Biml, including some scripting.
[cross posted from