Hi Partha Das,
Thanks for using Microsoft Q&A forum and posting your query.
Your requirement can be achieved by following below series of steps in your data flow:
- Have two sources MainTable (M) and LookupTable (L), and then have a Lookup transformation. In lookup transformation , have lookup condition as
M.Col2==L.Col1 - Then have an Assert Transformation, to identify which rows aren't matching. For this you will have to have Assert Type ==
Expect trueand in the expression you can doMainTable@Col2 == LookupTable@Col1The output will look like below where the error rows are the unmatched rows.
- Then have a Derived column transformation to update the value of
MainTable@Col2with value ofLookupTable@Col1where the match is met using acase functionin expression builder and willMainTable@Col2value if not matched . And also add additional column asunMatchedRows = isError()so that this can be used in next transformation to split the Matched rows vs unmatched Rows and write them to respective sinks. - Then have a
split transformationto split the streams based on matched and unmatched condition as below: - Then you can have a
select transformationto select on the column that you would like to copy/update your sink data store. - Stream 1 will have Matched rows (M.Col2 == L.Col1) with updated
MainTable@Col2and you to update your sink based on the key value. - Stream 2 will have the unmatched rows and you can sink them your desired storage location.
Hope this helps.
Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.