Forum Discussion
Setting Up SCD Type 2 using "Variable to set date values"
I am creating an SCD type 2 dimension and using start and end dates to identify current and expired records. In my destination table, there are start date and end date columns. I am unable to select the variable to set date values in the SSIS package. When I click in the "Variable to set date values" box, I don't see a drop-down to select my system variables from. I want to use the System::ContainerStartTime. Do you think this is something I need to configure in the SSIS package? If so, how?
1 Reply
- benibixBrass Contributor
Hi tk_lawson
I can't see your package, so I can't say why System::ContainerStartTime isn't in that list. The docs say a system variable can be picked there, so an empty box is odd.
One thing to try is a variable of your own. Open the Variables window (SSIS › Variables) and add User::ScdStartDate with data type DateTime and the package as its scope. In its properties, set EvaluateAsExpression to True and use this as the expression:
@[System::ContainerStartTime]
Then reopen the wizard and look for User::ScdStartDate in the "Variable to set date values" box. If the box is still empty, which version of Visual Studio and SSDT are you on?