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:
2015 was a year of highs and lows for me. I did so many things for the first time and really pushed myself out of my comfort zone. I made new friends and grew closer to old friends. At the same time I struggled more than ever with my old enemies depression, insomnia, migraine and impostor syndrome. All in all, I guess you can call it “life” :)
Yay, I’m so excited to finally share these news! Join Scott Currie (@ScottCurrie) and me for a Biml Training Day at SQLBits XV in Liverpool on May 4th: Learn Biml Today: Start Using It Tomorrow.
Biml Training Day at SQLBits XV
Scott and I will guide you through everything you need to start using Biml in real projects. From installing the free Biml tools, to the basics of Biml and BimlScript, to creating a staging environment, to building a metadata framework, and finally how to organize your code, work in a team, and automate deployment. Yep, that’s a lot of content to go through in one day, but you will get all the sample code so you won’t have to start from scratch.
We have very different backgrounds and experiences. Scott created Biml and I work in-house with teams in different countries. We will focus on best practices and code standards, but I’m also looking forward to sharing how we’ve solved problems in different ways. We hope the day will be interesting for everyone, from those of you who are completely new to Biml to those of you who have already built a Biml solution. Bring your questions and real-life problems! And if one day isn’t enough? I’ll be there for another three days :)
You can use Notepad++ to quickly insert, edit, or delete text in multiple locations in one file – at the same time! All you have to do is enable Multi-Editing, and then hold CTRL while you click or select text. This is a fast and easy way to edit parts of your document in just a few seconds.
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.
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 :)