Data flow parameters
I have worked on LAE before and have use "Graph Level Parameters" to stor such information as From/To Dates so i don't need to hardcode them at node level.
How is this implemented in Data3Sixty? I want to configure a node (Filter/Transform) to select records from a particular date range stored at dataflow level.
Regards
Mick Slowey
-
Hi Mick,
the approach is using the Transform node is pretty similar to what you would have previously done.
First click on the canvas (which will display the Run properties in the panel). Then Click on the Define tab in the Properties panel. Click on the 'Create property group' button and give the 'New Group 1' property group a suitable name if required (= "General" in my example). Then create some data flow properties in the group ("From_Date" and "To_Date" in the example).
Switch back to the Configure tab and you should see the newly created Data Flow level properties. Populate the properties with some values.
Then, within the Transform node you can use textual substitution to get the value of the properties. As they are constants you can include any required code in the ConfigureFields Script as this is processed once when the node starts to run, and before any records are processed.
In the above script the date format string is defined and the 'start_date' and 'end_date' properties are generated from the data flow property values. The name of the field to be tested is also specified in the script (just to centralize the value here rather than specify it multiple times in the ProcessRecords script).
The ProcessRecords script then defines the conditions when the record will be output.
In the case of a Filter node, you cannot specify the use of Data Flow property values in the simple grid - you have to use the Advanced functionality - but you can still use the grid to help with the configuration. The first step is to add the Filter node to the canvas, connect it up and then create two filter criteria in the grid with dummy date values.
Switch to the Advanced tab and replace the dummy dates with the property references:
There is no option to configure 'Mandatory' validation on the Data Flow property values to check they have been set but you can, if required, include some validation code in Transform node's ConfigureFields script or in the Advanced tab of the Filter node (e.g. within an if node.firstExec: statement block).
Attached is an example data flow corresponding to the above (requires v.3.5.1).
Attached files
Please sign in to leave a comment.
Comments
2 comments