Share via

How to convert CSV time field convert into time in ADF? I don't have date with it.

RXR 121 Reputation points
2022-06-13T13:57:49.477+00:00

210847-image.png

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,822 Reputation points Microsoft Employee Moderator
    2022-07-01T22:19:08.647+00:00

    Hello @RXR ,

    Thanks for the clarification. I see that you are trying to copy Time value in string format from source to Time datatype column in your sink SQL table. Please correct if my understanding is incorrect.
    In order to avoid the conversion failures, you can utilize the Type conversions feature under copy activity mapping section as shown below and Format string when converting between time periods and strings, e.g. by using hh\:mm\:ss\ fffffff. And this help copy your source time values of type string to your destination column of type time.

    I have tested this in my environment and was able to copy successfully to SQL table column as expected.

    217047-image.png

    Below is the source and sink data structure for reference after executing the copy activity.

    217071-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
    0 comments No comments

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.