projectName in Routes

Highlighted
Seven Stars

projectName in Routes

Hi 

 

Quick Question.

 

Is the global variable "projectName" available in a cConfig in a route?

 

 

"contextStr" seems to be available with 

 

System.out.println(contextStr);

 

but I can't get the "projectName"

 

Thanks for any help

 

n

Tags (1)
Seven Stars

Re: projectName in Routes

Not sure if it is actually possible to get "projectName" direct.

 

However Talend have provided me a workaround as the package of a cConfig contains the projectName.

 

String talendProjectName = this.getClass().getPackage().getName().split("\\.")[0];

did this for me.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog