Pipeline Expressions in Azure Data Factory

Pipeline expressions allow you to dynamically construct strings at runtime. You can use them to set property values, pass parameters, and control pipeline logic. Azure Data Factory supports a rich set of functions that can be used within expressions.

Overview

Expressions are string literals with an expression body enclosed in curly braces { }. The expression body can contain a combination of:

Common Functions

String Functions

Date and Time Functions

Array Functions

Collection Functions

Conditional Functions

System Variables

System variables provide context about the pipeline run. Some common ones include:

Examples

Concatenating strings and system variables

@concat('This is pipeline run ID: ', @pipeline().RunId, ' triggered at ', @formatDateTime(pipeline().TriggerTime, 'yyyy-MM-dd HH:mm:ss'))

Using parameters and conditional logic

@if(equals(pipeline().parameters.Environment, 'Production'), 'output/prod', 'output/dev')

Accessing activity output

@activity('CopyDataActivity').output.copy.source.effectiveIntegrationRuntime

Constructing a file path with a date

@concat('logs/', @formatDateTime(utcNow(), 'yyyy/MM/dd'), '/activity.log')

Best Practices