How to convert to datetime type in mapping?

Kakehi Shunya (筧 隼弥) 201 Reputation points
2022-11-14T07:25:24.357+00:00

I am developing a pipeline in Azure Synapse to convert a jason file downloaded via api call into a parquet.
The column names are lastModDate and lastModifiedDate and I want to store these in the sink as Datetime or DatetimeOffset type, but I got an error.
The data is converted correctly in the data preview, but what should I do in the copy activity?

260007-image.png
259986-image.png
260032-image.png

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.
1,559 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,375 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,625 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-11-15T06:42:28.753+00:00

    Hi @Kakehi Shunya (筧 隼弥) ,

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

    While loading source data to Sink you can define format of datetime data which you have in source to avoid formatting and conversion issues.

    Please check below screenshot, here we are defining source date format.
    260396-image.png

    Hope this helps. Kindly try above and let me how it goes.

    ----------

    Please consider hitting Accept Answer button. Accepted answers help community as well.


Your answer

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