I am trying to find out a method on how to change the value of a parameter that I have defined and also how to create a new parameter dynamically using REFORMAT component in Clover ETL.
I have written small logic in my transform method which reformat component provides:
When I tried to find the list of available methods I was not able to get a method that helps me to update the value of my parameter PARAM_1. Please let me know if there is any method that helps me to achieve this?
Also if we change a parameter here, then can we control the visibility of the changed value in other subsequent child graphs?
If I have a parent graphs with multiple phases say phase-0 and phase-1, now if some child graph which is invoked by phase-0 has done the change, then can the components in phase-1 of parent graph still use old value?
Do we have any methods that allows us to create new parameters dynamically?
I am new to Clover ETL so I am facing difficulty in this, please help me.
Changing/adding parameters using CTL2 during run time is not supported because it is potentially dangerous. When modified parameter is used somewhere in graph, it may behave nondeterministically (it would behave differently when CTL code was executed before launching component or not).
For passing parameters to subgraphs is best possibility component http://doc.cloveretl.com/documentation/ … graph.html which allows you to pass parameters or set dictionary entries. This functionality is available only in commercial CloverETL Server Corporate+.
Thanks, but from the guide I came to know that we have code to add/replace parameters, so clover is allowing to change the parameter values. But when I tried to use the function getGraph() in my component it says the method is not available:
Properties may be added or replaced like this:
getGraph().getGraphProperties().setProperty("newProperty", value );
If you need to share some “parameters” among components of graph or across graphs and you need to change the values dynamically (say in a Reformat), use Clover’s dictionary. That is sort of dynamic lookup table (with typed values).
getGraph().getGraphProperties().setProperty("newProperty", value );
This construct is available only in Java (not CTL). So you would have to create Java class implementing RecordTransform.
See this piece of doc.
However that would not help you much as graph parameters/properties are resolved during graph init and are not updated during runtime. Think of it as a kind of
macro which modifies the “source code” just before it gets compiled into transformation graph representation. The only dynamic structure is dictionary (or lookup table).