Skip to content

Commit 89b6f75

Browse files
committed
Simplification pass
1 parent be0c847 commit 89b6f75

1 file changed

Lines changed: 44 additions & 44 deletions

File tree

articles/data-factory/how-to-expression-language-functions.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ ms.author: susabat
66
ms.reviewer: whhender
77
ms.subservice: orchestration
88
ms.topic: conceptual
9-
ms.date: 02/13/2025
9+
ms.date: 01/16/2026
10+
ai-usage: ai-assisted
1011
---
1112

12-
# How to use parameters, expressions and functions in Azure Data Factory
13+
# Use parameters, expressions, and functions in Azure Data Factory
1314

1415
[!INCLUDE[appliesto-adf-asa-md](includes/appliesto-adf-asa-md.md)]
1516

16-
In this document, we will primarily focus on learning fundamental concepts with various examples to explore the ability to create parameterized data pipelines within Azure Data Factory. Parameterization and dynamic expressions are such notable additions to ADF because they can save a tremendous amount of time and allow for a much more flexible Extract, Transform, Load (ETL) or Extract, Load, Transform (ELT) solution, which will dramatically reduce the cost of solution maintenance and speed up the implementation of new features into existing pipelines. These gains are because parameterization minimizes the amount of hard coding and increases the number of reusable objects and processes in a solution.
17+
This article focuses on fundamental concepts and examples that help you create parameterized data pipelines in Azure Data Factory. Parameterization and dynamic expressions add flexibility to ADF and can save time by allowing for more flexible Extract, Transform, Load (ETL) or Extract, Load, Transform (ELT) solutions. These features reduce solution maintenance costs and speed up the implementation of new features into existing pipelines. Parameterization minimizes hard coding and increases the number of reusable objects and processes in a solution.
1718

1819
## Azure Data Factory UI and parameters
1920

20-
If you are new to Azure Data Factory parameter usage in ADF user interface, please review [Data Factory UI for linked services with parameters](./parameterize-linked-services.md#ui-experience) and [Data Factory UI for metadata driven pipeline with parameters](./how-to-use-trigger-parameterization.md#data-factory-ui) for a visual explanation.
21+
If you're new to Azure Data Factory parameter usage in the ADF user interface, review [Data Factory UI for linked services with parameters](./parameterize-linked-services.md#ui-experience) and [Data Factory UI for metadata driven pipeline with parameters](./how-to-use-trigger-parameterization.md#data-factory-ui) for a visual explanation.
2122

22-
## Parameter and expression concepts
23+
## Parameter and expression concepts
2324

24-
You can use parameters to pass external values into pipelines, datasets, linked services, and data flows. Once the parameter has been passed into the resource, it cannot be changed. By parameterizing resources, you can reuse them with different values each time. Parameters can be used individually or as a part of expressions. JSON values in the definition can be literal or expressions that are evaluated at runtime.
25+
You can use parameters to pass external values into pipelines, datasets, linked services, and data flows. After you pass a parameter into a resource, you can't change it. When you parameterize resources, you can reuse them with different values each time. You can use parameters individually or as part of expressions. JSON values in the definition can be literal values or expressions that are evaluated at runtime.
2526

2627
For example:
2728

@@ -35,18 +36,18 @@ For example:
3536
"name": "@pipeline().parameters.password"
3637
```
3738

38-
Expressions can appear anywhere in a JSON string value and always result in another JSON value. Here, *password* is a pipeline parameter in the expression. If a JSON value is an expression, the body of the expression is extracted by removing the at-sign (\@). If a literal string is needed that starts with \@, it must be escaped by using \@\@. The following examples show how expressions are evaluated.
39+
Expressions can appear anywhere in a JSON string value and always result in another JSON value. Here, *password* is a pipeline parameter in the expression. If a JSON value is an expression, the body of the expression is extracted by removing the at-sign (\@). If you need a literal string that starts with \@, you need to escape it by using \@\@. The following examples show how expressions are evaluated.
3940

4041
|JSON value|Result|
4142
|----------------|------------|
4243
|"parameters"|The characters 'parameters' are returned.|
4344
|"parameters[1]"|The characters 'parameters[1]' are returned.|
44-
|"\@\@"|A 1 character string that contains '\@' is returned.|
45-
|" \@"|A 2 character string that contains ' \@' is returned.|
45+
|"\@\@"|A 1-character string that contains '\@' is returned.|
46+
|" \@"|A 2-character string that contains ' \@' is returned.|
4647

47-
Expressions can also appear inside strings, using a feature called *string interpolation* where expressions are wrapped in `@{ ... }`. For example: `"name" : "First Name: @{pipeline().parameters.firstName} Last Name: @{pipeline().parameters.lastName}"`
48+
Expressions can also appear inside strings. This feature is called *string interpolation* where expressions are wrapped in `@{ ... }`. For example: `"name" : "First Name: @{pipeline().parameters.firstName} Last Name: @{pipeline().parameters.lastName}"`
4849

49-
Using string interpolation, the result is always a string. Say I have defined `myNumber` as `42` and `myString` as `foo`:
50+
When you use string interpolation, the result is always a string. Let's say you define `myNumber` as `42` and `myString` as `foo`:
5051

5152
|JSON value|Result|
5253
|----------------|------------|
@@ -58,16 +59,17 @@ Expressions can appear anywhere in a JSON string value and always result in anot
5859
|"\@concat('Answer is: ', string(pipeline().parameters.myNumber))"| Returns the string `Answer is: 42`|
5960
|"Answer is: \@\@{pipeline().parameters.myNumber}"| Returns the string `Answer is: @{pipeline().parameters.myNumber}`.|
6061

61-
## Examples of using parameters in expressions
62+
## Examples of parameters in expressions
6263

6364
### Complex expression example
64-
The below example shows a complex example that references a deep sub-field of activity output. To reference a pipeline parameter that evaluates to a sub-field, use [] syntax instead of dot(.) operator (as in case of subfield1 and subfield2)
65+
66+
The following example shows a complex example that references a deep sub-field of activity output. To reference a pipeline parameter that evaluates to a sub-field, use [] syntax instead of the dot(.) operator (as in the case of subfield1 and subfield2).
6567

6668
`@activity('*activityName*').output.*subfield1*.*subfield2*[pipeline().parameters.*subfield3*].*subfield4*`
6769

6870
### Dynamic content editor
6971

70-
Dynamic content editor automatically escapes characters in your content when you finish editing. For example, the following content in content editor is a string interpolation with two expression functions.
72+
The dynamic content editor automatically escapes characters in your content when you finish editing. For example, the following content in the content editor is a string interpolation with two expression functions.
7173

7274
```json
7375
{
@@ -76,7 +78,7 @@ Dynamic content editor automatically escapes characters in your content when you
7678
}
7779
```
7880

79-
Dynamic content editor converts above content to expression `"{ \n \"type\": \"@{if(equals(1, 2), 'Blob', 'Table' )}\",\n \"name\": \"@{toUpper('myData')}\"\n}"`. The result of this expression is a JSON format string shown below.
81+
The dynamic content editor converts the content above to the expression `"{ \n \"type\": \"@{if(equals(1, 2), 'Blob', 'Table' )}\",\n \"name\": \"@{toUpper('myData')}\"\n}"`. The result of this expression is a JSON format string, shown below.
8082

8183
```json
8284
{
@@ -85,9 +87,9 @@ Dynamic content editor converts above content to expression `"{ \n \"type\": \"
8587
}
8688
```
8789

88-
### A dataset with parameters
90+
### A dataset with parameters
8991

90-
In the following example, the BlobDataset takes a parameter named **path**. Its value is used to set a value for the **folderPath** property by using the expression: `dataset().path`.
92+
In the following example, the BlobDataset takes a parameter named **path**. Its value sets a value for the **folderPath** property by using the expression: `dataset().path`.
9193

9294
```json
9395
{
@@ -110,9 +112,9 @@ In the following example, the BlobDataset takes a parameter named **path**. Its
110112
}
111113
```
112114

113-
### A pipeline with parameters
115+
### A pipeline with parameters
114116

115-
In the following example, the pipeline takes **inputPath** and **outputPath** parameters. The **path** for the parameterized blob dataset is set by using values of these parameters. The syntax used here is: `pipeline().parameters.parametername`.
117+
In the following example, the pipeline takes **inputPath** and **outputPath** parameters. The **path** for the parameterized blob dataset is set by using the values of these parameters. The syntax used here is: `pipeline().parameters.parametername`.
116118

117119
```json
118120
{
@@ -162,16 +164,13 @@ In the following example, the pipeline takes **inputPath** and **outputPath** pa
162164
}
163165
```
164166

165-
166-
## Calling functions within expressions
167+
## Call functions within expressions
167168

168-
You can call functions within expressions. The following sections provide information about the functions that can be used in an expression.
169+
You can call functions within expressions. The following sections provide information about the functions that you can use in an expression.
169170

170171
### String functions
171172

172-
To work with strings, you can use these string functions
173-
and also some [collection functions](#collection-functions).
174-
String functions work only on strings.
173+
To work with strings, you can use these string functions and also some [collection functions](#collection-functions). String functions work only on strings.
175174

176175
| String function | Task |
177176
| --------------- | ---- |
@@ -190,8 +189,7 @@ String functions work only on strings.
190189

191190
### Collection functions
192191

193-
To work with collections, generally arrays, strings,
194-
and sometimes, dictionaries, you can use these collection functions.
192+
To work with collections, generally arrays, strings, and sometimes dictionaries, you can use these collection functions.
195193

196194
| Collection function | Task |
197195
| ------------------- | ---- |
@@ -208,7 +206,7 @@ and sometimes, dictionaries, you can use these collection functions.
208206

209207
### Logical functions
210208

211-
These functions are useful inside conditions, they can be used to evaluate any type of logic.
209+
These functions are useful inside conditions. You can use them to evaluate any type of logic.
212210

213211
| Logical comparison function | Task |
214212
| --------------------------- | ---- |
@@ -224,13 +222,14 @@ These functions are useful inside conditions, they can be used to evaluate any t
224222

225223
### Conversion functions
226224

227-
These functions are used to convert between each of the native types in the language:
228-
- string
229-
- integer
230-
- float
231-
- boolean
232-
- arrays
233-
- dictionaries
225+
You can use these functions to convert between each of the native types in the language:
226+
227+
- string
228+
- integer
229+
- float
230+
- boolean
231+
- arrays
232+
- dictionaries
234233

235234
| Conversion function | Task |
236235
| ------------------- | ---- |
@@ -259,8 +258,9 @@ These functions are useful inside conditions, they can be used to evaluate any t
259258
| [xml](control-flow-expression-language-functions.md#xml) | Return the XML version for a string. |
260259
| [xpath](control-flow-expression-language-functions.md#xpath) | Check XML for nodes or values that match an XPath (XML Path Language) expression, and return the matching nodes or values. |
261260

262-
### Math functions
263-
These functions can be used for either types of numbers: **integers** and **floats**.
261+
### Math functions
262+
263+
You can use these functions for either type of number: **integers** and **floats**.
264264

265265
| Math function | Task |
266266
| ------------- | ---- |
@@ -301,18 +301,18 @@ These functions are useful inside conditions, they can be used to evaluate any t
301301

302302
## Detailed examples for practice
303303

304-
### Detailed Azure Data Factory copy pipeline with parameters
305-
306-
This [Azure Data Factory copy pipeline parameter passing tutorial](https://azure.microsoft.com/mediahandler/files/resourcefiles/azure-data-factory-passing-parameters/Azure%20data%20Factory-Whitepaper-PassingParameters.pdf) walks you through how to pass parameters between a pipeline and activity as well as between the activities.
304+
### Azure Data Factory copy pipeline with parameters
307305

308-
### Detailed Mapping data flow pipeline with parameters
306+
This [Azure Data Factory copy pipeline parameter passing tutorial](https://azure.microsoft.com/mediahandler/files/resourcefiles/azure-data-factory-passing-parameters/Azure%20data%20Factory-Whitepaper-PassingParameters.pdf) walks you through how to pass parameters between a pipeline and activity, and also between activities.
309307

310-
Please follow [Mapping data flow with parameters](./parameters-data-flow.md) for comprehensive example on how to use parameters in data flow.
308+
### Mapping data flow pipeline with parameters
311309

312-
### Detailed Metadata driven pipeline with parameters
310+
Follow the [Mapping data flow with parameters](./parameters-data-flow.md) guide for a comprehensive example of how to use parameters in data flow.
313311

314-
Please follow [Metadata driven pipeline with parameters](./how-to-use-trigger-parameterization.md) to learn more about how to use parameters to design metadata driven pipelines. This is a popular use case for parameters.
312+
### Metadata driven pipeline with parameters
315313

314+
Follow the [Metadata driven pipeline with parameters](./how-to-use-trigger-parameterization.md) guide to learn more about how to use parameters to design metadata driven pipelines. This is a common use case for parameters.
316315

317316
## Related content
317+
318318
For a list of system variables you can use in expressions, see [System variables](control-flow-system-variables.md).

0 commit comments

Comments
 (0)