Forum Discussion

WilliamBrown's avatar
WilliamBrown
Frequent Visitor
2 years ago

Copy data step error copying data from date to date fields

After importing data to a staging table, I am attempting to just append it to a fact table.  The process is a simple append from table to table with a partition of DateKey.  The tables share the same schema.  

Mapping:  

               {
                    "source": {
                        "name": "DateKey",
                        "type": "Date"
                    },
                    "sink": {
                        "name": "DateKey",
                        "physicalType": "date"
                    }
                }
 
 
No matter what I do - I get a type conversion error 

TypeConversionFailure,Exception occurred when converting value '01/05/2024 00:00:00' for column name 'DateKey' from type 'Date' (precision:, scale:) to type 'String' (precision:, scale:). Additional info: Specified cast is not valid.",  

Not certain why it is casting to string.  

4 Replies

  • v-cboorla-msft's avatar
    v-cboorla-msft
    Microsoft Employee

    Hi WilliamBrown 

     

    Apologies for the inconvenience.

    Please reach out to our support team to gain deeper insights and explore potential solutions. It's highly recommended that you reach out to our support team. Their expertise will be invaluable in suggesting the most appropriate approach.

    Please go ahead and raise a support ticket to reach our support team:

    https://support.fabric.microsoft.com/support

    After creating a Support ticket please provide the ticket number as it would help us to track for more information.

     

    Thank you.

    • v-cboorla-msft's avatar
      v-cboorla-msft
      Microsoft Employee

      Hi WilliamBrown 

       

      We haven’t heard from you on the last response and was just checking back to see if you've had a chance to submit a support ticket. If you have, a reference to the ticket number would be greatly appreciated. This will allow us to track the progress of your request and ensure you receive the most efficient support possible.

       

      Thank you.

  • WilliamBrown's avatar
    WilliamBrown
    Frequent Visitor

    Just wanted to let people know the resolution.  I landed the data into a table with datekey set to text, then appended the data to the permanent table, and converted it to Date Format in the destination table.