Hello @Haider, Mustafa (Reigate)
To achieve this, you can follow these steps:
- Add a Lookup activity to the pipeline and configure it to retrieve the product family from the PostgresSQL database.
- Add a ForEach activity to the pipeline and configure it to iterate over the output of the first Lookup activity.
- Inside the ForEach activity, add another Lookup activity and configure it to retrieve the IDs against the product family from the SQL Server database.
- Add a Copy activity to the pipeline and configure it to use the output of the second Lookup activity as the source and the destination dataset as the destination.
- Map the product family ID from the second Lookup activity to the destination dataset in the Copy activity.
Here is an example of how you can configure the Lookup activities:
For the first Lookup activity, set the source dataset to the PostgresSQL database and the query to retrieve the product family. Set the output to an array of strings.
For the second Lookup activity, set the source dataset to the SQL Server database and the query to retrieve the IDs against the product family. Use a parameter to pass the product family from the ForEach activity to the second Lookup activity. Set the output to an array of objects.
Here is an example of how you can configure the ForEach activity:
- Set the Items property to the output of the first Lookup activity.
- Inside the ForEach activity, add a Set Variable activity to set a variable to the current item in the loop.
- Add the second Lookup activity inside the ForEach activity and configure it to use the variable as a parameter.
I hope this helps! Let me know if you have any further questions.