Vous êtes sur la page 1sur 2

Lets assume we have a Job with a Script & Workflow in it. Again the Workflow contains a Dataflow in it.

Open the Job. Next first thing you do is go to Tools -> Variables. This will open theVariables and
Parameters window. This is the place where we will define and initializeVariables and Parameters.

First observe that this window have two tabs one is the Definitions and other is Calls. Also at the top observe
the Context, which displays the scope of the object defined.

There are there types of object we can use:
Global Variable which is defined and initialized and can used anywhere inside the Job, Workflow as well as at
the Dataflow level.
Local Variable can defined at the Job and Workflow level. Local Variables are initialized within Scripts.
Parameters are defined at the Workflow and Dataflow level. Parameter values are set from the Calls tab of the
Parent level Context. Three types of Parameters are Input, Output, Input/Output.

Difference between locale variables and parameters followed by how to pass a value from a parent worflow to a child
dataflow ?
at Sunday, March 13, 2011
A - Difference between locales variables and parameters
Anyone who has been playing with variables and parameters might be tempted to say that locale variables and
parameters behave in a similar way

For example, in order to pass the value from a parent workflow locale variable to a parameter child dataflow, one
need to make sure to map the parameter from the child dataflow with the right local variable or parameter declared
in the variable and parameters window of the workflow

For variable and parameters differences and limitations exist:
1. Parameters: At workflow level or dataflow level they receive values either from other parameters or
locale variable which presume of course that these values are defined in a script transform or in variable and
''parameter window''
2. Local variables:At workflow level they might receive values from a parameter only via a script
tranform.
3. Locale variables and parameters are not used in the same location .If both can be declared and
used as argument values in the variable windows , only parameters can be used in the ''where clause'' of a
query transform and locale variable cannot be declared in a dataflow.
4. If local variables can be used as ''argument value'' in the variable window they are not called via a
''variable window''.
B How to pass a value from a parent workflow to a child dataflow (Parameter)
In the example below the parameter $NewParameter5 (Screen shot 1) is used in a where clause as a criteria . This
parameter has been declared at datastore level (child transform) and is called by its parent workflow TARGETABLE_WF
( Screen shot 4).
In the workflow TARGETABLE_WF $NewParameter5 is called and mapped with $NewParamater2 (it might have been
as well a locale variable) declared in TARGETABLE_WF.
In Screen shot 3 within a script transform the parameter $NewParameter2 is allocated with value 8 which will be
passed to $NewParameter5 in the TARGETABLE_WF variable and parameters window
Finally when the job is run (Screen shot 5) , $NewParameter5 fullfill his role of criteria and allow all the ''OBJECT_KEY
= 8'' to be selected .

Vous aimerez peut-être aussi