Hello @sachin gupta ,
Thanks for getting back. My apologies for not being clear. My ask was more related by what are you making performing this data movement like - Copy Activity or the mapping data flow.
Option 1 : Using Copy Activity
NOTE : The working of the approach depends on how the data is returned. If the copy activity is triggered copies only one row of data i.e. meaning it either returns Scenario 1 or Scenario 2 as per the question (not multiple rows).
Then you can have a Web Activity first. You can access the response by following the below:
activity('Web1').output.response
You could do a condition - Check the response of a web activity. Based on the response, you could have a copy activity defined with the If activity (True - False)
Option 2 :
You could make use of the Mapping Data flow. You could do transformation - like having derived column transformation upon the source and store the manipulated values.
You could check whether there is count and if there is '0'. Then update the value of the other column - for instance clicks as 0 - else - update the value of the clicks as a source. You could repeat the same for other columns.