ExecuteGraph runs graphs with user-specified settings and provides execution results and tracking details to output ports.
To be able to use this component, you need a separate jobflow license. Also, the component requires your project to be executed on CloverETL Server.
|Component||Same input metadata||Sorted inputs||Inputs||Outputs||Each to all outputs||Java||CTL||Auto-propagated metadata|
|Input||0||Input tokens with graph execution settings.||Any|
|Output||0||Execution information for successful graphs.||Any|
|1||Execution information for unsuccessful graphs.||Any|
The component can have a single input port and two output ports attached.
ExecuteGraph does not propagate metadata from left to right or from right to left. It propagates metadata of its templates.
|Graph URL||yes||A path to an executed graph.
Only a single graph can be specified in this attribute.
The value can be overridden by a value from input token, see the |
|Execution type||no||Specifies a type of execution - synchronous (sequential) or
asynchronous (parallel) execution model.
Can be overridden by a value from input token, see the ||synchronous (default) | asynchronous|
Maximal amount of time dedicated for a graph run;
by default in milliseconds, but other
time units may be used.
If the timeout interval elapses, the graph is aborted.
The value can be overridden by a value from input token, see the
Timeout attribute is ignored for asynchronous execution type. Use MonitorGraph component to watch the running graph.
|0 (unlimited) | positive number|
|Input mapping||no||Input mapping defines how data from an incoming token overrides default execution settings. See Input mapping.||CTL transformation|
|Output mapping||no||Output mapping maps results of successful graphs to the first output port. See Output mapping.||CTL transformation|
|Error mapping||no||Error mapping maps results of unsuccessful graphs to the second output port. See Error mapping.||CTL transformation|
|Redirect error output||no||
By default, results of failed graphs are sent to the second output port (error port).
If this switch is set to ||false (default) | true|
|Auto-propagate graph parameters||no||
Passes parameter values to executed graph (subgraph) without explicit mapping.
If a parameter exists in a both jobflow and executed graph and if the parameter is public in the executed graph, the parameter value is passed to the executed graph.
|No (default) | yes|
|Execution group||no||The name of execution group to which the executed graph belongs. An execution group can be used by KillGraph component as a named handler for a set of graphs to be interrupted.||string|
|Execution label||no||A text displayed in an execution view before a graph name.||E.g. MyLabel|
|Cluster node ID||no||A cluster node ID which will be used for execution of a graph.||string|
|Execute graph as daemon||no||By default, all graphs are executed in non-daemon mode, so none of them can live longer than the parent graph.
Clover server automatically ensures for finished jobs that
all non-daemon graphs are interrupted if they have not finished yet.
If you want to start a graph which can live longer than the parent graph,
set this switch to ||false (default) | true|
|Skip checkConfig||no||By default, the pre-execution configuration check of the graph is performed if and only if the check was performed on the parent job. This attribute can explicitly enable or disable the check.||boolean (default is inherited from parent job)|
|Stop processing on fail||no||By default, any failed graph causes the component to stop executing other graphs; information about skipped tokens is sent to the error output port. This behavior can be turned off by this attribute.||true (default) | false|
|Number of executors||no||
By default, graphs executed in synchronous mode are triggered one after the other - the next
graph is executed right after the previous one finished.
This option allows to increment the number of simultaneously running graphs.
The ||positive number (1 is default)|
|Locale||no||The default Locale of the executed graph.||locale ID, see List of all Locale|
|Time zone||no||The default Time Zone of the executed graph.||time zone ID, e.g. |
The ExecuteGraph component runs a graph with specific settings, waits for the graph to finish, and monitors the graph results and tracking information.
.sgrf files can be run by ExecuteGraph component as well as CloverETL graphs.
The component reads an input token, executes a graph based on incoming data values, waits for the graph to finish, and sends results to corresponding port. Results of a successful graph are sent to the first output port. Results of a failed graph are sent to the second output port (error port).
If the graph run was successful, the component continues with processing of next input tokens. Otherwise, the component stops executing other graphs, and from that moment on, all incoming tokens are ignored and information about ignored tokens is sent to the error output port. The behavior related to processing after the first graph failure can be changed via the Stop processing on fail attribute. If you set Stop processing on fail to false, the following graphs are executed.
In case no input port is attached, only one graph is executed with default settings specified in the component's attributes.
In case the first output port is not connected, the component just prints out the graph results to the log.
In case the second output port (error port) is not attached, first failed graph causes interruption of the parent job. If you use Redirect error output, the disconnected error port does not cause interruption of the parent job.
For a graph execution, it is necessary to specify a graph location. Optionally, you can set up an execution type, initial values of graph parameters and dictionary content, timeout, execution group and several other attributes.
Most of the execution settings can be specified on the component via component attributes described bellow. These settings could be considered as a default execution settings.
The default execution settings can be changed dynamically and individually for each graph execution based on the data from incoming token. Input mapping attribute is the place where this override is defined.
Right-click the component and click Open Graph to access the graph that is executed. Similarly, in the ExecuteJobflow and ExecuteProfilerJob components, there are the Open Jobflow and Open Profiler Job options.
The component supports synchronous (sequential) and asynchronous (parallel) graph execution.
synchronous execution mode (default) - the component blocks until the graph has finished processing, so graphs are monitored by this component until the end of run.
asynchronous execution mode - the component starts a graph and immediately sends the status information to the output. Graphs are only started by this component, the MonitorGraph component should be used for monitoring asynchronously executed graphs.
The Input mapping attribute allows to override the settings of the component based on the data from incoming token. Moreover, initial dictionary content and graph parameters of an executed graph can be changed in Input mapping.
Input mapping is a regular CTL transformation which is executed before each graph execution. An input token, if any, is only input for this mapping. The transformation's outputs consist of three records: RunConfig, JobParameters and Dictionary.
The RunConfig record represents execution settings. If a field of the record is not populated by this mapping, a default value from the respective attribute of the component is used instead.
|jobURL||string||Overrides the component attribute Graph URL.|
|executionType||string||Overrides the component attribute Execution type.|
|timeout||long||Overrides the component attribute Timeout.|
|executionGroup||string||Overrides the component attribute Execution group.|
|executionLabel||string||Overrides the component attribute Execution label.|
|clusterNodeId||string||Overrides the component attribute Cluster node ID.|
|daemon||boolean||Overrides the component attribute Execute graph as daemon.|
|skipCheckConfig||boolean||Overrides the component attribute Skip checkConfig.|
|locale||string||Overrides the component attribute Locale.|
|timeZone||string||Overrides the component attribute Time zone.|
Graph parameters passed to the executed graph. Primary way of definition of graph parameters is direct mapping to JobParameters record available in Input mapping dialog, where you can easily populate prepared graph parameters extracted from executed graph.
Graph parameters defined via this map have the highest priority. This map can be used in case the set of graph parameters is not available in design time of jobflow.
The JobParameters record represents all internal and external graph parameters of a triggered graph.
The Dictionary record represents input dictionary entries of a triggered graph.
JobParameters and Dictionary records are available in the transform dialog only if the component attribute Graph URL links to an existing graph which is used as a template for extraction of graph parameters and a dictionary structure. Only graph parameters and input dictionary entries from this graph can be populated by input mapping, no matter which graph will be actually executed in a runtime.
Output mapping is a regular CTL transformation which is used to populate a token passed to the first output port. The mapping is executed for successful graphs. Up to four input data records are available for this mapping.
If the output mapping is empty, fields of RunStatus record are mapped to output by name.
The input token configuring the graph execution. This record is not available for a component without an input connector. This record has Port 0 displayed in the Type column.
This is very helpful for passing through some fields from input token to output token.
RunStatus record provides information about graph execution.
|runId||long||Unique identifier of a graph run. In case of an asynchronous execution type, the value can be used for graph monitoring or interruption.|
|orignalJobURL||string||Path to an executed graph.|
|startTime||long||Time of graph execution.|
|endTime||long||Time of graph finish, or null for asynchronous execution.|
|duration||long||Graph execution time in milliseconds.|
|executionGroup||string||Name of execution group to which the executed graph belongs.|
|status||string||Final graph execution status (FINISHED_OK | ERROR | ABORTED | TIMEOUT | RUNNING for asynchronous execution).|
|errException||string||Cause exception for failed graphs only.|
|errMessage||string||Error message for failed graphs only.|
|errComponent||string||Component ID which caused graph fail.|
|errComponentType||string||Type of component which caused graph fail.|
The dictionary record provides content of output dictionary entries of the graph. This record is available for the mapping only if the Graph URL attribute refers to a graph instance which has an output dictionary entry.
The tracking record provides tracking information usually available only in the JMX interface of the running graph. This record is available for the mapping only if the Graph URL attribute refers to a graph instance.
Tracking fields available for a whole graph:
|startTime||long||Time of graph execution.|
|endTime||long||Time of the graph finish or null for the running graph.|
|executionTime||long||Graph execution time in milliseconds.|
|graphName||string||A name of an executed graph.|
|result||string||Graph execution status (FINISHED_OK | ERROR | ABORTED | TIMEOUT | RUNNING).|
|runningPhase||integer||An index of a running phase or null if the graph is already finished.|
Tracking fields available for a graph phase:
|startTime||date||Time of phase execution.|
|endTime||date||Time of the phase finish or null for running phase.|
|executionTime||long||Phase execution time in milliseconds.|
|memoryUtilization||long||Graph memory footprint (in bytes).|
|result||string||Phase execution status (FINISHED_OK | ERROR | ABORTED | RUNNING).|
Tracking fields available for a component:
|name||string||Name of the component.|
|usageCPU||number||Actual CPU time used by the component expressed by a number from interval (0, 1) (0 means 0% of CPU is used by the component, 1 means 100% of CPU is used by the component).|
|usageUser||number||Actual CPU time used by the component in user mode expressed by a number from interval (0, 1) (0 means 0% of CPU is used by the component, 1 means 100% of CPU is used by the component).|
|peakUsageCPU||number||Maximal CPU time used by the component expressed by a number from interval (0, 1) (0 means 0% of CPU is used by the component, 1 means 100% of CPU is used by the component).|
|peakUsageUser||number||Maximal CPU time used by the component in user mode expressed by a number from interval (0, 1) (0 means 0% of CPU is used by the component, 1 means 100% of CPU is used by the component).|
|totalCPUTime||long||Number of milliseconds of CPU time used by this component.|
|totalUserTime||long||Number of milliseconds of CPU time in user mode used by this component.|
|result||string||Component execution status (FINISHED_OK | ERROR | ABORTED | RUNNING).|
Tracking fields available for an input or output port:
|byteFlow||integer||A number of bytes passed through this port per seconds.|
|bytePeak||integer||Maximal byteFlow registered on this port.|
|totalBytes||long||A number of bytes passed through this port.|
|recordFlow||integer||A number of records passed through this port per second.|
|recordPeak||integer||Maximal recordFlow registered on this port.|
|totalRecords||long||A total number of records passed through this port.|
|waitingRecords||integer||A number of records cached on the edge connected to the port.|
|averageWaitingRecords||integer||An average number of records cached on the edge connected to the port.|
|usedMemory||integer||Memory footprint (in bytes) of the attached edge.|
Error mapping is a regular CTL transformation. The fields are the same as in the output mapping.
Error mapping is used only if the graph finished unsuccessfully and the second output port is populated instead of the first one.
If Error mapping is empty, fields of RunStatus record are mapped to output by name.
If you drag a
Since CloverETL 4.0.0-M2, you can set up the Execution label attribute.
Since CloverETL 4.1.0, you can auto-propagate graph parameters.
Since CloverETL 4.1.0, empty output mapping and error mapping work as mapping fields by name:
$out.0.* = $in.0.*; $out.0.* = $in.1.*;