在 ADFv2 中,我查找日期并将其传递给 Azure 函数。我可以像这样传递数据:
@activity('GetLastDateProcessed').output.firstRow.LastDateProcessed
但是,如果我将其嵌入到 JSON 字符串中,如下所示:
{"lastProcessDate":"@activity('GetLastDateProcessed').output.firstRow.LastDateProcessed"}
我得到这个 {"lastProcessDate":"@activity('GetLastDateProcessed').output.firstRow.LastDateProcessed"} 而不是 {"lastProcessDate":"2019-11-13"} 作为函数的输入。
最后我尝试使用参数也没有成功。
@concat('{"lastProcessDate":"', string(pipeline().parameters.lastProcessDate), '"}')
这里的问题是参数没有设置。我这样设置参数:
@activity('GetLastDateProcessed').output.firstRow.LastDateProcessed
However this is a default value and is never dynamically updated. If I can update this string then the @concat method will work, but haven't been able to figure out how to dynamically update a parameter for the pipeline.
另一个选择可能是管道变量,但我不知道如何引用该变量。
如何将字符串与动态内容连接在一起?