A newbie to SSIS here, so if you are able to help.. please add as much detail to your answer as possible :)
My goal is to be able to parameterise my ado.net source based of values already in a table in my destination DB.
I've managed to test the functionality of the first part of this using a hard-coded value in my variable but i'm obviously going to need this flow to be dynamic (based on what existing in my lookup table).
Here is some detail of the steps i have taken so far.
- I have a dataflow task in my a package, within this i have the ado net source connected to a lookup no match to a ole db destination.
- I have set up a package level variable (with the hardcoded value)
After clicking on the dataflow task, i have placed my source query in the ADO NET Source.SqlCommand expression with the variable in the where clause. As like below.
"SELECT columm1 ,columm2 ,columm3 ,columm4 FROM table_a WHERE columm1 in ='"+ @[User::varibable1] +"' ORDER BY columm3 ,columm4"
I run the package and only the records with the value name in my variable are returned. Perfect! Just what I need.
Now the second part... I need my ado.net source to receive the values from another query that should run prior. So somehow I need maybe another task that passes the values into this variable for the ado.net source but i'm not sure how to go about this.
Please let me know if you need anymore info.
Your help is much appreciated!
Thanks OluwaT
im using SSDT version 15.9.16