Ryoss
Ryoss

Reputation: 59

ADF - Loading CSVs with no columns names to AzureDB

New to ADF, came across this issue the other day. Is there way to deal with mapping a CSV file that come in from the blob without any headers and load them into the AzureDB?

Anyone else came across such thing? Any tips/advance greatly appreciated!

Regards, Ryoss

Upvotes: 0

Views: 1814

Answers (1)

Joel Cochran
Joel Cochran

Reputation: 7738

Yes, the Mapping feature in Copy activity will map the column ordinals to the SQL schema.

First create a Dataset for the CSV file and uncheck "First row as header":

enter image description here

On the "Schema" tab, it will show the number of columns but no names:

enter image description here

Second create a Dataset for the SQL Table with the schema:

enter image description here

Finally on the Copy activity "Mapping" tab, press "Import schemas" to reveal the ordinal mapping:

enter image description here

Aside: If you need something more robust, you can do this in a Data Flow, where the Source columns will have actual names:

enter image description here

Upvotes: 1

Related Questions