Using Workflow Parameters and Variables to Write to a Dynamic Target File

Using Workflow Parameters and Variables to Write to a Dynamic Target File

Overview

Overview

You can use parameters and variables in a workflow designed in the Developer tool to make the workflow more flexible.
A workflow parameter is a constant value that you define before the workflow runs. Parameters retain the same value throughout the workflow run. You define the value of the parameter in a parameter file. The Data Integration Service applies parameter values when you run a workflow from the command line and specify a parameter file. When you create parameters in a workflow, you can run a workflow again with different parameter values. This can reduce the overhead of creating multiple workflows when only certain attributes of a workflow need to be changed.
For example, you create a workflow that includes a Notification task. You want the task to send an email to yourself as you test the workflow but send an email to an administrator when you run the workflow in production. You create a workflow parameter that defines the email address to which you want to send an email. Use the workflow parameter in the recipients field for the Notification task. Create one parameter file that sets the email address to your address. Create another parameter file that sets the email address to the administrator's address. When you run the workflow from the command line, use the appropriate parameter file for the workflow run.
A workflow variable represents a value that can change during a workflow run. Use workflow variables to reference values and record run-time information. A user-defined workflow variable captures task output or captures criteria that you specify. When you create a user-defined workflow variable, you enter an initial value. The Data Integration Service uses the initial value of the variable when the workflow starts. You add an Assignment task to the workflow to assign another value to the variable. The Data Integration Service uses the assigned value for the variable during the remainder of the workflow.
For example, you create a counter variable and set the initial value to zero (0). In the Assignment task, you increment the variable by setting the variable to its current value plus one (1).

0 COMMENTS

We’d like to hear from you!