none
ADF Failure: Function "Length" expects its parameter to be array or string

    Question

  • I am trying to practice the below tutorial, facing below error message on second pipeline [IterateAndCopySQLTables ]. As per below tutorial, I have created parameter of type Array "tableList". Seeking help here.

    

    

    https://docs.microsoft.com/en-us/azure/data-factory/tutorial-bulk-copy-portal#create-the-pipeline-iterateandcopysqltables

    Activity IterateSQLTables failed: The function 'length' expects its parameter to be an array or a string. The provided value is of type 'Null'.


    • Edited by azureuser9 Monday, February 11, 2019 7:31 PM
    Monday, February 11, 2019 7:02 PM

All replies

  • Hi there,

    Looks like the parameter doesn't hold any value when the ForEach activity is invoked. 

    To narrow down to the exact issue, I would recommend making sure the following things are in place :

    • When setting parameter "tableList" in the pipeline "IterateAndCopySQLTables", the type is set to "Array".
    • In the forEach activity, the Items in the settings tab is set to "tableList" in the format "@pipeline().parameters.tableList". (Looks like there's a typo in the doc, it says parameter instead of parameters)
    • The query in the Lookup Activity is correct (you can test it using SQL Server Management Studio or on the portal using query editor.
    • In the parameters for the InvokePipeline activity, the parameter tableList is set to @activity('LookupTableList').output.value.

    MSDN

    Wednesday, February 13, 2019 10:32 AM
    Owner