Rediger

Del via


System variables supported by Azure Data Factory and Azure Synapse Analytics

APPLIES TO: Azure Data Factory Azure Synapse Analytics

Tip

Try out Data Factory in Microsoft Fabric, an all-in-one analytics solution for enterprises. Microsoft Fabric covers everything from data movement to data science, real-time analytics, business intelligence, and reporting. Learn how to start a new trial for free!

This article describes system variables supported by Azure Data Factory and Azure Synapse. You can use these variables in expressions when defining entities within either service.

Pipeline scope

These system variables can be referenced anywhere in the pipeline JSON.

Variable Name Description
@pipeline().DataFactory Name of the data or Synapse workspace the pipeline run is running in
@pipeline().Pipeline Name of the pipeline
@pipeline().RunId ID of the specific pipeline run
@pipeline().TriggerType The type of trigger that invoked the pipeline (for example, ScheduleTrigger, BlobEventsTrigger). For a list of supported trigger types, see Pipeline execution and triggers. A trigger type of Manual indicates that the pipeline was triggered manually.
@pipeline().TriggerId ID of the trigger that invoked the pipeline
@pipeline().TriggerName Name of the trigger that invoked the pipeline
@pipeline().TriggerTime Time of the trigger run that invoked the pipeline. This is the time at which the trigger actually fired to invoke the pipeline run, and it may differ slightly from the trigger's scheduled time.
@pipeline().GroupId ID of the group to which pipeline run belongs.
@pipeline()?.TriggeredByPipelineName Name of the pipeline that triggers the pipeline run. Applicable when the pipeline run is triggered by an ExecutePipeline activity. Evaluate to Null when used in other circumstances. Note the question mark after @pipeline()
@pipeline()?.TriggeredByPipelineRunId Run ID of the pipeline that triggers the pipeline run. Applicable when the pipeline run is triggered by an ExecutePipeline activity. Evaluate to Null when used in other circumstances. Note the question mark after @pipeline()

Note

Trigger-related date/time system variables (in both pipeline and trigger scopes) return UTC dates in ISO 8601 format, for example, 2017-06-01T22:20:00.4061448Z.

Schedule trigger scope

These system variables can be referenced anywhere in the trigger JSON for triggers of type ScheduleTrigger.

Variable Name Description
@trigger().scheduledTime Time at which the trigger was scheduled to invoke the pipeline run.
@trigger().startTime Time at which the trigger actually fired to invoke the pipeline run. This may differ slightly from the trigger's scheduled time.

Tumbling window trigger scope

These system variables can be referenced anywhere in the trigger JSON for triggers of type TumblingWindowTrigger.

Variable Name Description
@trigger().outputs.windowStartTime Start of the window associated with the trigger run.
@trigger().outputs.windowEndTime End of the window associated with the trigger run.
@trigger().scheduledTime Time at which the trigger was scheduled to invoke the pipeline run.
@trigger().startTime Time at which the trigger actually fired to invoke the pipeline run. This may differ slightly from the trigger's scheduled time.

Storage event trigger scope

These system variables can be referenced anywhere in the trigger JSON for triggers of type BlobEventsTrigger.

Variable Name Description
@triggerBody().fileName Name of the file whose creation or deletion caused the trigger to fire.
@triggerBody().folderPath Path to the folder that contains the file specified by @triggerBody().fileName. The first segment of the folder path is the name of the Azure Blob Storage container.
@trigger().startTime Time at which the trigger fired to invoke the pipeline run.

Note

If you are creating your pipeline and trigger in Azure Synapse Analytics, you must use @trigger().outputs.body.fileName and @trigger().outputs.body.folderPath as parameters. Those two properties capture blob information. Use those properties instead of using @triggerBody().fileName and @triggerBody().folderPath.

Custom event trigger scope

These system variables can be referenced anywhere in the trigger JSON for triggers of type CustomEventsTrigger.

Note

The service expects custom events to be formatted with Azure Event Grid event schema.

Variable Name Description
@triggerBody().event.eventType Type of events that triggered the Custom Event Trigger run. Event type is customer-defined field and take on any values of string type.
@triggerBody().event.subject Subject of the custom event that caused the trigger to fire.
@triggerBody().event.data._keyName_ Data field in custom event is a free from JSON blob, which customer can use to send messages and data. Please use data.keyName to reference each field. For example, @triggerBody().event.data.callback returns the value for the callback field stored under data.
@trigger().startTime Time at which the trigger fired to invoke the pipeline run.