Dynamic Context variables

Five Stars

Dynamic Context variables

Hi All,

 

I want to create Context variables Dynamically without using Context Group in job. Can any one help on this.

 

 

Thanks

Eight Stars

Re: Dynamic Context variables

 

Hi @karthik_T,

 

If you want to assign values dynamically to a context variable , then the only option is to create these variables in the context tab of the job. Create a variable, assign the type and leave the values blank.

From your job assign values using tjava component like this

context.yourContextVar = "theValueToBeAssigned";

Six Stars

Re: Dynamic Context variables

You could also load the context values from a text file or a database table using tFileInputDelimited or tDBInput-------> tContextLoad. This will dynamically load / modify the active context values.

Eleven Stars

Re: Dynamic Context variables

along with above options you also have implicite context option to load at run time.

https://help.talend.com/reader/JdTBzKszzXoWvjpEJD3EBA/0lPtF5eayDI~33QdLfRY~A
Regards
Abhishek KUMAR
Highlighted
Five Stars

Re: Dynamic Context variables

Hi   dipanjan93,

 

I want to declare the context variables without using context tab or context group.

 

Thanks.

Tags (1)
Six Stars

Re: Dynamic Context variables

I don't think it is possible in Talend. All you could do is hard code the values. Context variables just acts as an alias name in Talend as far as I've used them.

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download