Issue update

Support/help with CloverETL implementation problems

Posts: 1
Joined: Mon Apr 10, 2017 12:00 pm

Issue update

Postby trabz » Tue Apr 11, 2017 8:35 am

Good Day,

Is it possible to retrieve the graphname in a Transformation? For our application, we have audit fields to store which object created or last updated a row, and rather than hard coding a graph name that may or not be maintained, I would rather retrieve it from the system.

It appeared getGraph().getGraphProperties().getProperty("JOB_FILE") had some promise, but in a transformation it returns a Function 'getGraph' is not declared error message.

Any guidance would be appreciated.

Infos Sonnenschirm / Gartenmöbel Schweiz

Posts: 38
Joined: Fri Nov 04, 2016 8:51 am

Re: Issue update

Postby jandikovae » Thu Apr 13, 2017 8:24 am


Yes, exactly, for retrieving the graph name in a Transformation we are using parameter JOB_FILE or GRAPH_FILE (both mean the same in a graph). You can work with each of them the same way as you would with any other parameter without explicitly defining it.

In means that you don't need to worry about the Java code at all and in order to get the graph name you can use the following in you CTL transformation (e.g. in Reformat component):

Code: Select all

$out.0.graphName = "${GRAPH_FILE}";

It will get a path to the graph location within the current project (something like "graph/getnamegraph.grf") and store it into the "graphName" field.

In addition, you can also apply following functions to the parameter:

Code: Select all

$out.0.graphname = getFileName("${GRAPH_FILE}"); // the result from the example above would then be "getnamegraph.grf" or

$out.0.graphname = getFileNameWithoutExtension("${GRAPH_FILE}"); //result "getnamegraph"

Please let me know if this meets your requirements or if further assistance is needed.

Thanks. Best Regards.

Eva Jandikova
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at
How to speed up communication with CloverCARE support