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
Your question mentions Copy Activity, which is only in Fabric enabled resources (Data Factory or Data Engineering). If you just have Power BI/Semantic model, then you would not be able to edit the Copy Activity.
The REST API could be called from PoweryQuery, but you would need access to the API code to add the email to the returned results or store in a parameter