Copy Activity Failing in Synapse for Flat File

MADHUSUDAN PANWAR 86 Reputation points


I'm trying to copy a flat csv file from ADLS2 to SQL table (dedicated sql pool) using COPY DATA Activity in Azure Synapse.
I have one source field in the format DD/MM/YYYY and during mapping it's showing warning as shown in pic1. 255152-image.png

I am able to see the data in preview source but during the actual run it's failing due to typeconversionerror. Can someone please tell me how to fix this? My trarget column is of 'DATE' datatype.


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.
4,558 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,913 questions
{count} votes

Accepted answer
  1. KranthiPakala-MSFT 46,432 Reputation points Microsoft Employee


    Thanks for the question and using MS Q&A platform.

    Firstly, appreciate much for attaching the samples which helped to reproduce the issue.

    You were on spot and very close to resolve the issue. Please use dd/MM/yyyy in Type Conversion settings instead of DD/MM/YYYY which should help resolve the issue.


    I tried to reproduce the issue with the samples provided and issue resolved with above settings.


    Hope this helps. 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

1 additional answer

Sort by: Most helpful
  1. Ronen Ariely 15,101 Reputation points


    I am able to see the data in preview source

    Not accurate! In fact, this is the source of the confusion.

    What you see is a client side "interpretation" of the data. You see text and dates.

    The server is trying to CONVERT the text from the file into the right data type. In this case it try to CONVERT the text to a DATE, but since you did not inform the server what is the format of your information, it fails in the CONVERT. In other words, the server tried to guess what is the style of the format without success since it is not fit the default style.

    For more information regarding style of text which represent date, check this page:

    So... What is the solution

    You should inform the server what is your format using the parameter FILE_FORMAT and a file which include the format of your csv

    The following doc can help you create the format file. Notice that you need to configure the parameter of DATE_FORMAT