Facing issue with Copy activity to convert string to date using custm mapping

AKYA 6 Reputation points
2022-06-06T14:37:39.74+00:00

Trying to convert string "20220611'(source value) to date "2022-06-11"(Sink datetype is date ) using custom mapping.

Source is SAP and sink( mysql).

{
"sink": {
"name": "LSDate",
"type": "Date",
"format": "YYYY-MM-DD"
},
"source": {
"name": "LSDate",
"type": "string"
}
}

but still am unable to convert from string 'YYYYDDMM' to Date 'YYYY-DD-MM' using custom mapping Copy activity.
I need to pass column name as dynamic. because have multiple tables and columns.

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

1 answer

Sort by: Most helpful
  1. Cheng, Vikki 10 Reputation points
    2023-10-14T18:24:33.46+00:00

    I wonder if this is solved or not? As I am having the same issue when using copy activity type conversion setting (Screenshot below). I was able to convert a valid date, but now facing issue when the source value is 00000000, which is not a valid date. How to convert/or allow the date column to contain null value? Any thoughts?

    User's image


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.