Parameters play a very important role in reusability and configurability of dataflows. An extensive parameterization capability ensures that dataflows and workflows can be invoked in multiple situations, saving time and enhancing return on investment.
A common scenario would be if you wanted to use an existing dataflow for a file that has the same structure but data from a different source. This would be the perfect opportunity to use parameters.
In this example, we will change the source file to a different file and change the parameters to specify an effective date for our data quality rules.
We begin by dragging and dropping the parameter onto the dataflow, then open the parameter property dialog box.
We specify a new parameter and call it “effective date.” Chose the data type and give it a default value of December 31.
Once the specifications are set, the parameter is available for mapping.
In this example the data quality rule was working on property tax and checking whether the property tax was zero or not.
Now we want to add an effective date. We want to apply this parameter to our data quality rule to say that it won’t start until the effective date is matched and we want to specify this effective date from outside the dataflow. So we go ahead and do the mapping so the data quality rule has the effective date. Next, we go to the data quality rules dialog box and check “if effective date is greater than today, then always return true, otherwise, check for this rule.”
That means that it is going to check this rule only when it becomes effective. You can specify any effective date from outside now and control its behavior, so this data quality rule is now dependent on a specific date.
We can then take this file and in the job scheduler schedule a new job and point to the newly created dataflow with parameters. When we go to the job parameters tab we can see all the implicit and explicit parameters.
If we select our user-defined parameter, we can see the specified default value of December 31.
Say we decide we don’t want this rule to be effective until March 31. We can select that date from the calendar on the right side.
This tells the application not to use the data quality rule before March 31. That is how the behavior of the dataflow can be controlled from outside the dataflow.
Implicitly, the software has scanned and has figured out that the source has two file paths: loans and tax.
I can point to a different file and change to a different file path.
The same thing can be done on the destination side, enabling you to use the same flow for a totally different set of data.
You can see parameterization and other useful getting started videos on Astera TV at http://www.astera.com/astera-tv/getting-started.