1
votes

I have a copy activity in Azure Data Factory that takes CSV file as source and SQL table as destination.

Source data type is 'string' and destination is 'Decimal'

Let's take an example of source value ,

100612324864664000.00

This is the error message I am getting ,

Message=Column 'xyz' contains an invalid value '1.0061232486466467E+17'.,Source=Microsoft.DataTransfer.ServiceLibrary,''Type=System.ArgumentException,Message=Input string was not in a correct format.Couldn't store <1.0061232486466467E+17> in xyz Column. Expected type is Decimal.

2

2 Answers

1
votes

I tested your description and it works for me.

Source dataset:

enter image description here

Sink dataset:

enter image description here

Pipeline mapping:

enter image description here

Result:

enter image description here

1
votes

Have the same problem. You need to use 'format' in your "toDecimal" method. eg:

toDecimal("123.45",10,4,'#.##')