ADF Passing parameter to DataFlow issue

Necmi Kilic 31 Reputation points

Hi all,

I would like to pass output of web activity to dataflow using parameter. But I am getting the error "Incompatible data types between declared type and actual parameter value".


Here are my steps:

  • Declared a parameter with string type in dataflow


  • Assigned parameter's value from output of web activity (a REST call) with "@activity('ExternalFunction_T').output.Response"

Here is output of Web activity and inout of dataflow:

  • It throws the error below when I run the pipeline:

Job failed due to reason: "at Derive 'UnfoldNestedArrays'Parameter 'outputJsonData'(Line 12/Col 48): Incompatible data types between declared type and actual parameter value"

When invoking that line in derived column expression: unfold(split(dropRight(dropLeft($outputJsonData, 2), 2), '],['))

If I copy the output of web activity to parameter's value, it works fine. What can be the problem using $outputJsonData?

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

3 answers

Sort by: Most helpful
  1. Suba Balaji 10,106 Reputation points

    Hi @Necmikilic

    Thanks for providing screenshot with the details.

    On the right hand side, you pass the value as string, while on the left it is passed as array, and thats the reason for the error.

    Please try to convert the whole value to string before passing on to data flow parameter and let us know if that works.

    @ hide (activity('ExternalFunction_T').output.Response)


  2. Necmi Kilic 31 Reputation points

    What I want to do was exactly the link below:

    In this solution, I had started with a hardcoded string represented array of array value. I need to convert it to rows to save to a csv file or cache.

    But the value would come from Azure Function response like I shared. I need to pass this response to be parsed. Although my parameter type is String and convert the response to string, it still remains as array. Do you think unfold part must be changed?

  3. ShaikMaheer-MSFT 35,786 Reputation points Microsoft Employee

    Hi @Necmi Kilic ,

    Thank you for posting query in Microsoft Q&A Platform.

    Kindly use Set variable activity and set the web activity response string in to that and pass that variable as value to dataflow parameter. In data flow activity parameters tab uncheck expression checkbox.

    Passing strings to dataflows with quotes and slashes always little tricky. Kindly check below video if that helps to get idea about its behavior.
    Write dynamic expression for SQL with single quotes around parameter value in Mapping data flows

    Please let me know how it goes. If this helps please consider hitting Accept Answer button. Accepted answers helps community as well.