ming
ming

Reputation: 333

[Talend]How to define a global filed in a talend job

i create a talend job named aaa. talend will auto create code like:

public class aaa { 
     ...
     ...
     // TODO i want define a field
     private String name = "test";
}

how can i implement to define field name? ps: i don't want to use context or globalMap.

Upvotes: 0

Views: 171

Answers (1)

RealHowTo
RealHowTo

Reputation: 35372

Define a Routine, call it VALUES. In the VALUES routine, define your values in public static field.

package routines;

public class VALUES {
   public static String fubar="Hello World";
}

then in others components, you make a reference to the fubar field with VALUES.fubar

Upvotes: 2

Related Questions