Forum Discussion

Fabroulous's avatar
Fabroulous
New Member
1 year ago
Solved

Fabric Copy Activity (Data Pipeline) Reading Excel File Does NOT recognise Data Types

In Microsoft Fabric I have build a Data Pipeline that uses a Copy Activity to read an Excel in my DataLakehouse ( I have uploaded it there) But the Copy Activity doesn't reliably infer or recongize ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Fabroulous ,
    Thank you for reaching out to us on Microsoft Fabric Community Forum!

    Excel files may be tricky when used with Copy Activity in Microsoft Fabric. Even when a column clearly has numbers, Fabric might treat it as text due to how Excel handles formatting. There are a few ways to fix this and ensure your data types are set correctly:

    • Manually define data types in the Copy Activity.In the Copy Activity’s Source settings, go to the 'Schema' tab and manually set each column’s data type.
    • Use a Dataflow Gen2 to cast types with functions like toInteger() before loading.
    • Check your Excel formatting , make sure columns are set to "Number" before upload, or save as CSV for cleaner inference.

    Refer the document here for more understanding:
    https://learn.microsoft.com/en-us/fabric/data-factory/format-excel 
    https://learn.microsoft.com/en-us/fabric/data-factory/data-type-mapping 

     

    If this resolved your query,consider accepting it as solution.

    Regards,
    Pallavi.