Skip to content

Tag: Biml

Business Intelligence Markup Language

Don’t Repeat Your Biml – C#/VB Code Files

Biml (Business Intelligence Markup Language) - C#/VB Code Files

Do you use C#/VB classes and methods in your Biml projects? One solution is to create class nuggets <#+ … #>, but they can only be used in their containing Biml file. You can move class nuggets to separate files and include those files, but a more elegant solution is to use C#/VB Code Files.

In addition to using C#/VB Code Files, there are four other main ways you can avoid repeating your Biml code:

In this post, we will look at how to use C#/VB Code Files.

Continue reading →

Don’t Repeat Your Biml – Include Files

Biml (Business Intelligence Markup Language) - Include Files

Are you using Biml so you won’t have to do the same tasks over and over and over again in multiple SSIS packages? If so, you probably don’t want to write the same Biml code over and over and over again either. Instead, you can move common code to separate files, centralize and reuse these files in many projects, and update code in one file to make changes to all projects. One of the ways to apply this Don’t Repeat Yourself software engineering principle in Biml is to use Include Files.

In addition to using Include Files, there are four other main ways you can avoid repeating your Biml code:

In this post we will look at how to use Include Files.

Continue reading →

Create SSIS Project Parameters from Biml

Biml (Business Intelligence Markup Language) - Project Parameters from Biml

If you are using BIDS Helper or BimlExpress to generate SSIS packages in the Project Deployment model, you have probably noticed that it is not possible to create project parameters from Biml. You can write Biml for the project and project parameters, but BIDS Helper / BimlExpress will only generate the SSIS packages for you and not the SSIS project parameters. The recommended solution is that you create the project parameters manually before you generate your SSIS packages from Biml.

(Want to know why? Read Scott Currie’s explanation in my blog post Why can’t I create SSIS Project Parameters from Biml?)

However, if you are a lazy developer like me, you probably don’t want to create and update project parameters manually. Perhaps you want to automatically create or update project parameters based on some metadata? You can do that!

Let’s take a look at a (semi-hardcoded, semi-hack) solution for creating SSIS project parameters from Biml in BIDS Helper / BimlExpress :)

Continue reading →

Published: Last Updated: Categories: BimlTags: ,

Biml in Belgium at SQL Server Days 2015

SQL Server Days 2015 - Cathrine WilhelmsenLast week I visited Belgium for the first time to attend and speak at my first SQL Server Days 2015. It was a truly great event, and I would like to say a huge thank you to the organizers and volunteers for making it a wonderful couple of days for speakers and attendees!

The venue was spectacular, but unfortunately none of my pictures do it justice. Take a look at the great pictures on the SQL Server Days Facebook page instead. I loved the huge open area in the middle where everyone could meet during breaks, and I was so happy there was unlimited coffee and chocolate! :) The rooms were all unique and fun to present in. One room looked like a library, another like a bar, and I presented in the room that was decorated like a train station – with trains in it!

I presented my Don’t Repeat Yourself – Agile SSIS Development with Biml and BimlScript session. It is based on my Biml introduction session, but included some of the more advanced features like C# classes / methods and Transformers in Mist. My attendees were a mix of people who were completely new to Biml, people who had tried basic Biml and people who had already created advanced Biml frameworks. It was a bit tricky to cover everything for everyone in just one hour, and I know I went too fast through a couple of demos, but I hope it wasn’t a waste of time for those of you who attended :)

The slide deck is available on SlideShare, and I have uploaded all the demo files on my Biml Resources and Reference page for you to go through at your own pace. Some instructions are included in the README.txt file, and feel free to contact me with any questions. I will continue to update the demo files with new and improved examples. You can always find the latest version on my Biml Resources and References page.

SQL Server Days 2015 - Speakers
Speakers! What a great bunch of people :)

SQL Server Days 2015 SQL Server Days 2015 - Room 4
First picture: Attendees eating lunch. Second picture: The room I presented in, wow!

Thank you so much for having me, and I hope I can come back in 2016! :)

Import Metadata in Biml using GetDatabaseSchema

Import Metadata in Biml using GetDatabaseSchema

One of the main tasks in Biml projects is to import source metadata. The recommended method is GetDatabaseSchema. This method returns an ImportResults object that contains SchemaNodes (schema metadata) and TableNodes (table and view metadata).

Continue reading →

Published: Last Updated: Categories: BimlTags:

Don’t Repeat Your Biml – CallBimlScript

Biml (Business Intelligence Markup Language) - CallBimlScript

Are you using Biml so you won’t have to do the same tasks over and over and over again in multiple SSIS packages? If so, you probably don’t want to write the same Biml code over and over and over again either. Instead, you can move common code to separate files, centralize and reuse these files in many projects, and update code in one file to make changes to all projects. One of the ways to apply this Don’t Repeat Yourself software engineering principle in Biml is to use CallBimlScript.

In addition to using CallBimlScript, there are four other main ways you can avoid repeating your Biml code:

In this post we will look at how to use CallBimlScript with Parameters.

Continue reading →

SQLHangout #26 – Biml in the Real World

SQLHangoutBack in June I did a #SQLHangout with Boris (@brshristov) about Biml that I called “Blabbering about Biml“. (Boris is much nicer, he called it “Biml. An Introduction.“)

Yesterday we did another fun #SQLHangout about Biml. This time we were joined by João Lopes (@SQLSniper), Rasmus Reinholdt (@RasmusReinholdt) and Régis Baccaro (@regbac) – great guys that I admire. It was interesting to hear how we use Biml in different ways and what we would like to see happen in 2015. I look forward to seeing all of them again and learn from their experiences!

Five people from Bulgaria, Denmark, Portugal and Norway talking about Biml – isn’t that awesome? :)

SQLHangout #22 – Blabbering about Biml

SQLHangout

When Boris (@brshristov) invited me to a #SQLHangout I was really honored and couldn’t say no. It’s such a fun idea and I’ve really enjoyed watching the other #SQLHangouts. It’s great to see people’s personalities shine through in videos instead of only reading their blog posts, and I learn something new.

I suggested to chat about Biml, something I’ve only recently begun learning myself that has already saved me many hours of work. I still have so much to learn, but the fact that it took me about 20 hours to learn something new that has saved me and my coworkers hundreds of hours already… That’s worth sharing. If I can do it, you can do it!

Boris named the video “Biml. An introduction.” I thought a more appropriate name was “Blabbering about Biml” :)

(“Oh hi!”)

I forgot to mention their names, but thank you to Julie Smith (@JulieChix) and André Kamman (@AndreKamman) for inspiring me to learn more Biml in their SQLSaturday sessions in Tampa and Copenhagen! :)

Package Configurations and Connection Managers in Biml

Biml (Business Intelligence Markup Language) - Package Configurations and Connection Managers in Biml

At work we wanted to start using Biml to speed up development in our existing projects without making too many changes at once. I decided to start by writing Biml files that generates SSIS packages exactly like the ones we already have so we can implement changes faster, and step one was to figure out how to create Package Configurations and Connection Managers in Biml:

  • Create an XML configuration file Package Configuration
  • Create the Connection Manager specified in the XML configuration file
  • Create SQL Server Package Configurations that use the Connection Manager specified in the XML configuration file
  • Create Connection Managers specified in the [SSIS Configurations] table in SQL Server
  • Create a Parent package variable

I recommend reading Understanding Integration Services Package Configurations by Rafael Salas (b | t) and Getting Started with BimlScript by Paul S. Waters (t) if you’re not already familiar with the basics of SSIS Package Configurations and Biml.

Continue reading →

Published: Last Updated: Categories: BimlTags:

SQL Server, SSIS and Biml Data Types

Biml (Business Intelligence Markup Language) - SQL Server, SSIS and Biml Data Types

The table below is a simplified mapping between SQL Server, SSIS and Biml Data Types. It does not include all possible mappings or all data types, but is meant as a quick reference while developing and learning Biml. I mainly created it as a cheat sheet for myself, but I hope other Biml developers will find it useful!

Can’t remember this post’s URL? Neither can I 😅 You can use this short URL instead: cathrinew.net/BimlDataTypes

Cheat Sheet for SQL Server, SSIS and Biml Data Types

SQL ServerSSISBiml
bigintDT_I8Int64
binaryDT_BYTESBinary
bitDT_BOOLBoolean
charDT_STRAnsiStringFixedLength
dateDT_DBDATEDate
datetimeDT_DBTIMESTAMPDateTime
datetime2DT_DBTIMESTAMP2DateTime2
datetimeoffsetDT_DBTIMESTAMPOFFSETDateTimeOffset
decimalDT_NUMERICDecimal
floatDT_R8Double
geographyDT_IMAGEObject
geometryDT_IMAGEObject
hierarchyidDT_BYTESObject
image (*)DT_IMAGEBinary
intDT_I4Int32
moneyDT_CYCurrency
ncharDT_WSTRStringFixedLength
ntext (*)DT_NTEXTString
numericDT_NUMERICDecimal
nvarcharDT_WSTRString
nvarchar(max)DT_NTEXTString
realDT_R4Single
rowversionDT_BYTESBinary
smalldatetimeDT_DBTIMESTAMPDateTime
smallintDT_I2Int16
smallmoneyDT_CYCurrency
sql_variantDT_WSTRObject
text (*)DT_TEXTAnsiString
timeDT_DBTIME2Time
timestamp (*)DT_BYTESBinary
tinyintDT_UI1Byte
uniqueidentifierDT_GUIDGuid
varbinaryDT_BYTESBinary
varbinary(max)DT_IMAGEBinary
varcharDT_STRAnsiString
varchar(max)DT_TEXTAnsiString
xmlDT_NTEXTXml

(* These data types will be removed in a future version of SQL Server. Avoid using these data types in new projects, and try to change them in current projects.)

Continue reading →