Data type conversion in Azure Data Factory - csv

Adrian Searles 0 Reputation points
2024-03-28T20:00:03.83+00:00

I'm trying to push data to Salesforce through the Salesforce Connector. I am at the point where the data has been cleaned and transformed in several Data Flows and I am using a copy activity to sink the data to Salesforce. Originally I was using parquet files, But after several issues on the sink side I switched to CSV files. This resolved some errors I had but no I am dealing with formatting issues. I am confused as to why the data types are remembered inside data flows, but in the copy activity it lists all the fields as strings. This is causing me to not be able to send any dates or decimals to salesforce. How should I go about resolving this?

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

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 15,216 Reputation points
    2024-03-29T16:55:46.4833333+00:00

    Why don't you use Dataflows for data type transformation ?

    Inside Data Flows, before your Copy Activity, explicitly cast your fields to the required data types using derived columns or data type transformation features. Although the CSV source treats everything as a string, within a Data Flow, you can cast these strings to the appropriate data types needed by Salesforce.

    In this case you can preview the data to check if the transformations are correct in Data Flow and debugging it to confirm the output types match Salesforce expected types.