You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否将ADF管道RunID添加至Data Flow?求替代实现方法

能否将ADF管道RunID作为列添加到Data Flow?以及替代实现方法

Absolutely, you can add the ADF pipeline RunID as a column in your Azure Data Flow—though you can't reference it directly inside the Data Flow itself. The reason is that Data Flows run on a Spark cluster, which operates independently of the ADF pipeline's runtime context. But don't worry, there's a straightforward workaround using parameter passing:

Step 1: Create a parameter in your Data Flow

  • Open your Data Flow in the ADF studio.
  • Go to the Parameters tab (top-right corner, next to "Settings").
  • Click New parameter, name it something like pipelineRunID, set its type to String, and optionally add a description (e.g., "Stores the parent pipeline's RunID").

Step 2: Pass the pipeline RunID to the Data Flow activity

  • In your ADF pipeline, select the Data Flow activity that calls your flow.
  • Go to the Parameters tab in the activity settings.
  • For the pipelineRunID parameter you created, assign the dynamic value: @pipeline().RunId (this pulls the current pipeline's RunID at runtime).

Step 3: Add the RunID as a column in your Data Flow

  • Go back to your Data Flow, add a Derived Column transformation after your source dataset.
  • Create a new column (e.g., name it RunID).
  • Set the column's value to $pipelineRunID (Data Flow uses the $ prefix to reference parameters).
  • Connect this Derived Column step to your sink to include the RunID in your output data.

Quick Notes

  • When debugging the Data Flow directly (without running the pipeline), you'll need to enter a test string value for the pipelineRunID parameter—since there's no active pipeline context during debug mode.
  • Ensure the parameter type matches the value you're passing (String is the right fit for RunID, which is a GUID string).

内容的提问来源于stack exchange,提问作者Buckcra

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 07:49:31