Reputation: 1411
I am using Azure Synapse Analytics pipelines to copy a number of excel data files in Azure blob storage and copy their content into a dedicated SQL DB in Azure Synapse Analytics. I am using copy data activity. In Azure data factory it is possible to define an additional column in source and populate its value by $$FILEPATH which refers to the name of the source file. In Synapse Analytics however, it is not allowing to specify additional columns in sink. When I try to debug my pipeline, I get the error:
Specifying additional columns is not allowed when using copy command.
This is what I mean by defining a new column in source and the error I am getting:
The error is as follows:
What is the best workaround to copy the names of the source files into each row of the table in sink to be able to trace where the data is coming from? I prefer to use pipelines rather than data flows as pipeliens are easier to develop and less expensive. But any solution that can resolve this is good.
Upvotes: 2
Views: 1877
Reputation: 5074
You might have selected copy method as copy command
under sink.
As the error message states, additional columns are not allowed when using the copy command.
To copy data from azure storage to synapse DB when additional columns are involved, change the copy method to bulk insert
Input:
Copy data Source:
Copy data Sink:
Output:
Upvotes: 2