1
votes

How can we add headers to the files existing in the blob/ azure data lake using azure data factory. I am using a copy activity to move the header less files to the sink, but while moving the files should have default headers like "Prop_0" or "Column_1". Any method available to achieve the same?

Any help would be appreciated. Thanks and Regards, Sandeep

2

2 Answers

0
votes

In usually, Data factory will using the default header Prop_0, Prop_1...Prop_N for the less header csv file to help us copy the data, if we don't set the first row as header.

This is to help us do the column mapping but won't change the csv file.

According my experience and know about Data Factory, it doesn't support us do the schema change of the csv file. It's impossible to add the header of the csv files at least for now.

Hope this helps

0
votes

In ADF, create a new Data Flow. Add your CSV source with a no header dataset. Then add your Sink with a dataset that writes to ADLS G2 folder as a text delimited file WITH headers. In the Sink Mapping, you can name your columns: enter image description here