An Azure service for ingesting, preparing, and transforming data at scale.
Hi Jorge García ,
Welcome to Microsoft Q&A platform and thanks for posting your query here.
As per my understanding , you were facing issue while trying to perform dynamic mapping in ADF.
Glad that you figured out the way to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.
According to Microsoft Docs (https://learn.microsoft.com/en-us/azure/data-factory/copy-activity-schema-and-type-mapping#default-mapping) it is necessary to create the finalMapping variable as a JSON
{"type":"TabularTranslator","mappings":[{"source":{"name":"Id"},"sink":{"name":"CustomerID"}},{"source":{"name":"Name"},"sink":{"name":"LastName"}},{"source":{"name":"LastModifiedDate"},"sink":{"name":"ModifiedDate"}}]}
So after storing the mappings array in a variable, creating a JSON file like above resolved the issue.
More details: Dynamic Column mapping in Copy Activity in Azure Data Factory
Kindly accept the answer by clicking on Accept answer button so that the solution reaches the community in case anyone is facing similar issue. Thankyou.