Hi Bill LaLonde ,
If your requirement is to perform insert if the data doesn't exist as well as update on already existing data, then I would recommend you go for Upsert option.
Now, when there is no data in the sink, it will insert the same data as it is from the source. From the next run onwards, in case there is some changes in the source data, it will perform update based on the update if condition you have provided in the alter row condition.
So, as mentioned correctly by @AnnuKumari-MSFT if there is no data in sink, there is nothing to update on as it is an action to be performed on the sink. However, you can perform transformations on the source data using several transformations present in dataflow. For this case:
- You can use a filter transformation or conditional split transformation to divide the whole dataset into two parts one having est_number='V18677A' and rest others will fall under default case.
- Then you can use derived column transformation to modify the St column to 'MN'
- Afterwards, you can union the two datasets using union transformation.
- And use Sink transformation to load the data into SQL
In this way you don't need to insert the source data first and then perform transformation for updating the data in sink because before inserting we are taking care of the transformation.
Hope this helps.
Please consider hitting Accept Answer
and also hit yes
for was answer helpful?
question. Accepted answers helps community as well. Thank you.