question

SantoshDurai avatar image
0 Votes"
SantoshDurai asked SantoshDurai commented

ADF Copy - Data type conversion - Mapping section grayed out

Hi,

I am trying to load CSV files from an AZURE Blog storage to AZURE SQL via ADF Copy activity. My intention is to use Auto Create to create the target SQL table.
As the column meta data for the CSV file is string, I wanted to use the mapping section to change the data types to the relevant ones. I imported the schema definition , however the Data type section is grayed out and does not let me to change it. Am I missing something? It will be great some one could help me.

Thank you,
Santosh

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VaibhavChaudhari avatar image
0 Votes"
VaibhavChaudhari answered SantoshDurai commented

Auto create table option will create table with default data types. You will have to alter the table later and modify data types as required.

If you are concerned about table definition, better to create the table in advance.

See similar question - https://stackoverflow.com/questions/61240726/why-the-default-auto-created-sql-tables-column-length-is-1-in-azure-data-factor


Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Or use a data flow activity instead and cast your data types in a Derived Column transformation before your Sink. Then let ADF auto-gen the table based on this new schema definition in the data flow.

0 Votes 0 ·

Thanks Mark for your comments. I tried finding for a auto create option under the Sink settings in Data Flow but could not find it. I will try searching for it though.

Cheers,
Santosh

0 Votes 0 ·

Thank you Vaibhav. Appreciate your quick response. I was playing around with the settings and discovered that you can go the the backend Json data by clicking on the {} section and change the source data type there. After that when I ran the package it auto created the target table with the correct data types. Not ideal but a hack that can be used.

Cheers,
Santosh

0 Votes 0 ·