structure in getMetadata activity for csv file dataset show string datatypes for integer column in azure data factory and for json files structure is not supported

lohani 6 Reputation points
2020-07-09T07:44:42.717+00:00

I want to do validation as first step before proceeding further in pipeline execute. I am fetching metadata activity for my dataset and then checking it against a predefined schema in if condition.
Metadata for csv files show column type string even for integer which is breaking the validation.
For json files, structure field is not supported in metadata activity

I have a use case, where i need to validate the dataset(both column count and column types) against a predefined schema before going further in pipeline execution and my dataset will be json or csv files.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,539 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. ChiragMishra-MSFT 951 Reputation points
    2020-07-09T11:48:28.09+00:00

    Hi Pankaj,

    As answered on your Stack Overflow thread, mapping of data types is taken care of in the copy activity. Using getMetadata on a csv file will give all strings.

    Here's a post that talks about validation of datasets in ADF.

    Please note that it's note an official Microsoft blog.

    Hope this helps.

    Stay safe! Take care!