locked
How to copy NUMBER(30,8) RRS feed

  • Question

  • Hi,

    In the ADF copy activity you can specify which columns should be matched and for each database type it is using a mapping of data types.

    Now I have the problem that I want to copy data from Oracle to Azure SQL and one column is defined as NUMBER(30,8) and according to https://docs.microsoft.com/en-us/azure/data-factory/connector-oracle#data-type-mapping-for-oracle it is using internally in ADF a data type of STRING for this (because the precision is bigger than 28). And now I am getting the error message "The given value of type String from the data source cannot be converted to type decimal of the specified target column." which is understandable because internally I have STRING in ADF and my target DB column is specified as DECIMAL(30,8).

    So what can I do to get around this problem? Is there something that I can tell ADF to transform the STRING to a DECIMAL(30,8)?

    Cheers,

    Thomas

    Monday, January 21, 2019 12:49 PM

All replies

  • Hi,

    You can use a stored procedure to convert the data type(from String to Decimal) before storing it to Azure SQL. To read more about invoking stored procedures, have a look at this doc :

    https://docs.microsoft.com/en-us/azure/data-factory/connector-sql-server#invoking-stored-procedure-for-sql-sink

    Also, I found a similar issue that might be of help in your case as well :

    https://stackoverflow.com/questions/51412683/azure-data-factory-copy-activity-failed-mapping-strings-from-csv-to-azure-sql

    Let us know if this helps. Else we can gladly continue to probe in further.


    MSDN

    Tuesday, January 22, 2019 9:49 AM