DateTime source values showing as NULL in Azure Data Factory - Data Flows

Vivek Komarla Bhaskar 911 Reputation points
2023-03-22T23:15:04.3233333+00:00

Hi,

Is there a reason why my data flow cannot read/treat the DateTime input column?

In my source file, I have a column named 'Date' with DateTime values of format 'yyyy-MM-dd HH:mm:ss', but the data preview always shows NULL values. Hence, to fix this issue, I updated the type from the source projection (From Timestamp to varchar), and then added a derived activity to convert to timestamp, but even here I receive NULL results. I'm not sure what's wrong.

Screenshot 2023-03-22 at 8.37.55 pm

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,517 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Suba Balaji 11,186 Reputation points
    2023-03-23T14:46:35.72+00:00

    Hi @Vivek Komarla Bhaskar

    Can you please try this?

    First you need to tell the derived column about your current source date format, and then you can use toString with whatever format you want.

    toString(toTimestamp(Date,'yyyy-MM-dd HH:mm:ss'),'yyyy-MM-dd HH:mm:SS')

    Let us know how it goes.