CloverETL - Parameters (Workspace.prm)

Card Puncher Data Processing

Type

Cloveretl Outline Parameters

Type Scope Definition
Internal Graph Defined in the graph in the Parameters section of the Outline panel
Parameter File Global A file that contains the parameters

Special

  • Today, value:
return date2str(today(), "YYYY-MM-dd");

Hierarchy

Hierarchy of graph parameter definitions:

  1. Parameter from external parameter file specified at the start of graph execution by -cfg option
  2. Parameter defined at the start of graph execution by -P option
  3. Parameter from external parameter file that is linked to the graph during the graph development
  4. Internal graph parameter
  5. Environment variable

How to

  • Use a parameter in a transformation
$in.myParameter
  • in CTL, get their value via
getParamValue("MyParameter")
  • Pass a parameter in a runGraph component. JVM must be set to false.
test1.grf|"-P:my_param=my_value" "-P:another_param=value1"
test2.grf|"-P:my_param=my_value2" "-P:another_param=value2"

  • Set a parameter programmatically from a Reformat component with in-line Java code.
// Get a value from a data flow
String parameterValue = ((CloverString) getInputRecord(0).getField("myParameterNameColumn").getValue()).toString();
// or
String parameterValue = GetVal.getString(source[0],"myParameterNameColumn");
/** Set the parameter to which it is stored, "myParameterName" in this case.*/
getGraph().getGraphProperties().setProperty("myParameterName", parameterValue );

Workspace.prm

The parameters are stored in the file Workspace.prm

PROJECT= .
# (Please use slash '/' character as a path delimiter in all path specifications, 
e.g. C:/Users/username/workspace/project)
#Project properties
#Mon Jun 06 16:39:37 EDT 2011
CONN_DIR=${PROJECT}/conn
SEQ_DIR=${PROJECT}/seq
DATAOUT_DIR=${PROJECT}/data-out
GRAPH_DIR=${PROJECT}/graph
TRANS_DIR=${PROJECT}/trans
DATATMP_DIR=${PROJECT}/data-tmp
META_DIR=${PROJECT}/meta
LOOKUP_DIR=${PROJECT}/lookup
DATAIN_DIR=${PROJECT}/data-in
CONFIGIN_DIR=${PROJECT}/config-in

# Configuration parameters for running Endeca Data Store 
ENDECA_SERVER_HOST=localhost
ENDECA_SERVER_PORT=7770
DATA_STORE_NAME=quickstart

MULTIASSIGN_DELIMITER=

where we can find the:

Cloveretl Outline Parameter

You can define it by graph.

Cloveretl Graph Parameter File

Documentation / Reference







Share this page:
Follow us:
Task Runner