Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to create context variable and want to use in tMap to remove hard coding from my talend job. I saw multiple example, everywhere context group has three tabs namely Variable, Value as tree, value as table whereas there is no such tab in my case. PFA screen shot.
How to create context varaible in Talend 6.2.1 and how we can use them in tMap?
Another requirement is to create context variable and store path in it. Read that path from context variable while create metadata of flat file. Is that possible? If yes, how?
Hi,
Hit the + sign at the bottom left to add a context variable then enter name, type and value.
This will populates variable for default context.
Hit the + sign at the upper right to add a new context (corresponding to different execution environment).
Context variable can be used almost everywhere (not only tMap) using "context.myVariable".
Context variable are populated at runtime (when job starts). They are not available when defining repository elements.
Regards,
If you want to create a context variable that is local to your job, click the green plus button at the bottom left in your screenshot. Give the new variable a name, type, and optional comment and default. To reference the variable in your job, type context.varName (e.g. if your variable is named basePath: context.basePath)
I created metadata using wizard and there we have to select filename with path. Can we use context variable there or is there any way we create automated metadata using context variable?
As said, I think you cannot use context variables for this purpose
Can we use context variables while saving output using tFileOutputDelimiter?
As said, context variable can be used almost everywhere (not only tMap) using "context.myVariable".
Are you asking if you can create a File metadata entry and reference a context variable for the path and filename?
Once the context variable has been created is there a way to "publish" it so it gets listed when you use keystroke Control+spacebar