azurecsvazure-data-factory

Azure Data Factory (ADF), whenever I create a dataset from blob storage using csv format, it sees all column types as string


Im new to Azure Data Factory and I try to create a dataset from a csv file.

The csv is hosted by Azure Blob Storage. I specify the path to the csv and then I check the provided data types in the schema tab

enter image description here

I created the csv using excel and I was explicit when it comes to data types (or at least what excel provides as options, look at top right (Number))

enter image description here

This is how the generated csv looks like:

enter image description here

Any ideas on how I can fix it?


Solution

  • I also tired the same in my environment and got similar result irrespective of the data type we exported in CSV.

    In Azure Data factory its by default datatype for CSV is String. CSV won't preserve the data types of the file. If you want to preserve the data types, you should use parquet or JSON as file format.

    If you want to copy the data in another format in target destination it will get copied irrespective of the target data type :

    enter image description here

    Here in above example, it got copied in target as target datatypes without any issue.