data type issue in adf pipeline

Ram Babu 75 Reputation points
2024-08-19T10:35:00.0266667+00:00

Hi Team,

when i use adf pipeline from salesforce as source and azure storage as sink, one table not loading and getting error like below

Failure happened on 'Source' side. ErrorCode=UserErrorFailedFileOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The file operation is failed, upload file failed at path: 'raw/sfdc/DatedConversionRate.txt'.,Source=Microsoft.DataTransfer.Common,''Type=System.FormatException,Message=String was not recognized as a valid DateTime.,Source=mscorlib,'

I have try to mapping in copy activity then all data types converting as string. Pls see below image.

User's image

How to handle this issue. all other tables are loading but this one facing problem. Pls have a look and advice.

I tried using data flow and data flow not supported to salesforce as source.

Thanks

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

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 23,096 Reputation points
    2024-08-19T11:23:54.1733333+00:00

    Try to explicitly set the type for each column like this :

    https://stackoverflow.com/questions/56948054/why-does-azure-data-factory-seemingly-insist-on-inserting-datetimes-as-string

    {"type": "Copy",
    
    "inputs": [
    
        {
    
            "name": "sourceDataset"
    
        }
    
    ],
    
    "outputs": [
    
        {
    
            "name": "sinkDataset"
    
        }
    
    ],
    
    "typeProperties": {
    
        "source": {
    
            "type": "SalesforceSource",
    
            "query": "SELECT Id, Name, CreatedDate FROM TableName"
    
        },
    
        "sink": {
    
            "type": "AzureBlobStorage",
    
            "format": {
    
                "type": "TextFormat",
    
                "columnDelimiter": ","
    
            },
    
            "writeBatchSize": 10000
    
        },
    
        "translator": {
    
            "type": "TabularTranslator",
    
            "mappings": [
    
                {
    
                    "source": {
    
                        "name": "CreatedDate",
    
                        "type": "DateTime"
    
                    },
    
                    "sink": {
    
                        "name": "CreatedDate",
    
                        "type": "DateTime"
    
                    }
    
                }
    
            ]
    
        }
    
    }
    ```}
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.