如何根据接收器中的参数设置文件名?

How to set the file name based on a parameter in the sink?

能否在映射数据流的sink中根据参数设置文件名? expression builder觉得这样还好,参数是drag-and-drop:able in the interface,但是当运行data flow in a pipeline时(就是把一个pipeline参数传入data flow parameter $OutFileName)它失败 "unsupported syntax in expression. Details:at Sink"

我尝试了表达式的不同变体,例如“{$OutFileName}”和 toString() 函数等等...

$OutFileName 是字符串类型的数据流参数吗?如果是这样,您在管道中所要做的就是在 activity 的参数设置中像这样设置它:(选择 "data flow expression")'myfile.txt'

接收器文件名的表达式必须包含单引号,这意味着您必须将它们包含在您传递的管道 expression/parameter 中 - 或者您必须包含 "Expression" un -检查管道中数据流 activity 的参数选项卡,因为它随后会添加引号。