Saturday, January 28, 2012

SSIS Expressions and Quarter Start Dates

the ultimate county fair strategery game - the quarter plow
SSIS has a pretty powerful expression language.  Of course, it's not exactly the same expression language as in SSRS.  And it's not exactly C# or VB.  It is C-like though, so it's not that bad to get the hang of.

Anyway, it can be pretty useful.  Some common uses of expressions within SSIS are when creating dynamic variables (evaluated as an expression) and derived column values in the pipeline.  This post details an example of using an SSIS expression to calculate the quarter start date for each row in the pipeline as it passes through a Derived Column component.  This same approach could easily be used to apply business rules to dates or other values in your source data on the way to your fact table.