Parameterizing the Workflow
Let's consider a simple workflow: read the Demographics.csv
file, filter all data rows with Gender = M or F
, and replace M
or F
with Male
or Female
, respectively. Once we have decided whether to work on M
or F
, the workflow becomes quite simple and includes a File Reader, Row Filter, and String Manipulation node with the replace()
function:
- Let's add one node that allows us to choose whether to work on
M
orF
records: the String Configuration node. This node generates a flow variable. A flow variable is a parameter that travels with the data flow along the workflow branch and it can be used to overwrite settings in other nodes. - As far as we are concerned, for now, two settings are important in the configuration window of this node: the default value and the variable name. Let's use default value
M
for now, to work withGender = M
records, and let's name the flow variablegender_variable
. - Executing the node creates a Flow...