Skip to content

Commit 1d34ace

Browse files
authored
Merge pull request #100362 from djpmsft/docUpdates
adding parameterized column name example
2 parents 3bd6ce7 + 4b32500 commit 1d34ace

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed
40.4 KB
Loading
84.3 KB
Loading
-8.86 KB
Binary file not shown.
-9.15 KB
Binary file not shown.

articles/data-factory/parameters-data-flow.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
2-
title: Azure Data Factory mapping data flow Parameters
2+
title: Parameterizing mapping data flows
33
description: Learn how to parameterize a mapping data flow from data factory pipelines
44
author: kromerm
55
ms.author: makromer
6+
ms.reviewer: daperlov
67
ms.service: data-factory
78
ms.topic: conceptual
8-
ms.date: 06/10/2019
9+
ms.date: 01/07/2020
910
---
1011

11-
# Mapping data flow Parameters
12+
# Parameterizing mapping data flows
1213

13-
14-
15-
Mapping Data Flows in Azure Data Factory support the use of parameters. You can define parameters inside of your data flow definition, which you can then use throughout your expressions. The parameter values can be set by the calling pipeline via the Execute Data Flow activity. You have three options for setting the values in the data flow activity expressions:
14+
Mapping data flows in Azure Data Factory support the use of parameters. You can define parameters inside of your data flow definition, which you can then use throughout your expressions. The parameter values can be set by the calling pipeline via the Execute Data Flow activity. You have three options for setting the values in the data flow activity expressions:
1615

1716
* Use the pipeline control flow expression language to set a dynamic value
1817
* Use the data flow expression language to set a dynamic value
@@ -23,25 +22,33 @@ Use this capability to make your data flows general-purpose, flexible, and reusa
2322
> [!NOTE]
2423
> To use pipeline control flow expressions, your data flow parameter must be of type string.
2524
26-
## Create parameters in mapping data flow
25+
## Create parameters in a mapping data flow
2726

28-
To add parameters to your data flow, click on the blank portion of the data flow canvas to see the general properties. In the settings pane, you will see a tab called 'Parameters'. Click the 'New' button to generate a new parameter. For each parameter, you must assign a name, select a type, and optionally set a default value.
27+
To add parameters to your data flow, click on the blank portion of the data flow canvas to see the general properties. In the settings pane, you will see a tab called **Parameter**. Select **New** to generate a new parameter. For each parameter, you must assign a name, select a type, and optionally set a default value.
2928

3029
![Create Data Flow parameters](media/data-flow/create-params.png "Create Data Flow parameters")
3130

32-
Parameters can be utilized in any data flow expression. Parameters begin with $ and are immutable. You will find the list of available parameters inside of the Expression Builder under the 'Parameters' tab.
31+
## Use parameters in a mapping data flow
32+
33+
Parameters can be referenced in any data flow expression. Parameters begin with $ and are immutable. You will find the list of available parameters inside of the Expression Builder under the **Parameters** tab.
3334

3435
![Data flow parameter expression](media/data-flow/parameter-expression.png "Data flow parameter expression")
3536

36-
## Use parameters in your data flow
37+
You can quickly add additional parameters by selecting **New parameter** and specifying the name and type.
38+
39+
![Data flow parameter expression](media/data-flow/new-parameter-expression.png "Data flow parameter expression")
40+
41+
### Passing in a column name as a parameter
42+
43+
A common pattern is to pass in a column name as a parameter value. To reference the column associated with the parameter, use the `byName()` function. Remember to cast the column to its appropriate type with a casting function such as `toString()`.
3744

38-
* You can use parameter values inside of your transformation expressions. You will find the parameter list under the Parameters tab in the Expression Builder. ![Use Data Flow parameters](media/data-flow/params9.png "Use Data Flow parameters")
45+
For example, if you wanted to map a string column based upon a parameter `columnName`, you can add a derived column transformation equal to `toString(byName($columnName))`.
3946

40-
* Parameters are also used to configure dynamic values for your Source and Sink transformation settings. When you click inside of configurable fields, you will see the "Add dynamic contect" link appear. Clicking there will take you to an Expression Builder where you can use parameters to use dynamic values. ![Data flow dynamic content](media/data-flow/params6.png "Data flow dynamic content")
47+
![Passing in a column name as a parameter](media/data-flow/parameterize-column-name.png "Passing in a column name as a paramete")
4148

42-
## Set mapping data flow parameters from pipeline
49+
## Assign parameter values from a pipeline
4350

44-
Once you've created your data flow with parameters, you can execute it from a pipeline with the Execute Data Flow Activity. After you add the activity to your pipeline canvas, you will be presented with the available data flow parameters in the activity's 'Parameters' tab.
51+
Once you've created your data flow with parameters, you can execute it from a pipeline with the Execute Data Flow Activity. After you add the activity to your pipeline canvas, you will be presented with the available data flow parameters in the activity's **Parameters** tab.
4552

4653
![Setting a Data Flow parameter](media/data-flow/parameter-assign.png "Setting a Data Flow parameter")
4754

0 commit comments

Comments
 (0)