Biml for OData Source and Connection Manager in SSIS

Biml Wheel.

As of July 2018, there is no built-in Biml support for OData. To work with OData in Biml, you have to create a custom source and connection manager. This requires more Biml code than built-in functions like OleDbSource and may look a little overwhelming at first. But don’t worry! You don’t have to start from scratch.

In this blog post, we will first look at the properties of the OData Connection Manager and how to script it in Biml. Then, we will do the same for the OData Source. Finally, we will tie it all together and create a complete SSIS package that you can use a starting point for your own projects.

Online Tools for Data Professionals (T-SQL Tuesday #101)

T-SQL Tuesday logo.

T-SQL Tuesday #101 is hosted by Jens Vestergaard (@vestergaardj), and the topic is My Essential SQL Server Tools. There are several tools that I use every single day, such as Notepad++, Redgate SQL Prompt, and BimlExpress. Since I have already covered my favorite tools in other blog posts, I want to take a slightly different approach this time and share some of my favorite online tools.

Collecting Geeky Norwegian Humor (T-SQL Tuesday #99)

T-SQL Tuesday logo.

T-SQL Tuesday #99 is hosted by Aaron Bertrand (@AaronBertrand) and the topic is Dealer’s Choice. What does that mean? Aaron wanted us to choose between two topics: write about something we are passionate about outside the SQL Server community, or write about T-SQL bad habits and best practices. I’m too afraid to argue with Aaron, so I chose the first option 😅

M by Mads Eriksen.

But what did I want to write about? Truth be told, I’m pretty boring. I don’t have any real hobbies outside of tech, just a few interests. I first considered writing about hiking. I need to disconnect completely once in a while, and my favorite way of doing that is to get sweaty while walking for hours up a mountain or waterfall. My Instagram (@cathrinesqueee) is my highlight reel, full of pictures and happy memories from my trips.

However, instead of embedding all the pictures that are already on Instagram, I decided to write about something completely different. Something obscure. Something fun and geeky from way before I got involved in the SQL Server community. Something from my good old teenage fangirling days…

Biml Annotations and ObjectTags

Biml Wheel with a Tag hanging from it.

Biml objects have many built-in attributes. For example, all Tables have SchemaName and all Packages have ProtectionLevel. When your Biml solution starts to grow, you will quickly see the need for adding additional metadata that can be used in other Biml files. A common use case in Data Warehouse Staging projects is to store the source schema and source table name on your staging table objects. This allows you to use the source metadata in a higher tier Biml file that generates the SSIS packages to load the tables. To store and use this additional metadata, you can use Biml Annotations or ObjectTags.

Biml Annotations and ObjectTags are both Key/Value pairs. Annotations are String/String pairs intended for storing simple text metadata, while ObjectTags are String/Object pairs that can also store more complex metadata in .NET objects.

Don't Repeat Your Biml - Tiered Biml Files

Biml Wheel.

Many Biml solutions start off very simple, with just a single Biml file that generates a few SSIS packages. Most developers quickly see the need for a more complex solution for multiple sources. One way to reuse code and apply the Don’t Repeat Yourself software engineering principle in Biml is to use Tiered Biml Files.

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

In this post, we will look at how to use Tiered Biml Files.