skip to Main Content

Hi I am new to Azure ADF and trying to copy additional column values to a table. While doing so sometimes I am getting NULL values from source but while adding that to destination table I get following error.

ErrorCode=TypeConversionFailure,Exception occurred when converting value ” for column name ‘clearingHouseContactTelephoneNumber’ from type ‘String’ (precision:, scale:) to type ‘Decimal’ (precision:10, scale:0). Additional info: The input wasn’t in a correct format.

I want to make sure if there is an empty field then I need to simply add NULL value to that field. However ‘NULL’ keyword is not acceptable in dynamic content. Please take a look at this example screenshot. example image

Please help me with adding NULL value to the table.

2

Answers


  1. You can use coalesce function and pass your dynamic value as first parameter and null as second parameter, this function will return the first not null value.

    image

    Login or Signup to reply.
  2. Using NULL in Azure ADF Dynamic content
    Using NULL in Azure ADF Dynamic content

    I tried to reproduce the error with similar dynamic content in copy activity and got similar error.

    enter image description here

    The reason of this error is the conversion of the string data type to decimal datatype.

    The workaround is to using DataFlow: If your data flow contains numerous data fields, you must create new columns or modify current ones using the derived column transformation.

    For more details, refer Derived column transformation in mapping data flow.

    You can even refer to this Microsoft Q&A post for more insights: Copy Task failure because of conversion failure

    follow below steps:

    • Create a data flow add your source to the dataset then create the derived column to get values from your expression.
      enter image description here
    • for derived column expression create a string parameter.
      enter image description here
    • Go back to pipeline click on dataflow under parameter you can see your parameter for the value select pipeline expression for this parameter and add your dynamic expression
      enter image description here
    • And now, run the pipeline.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search