Import csv files from data lake using ADF data flow activity

rajanisqldev-42 221 Reputation points
2022-07-20T19:36:06.797+00:00

Hi

I have a pipeline using Data Flow activity which reads csv files from data lake(common data model from D365 CE)

I am reading and loading files into SQL DB in a loop. So, I have chosen Schema Drift.

Data Flow is parameterized. All are working well except date fields.

Every data field is inserted into the sql table as NULL even though there is value in csv file.

If I create pipeline without loop and selected Import schema in Data Flow source (ADLS) and still clicked schema drift. Sink(SQL) still uses Auto Mapping.
But the date fields are coming well and populated in sql table.

What is the issue with dynamic and parameterized data flow?

Thanks in advance

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,556 Reputation points Microsoft Employee Moderator
    2022-07-21T17:06:38.9+00:00

    Hi @rajanisqldev-42 ,

    Thank you for posting query in Microsoft Q&A Platform.

    Usually nulls will get insert into SQL DB when you source file column data cannot be converted as SQL type datatype for that column automatically.

    In your case your source is csv file, that means all columns in file by default will come as string type. So, date column also will come as string into dataflow. Making sure to use a derived column transformation on top of date column to convert its type to date and then load into SQL table will help here.

    Check this video to know about derived column transformation.

    223245-image.png

    Hope this helps. Please let us know if any queries.

    -----------

    Please consider hitting Accept Answer and Up-vote. Accepted answers help community as well.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.