[英]How to pass Tumbling Window parameters to a Data Factory pipeline in the Data Factory UI?
I have defined a pipeline in Azure Data Factory
with a Tumbling Window trigger, as seen below:我在Azure Data Factory
定义了一个带有 Tumbling Window 触发器的管道,如下所示:
I would like for my activities to receive the Tumbling window parameters ( trigger().outputs.windowStartTime
and trigger().outputs.windowEndTime
) however I did not find any examples in the documentation showing how to do this in the UI.我希望我的活动接收 Tumbling 窗口参数( trigger().outputs.windowStartTime
和trigger().outputs.windowEndTime
),但是我没有在文档中找到任何显示如何在 UI 中执行此操作的示例。
Question题
How can I pass the Tumbling Window parameters to a Data Factory pipeline in the Data Factory UI?如何将 Tumbling Window 参数传递到数据工厂 UI 中的数据工厂管道?
Assuming the pipeline that you're triggering is already paramaterised then you're nearly there.假设您触发的管道已经参数化,那么您就快到了。
When adding the trigger you'll see a second screen to pass parameters from the trigger.添加触发器时,您将看到第二个屏幕,用于从触发器传递参数。
You can then add your functions prefixed with @.然后,您可以添加以@ 为前缀的函数。 So:所以:
@trigger().outputs.windowStartTime
@trigger().outputs.windowEndTime
If you need to call a function on the parameter before you pass it you can do that too如果你需要在传递参数之前调用一个函数,你也可以这样做
@addHours(trigger().outputs.windowEndTime,1)
This answer is out of date.这个答案已经过时了。 Parameters can be added directly in the UI - see my answer above.可以直接在 UI 中添加参数 - 请参阅我上面的回答。
Note: You cannot pass the Tumbling Windows parameters to a Data Factory pipeline in the ADF UI.注意:您不能将 Tumbling Windows 参数传递到 ADF UI 中的数据工厂管道。
You need to pass the tumbling window parameters by following steps:您需要通过以下步骤传递滚动窗口参数:
First create a Tumbling window trigger as per your requirement.首先根据您的要求创建一个翻滚窗口触发器。
On the bottom left corner, you will find the " Triggers " tab => Click on Triggers and select the created trigger and click on " Code " and replace the parameters.在左下角,您会找到“触发器”选项卡 => 单击触发器并选择创建的触发器,然后单击“代码”并替换参数。
To use the WindowStart and WindowEnd system variable values in the pipeline definition, use your "MyWindowStart" and "MyWindowEnd" parameters, accordingly.要在管道定义中使用 WindowStart 和 WindowEnd 系统变量值,请相应地使用“MyWindowStart”和“MyWindowEnd”参数。
For more details, refer " MSDN " thread, which addressing similar issue.有关更多详细信息,请参阅解决类似问题的“ MSDN ”线程。
Hope this helps.希望这可以帮助。
This is because you set @trigger().outputs.windowStartTime
and @trigger().outputs.windowEndTime
in the variable.这是因为您在变量中设置了@trigger().outputs.windowStartTime
@trigger().outputs.windowEndTime
和@trigger().outputs.windowEndTime
。 In fact, you should set them in the parameter, like this:实际上,您应该在参数中设置它们,如下所示:
Please let me know if still facing issue.如果仍然遇到问题,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.