Data Factory - Copy Activity - DateTime Format not applied

Alessandro Cerrato 1 Reputation point
2022-02-18T09:41:37.577+00:00

In a copy activity in which:
Source is a ADFS Gen2 file
Destination is a Snowflake table
the date format specified is not applied and data are wrongly loaded on the target table

Mapping
175746-mapping.jpg

Data Source

key;value;date;timestamp;num;double
A1;A0001;2022-01-21;20220121134532;5;10.1
B1;B0001;2022-01-22;20220122213443;4;-7

Target Result
175834-targetresult.jpg

Thanks for your help

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

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 32,906 Reputation points Microsoft Employee
    2022-02-21T10:50:27.617+00:00

    Hi @Alessandro Cerrato ,
    Welcome to Microsoft Q&A platform and thanks for posting your query.

    As I understand your query , data is not consistent when you try to map column 'Timestamp' with datatype as datetime in copy activity where your target is snowflake table.

    • As a workaround, could you please try using Additional column option in the Source tab and add dynamic content as formatDateTime(Timestamp,'yyyy-MM-dd HH:mm:ss')
      176375-image.png
    • Then, go to the mapping tab, and Add new mapping and select the additional column you created
    • Delete the already defined mapping for Timestamp column which was auto-generated.

    176295-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

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.