...
Excerpt |
---|
May 23, 2006 |
...
|
So there have been a lot of questions lately regarding ETL management issues like: how do I move files, how do I use parameters, etc.
I'm happy to say that version 2.3.0 has gained a lot of functionality in that regard in the last 2 weeks.
In fact I've been working very hard to not only add support for dynamically setting variables, but also in making these variables local to a job in order not to have them influence each other. This is very important in the long run when we will be running several in-line jobs and transformations at the same time on the same virtual machine. (J2EE for example)
...
To allow you to set variables dynamically we constructed a new step "Set Variables". In the transformation shown below you can see how it's done.
Please note that the new "Set Environment Variables" step accepts exactly ONE row of data, no more. That would not make sense.
As you can see in the image, you can set the scope of the variable.
IMPORTANT: in version 3.0 we no longer recommend the use of the FIELD.dat2str() method. To calculate the date use the following piece of JavaScript code:
Using the variables
Variables can be used in many steps, mostly there is a "Variable..." button present next to the field.
The following 2 screenshots show the transformation and step that uses the variable we defined earlier:
As you can see in this transformation we collect the processed file names and send them to the next job entry.
Also, if you would run or preview this transformation in Spoon, a dialog will pop up to allow you to enter a value for TODAY.
This way you can test the transformation without running the complete job.
...