Forum Discussion
Rafaela07
6 months agoHelper I
Add New Column with Dynamic content in Copy Activity
Hi everyone! I'm facing a challenge in a copy activity of my pipeline. Context: I have a pipeline that makes api calls. The apis use something like the following format /api/emails/{email_id)/...
- 6 months agoThe cleanest way to “carry” the
email_idinto the sink is to add it as an extra source column in the Copy activity (inside the ForEach) so it flows through mapping alongside the API payload.one way to do it:
- Edit your REST dataset and add a parameter, e.g.
EmailId(string). - In the Copy activity (inside ForEach), pass the item into the dataset:
- Dataset parameter EmailId =
Item().email_id
- Dataset parameter EmailId =
- In Source → Additional columns:
- Name:
email_id - Value:
@dataset().EmailId
- Name:
This avoids using
item()directly in the Additional columns and can be easier to maintain. - Edit your REST dataset and add a parameter, e.g.
Thomaslleblanc
6 months agoSuper User
The cleanest way to “carry” the
email_id into the sink is to add it as an extra source column in the Copy activity (inside the ForEach) so it flows through mapping alongside the API payload.one way to do it:
- Edit your REST dataset and add a parameter, e.g.
EmailId(string). - In the Copy activity (inside ForEach), pass the item into the dataset:
- Dataset parameter EmailId =
Item().email_id
- Dataset parameter EmailId =
- In Source → Additional columns:
- Name:
email_id - Value:
@dataset().EmailId
- Name:
This avoids using item() directly in the Additional columns and can be easier to maintain.
Rafaela07
6 months agoHelper I
Thank you very much Thomaslleblanc !
I will mark it as solution, however I have a further question.
What if the only experience your admin has assigned in the workspace is PowerBI and Data Factory or Data Engineering experiences cannot be reached due to that?
You mentioned that your response is the "cleanest" way to approach this so that makes me think that there are also alternatives and I was wandering if one of them also bypasses the example I've just given.
Thank you again!