question

samnick-7321 avatar image
0 Votes"
samnick-7321 asked ·

Fixing Timespan DataType error in ADF

Hi ,
I am loading data from Salesforce to a Azure SQL via a simple Copy data activity. I have a precopy script to drop the destination table and reload the table from Salesforce. But i keep getting the below error.

ErrorCode=TypeConversionNotSupportedDataTypes,Exception occurred when converting value '' for column name 'Rep_Call_time__C' from type 'TimeSpan' (precision:12, scale:3) to type 'DateTime' (precision:23, scale:3)

Since i am dropping and recreeating the table, how can I update the datatype of the destination table ? Also to what should it be modified to?

azure-data-factory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KranthiPakala-MSFT avatar image
0 Votes"
KranthiPakala-MSFT answered ·

Hi @samnick-7321,

Thanks for reaching out.

As per the error message, it looks like you are trying to convert a TimeSpan data type to DateTime datatype. And as per the ADF documentation below are supported Data type mapping for Salesforce and I don't see a TimeSpan datatype called out. Hence assuming it is not supported and which is why you are receiving this error.


79239-image.png

Unfortunately this is ADF's limitation, Product team suggest customers to consider changing the Salesforce type (`TimeSpan`) of that column to the one that is supported by ADF's Salesforce connector. Please refer to this doc for a list of supported Data type mapping for Salesforce : Data type mapping for Salesforce

If possible try to convert your source column data type to one of ADF supported Data types for Salesforce.


Additional info: Also please refer to this stackoverflow thread which has a discussion about why it is not possible to convert TimeSpan to a DateTime : https://stackoverflow.com/questions/10276228/timespan-to-datetime-conversion

Hope this info helps.



Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.




image.png (28.4 KiB)
· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @samnick-7321,

Just checking in to see if the above suggestion was helpful. If it answers your query, please do click “Accept Answer” and/or Up-Vote, as it might be beneficial to other community members reading this thread.

And, if you have any further query do let us know.

Thank you

0 Votes 0 ·

Hi @samnick-7321,

We still have not heard back from you. Just wanted to check if the below suggestion was helpful? If it answers your query, please do click “Accept Answer” and/or Up-Vote, as it might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

0 Votes 0 ·