azureazure-data-factory

ADF expression: array conversion to single quoted and comma separated string


I have a pipeline variable CurrentObjects that I need to pass to a notebook parameter as a string.

I am currently using: @join(variables('CurrentObjects'), ', ')

This returns: "object1, object2"

I need to return "'object1', 'object2'"

I tried using concat(''')..., but it gave error: String start single quote has no closing quote


Solution

  • Array variable Array Variable

    the expression

    @concat(concat('''',replace(join(variables('CurrentObjects'), ''''),'''',''',''')),'''')
    

    Output

    Output

    I Hope this helps.