There is already an answer to possibly the same thing here: Get Output of Copy Activity present Inside the Switch in Azure Data Factory
But how exactly does this work: "Using a Pipeline variable and set variable activities inside every case and storing the activity output(rowsWritten) and using that variable outside Switch activity"?
I have tried to do this so that the Switch activity and the Set variable activity trying to use the activity output from the Switch are in the same pipeline. Can this even work?
This should give an idea on what I'm trying to do: This is how I'm setting the Pipeline return value inside one case of the Switch: This is how I'm trying to use a value retrieved from the Switch in a Set variable activity in the same pipeline:
One solution is not to use the switch and keep the lookup to perform the select with a case (if possible) or use a stored procedure if the switch and lookup are on teh database it is possible