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

Six 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.

Nine 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
( Please mark the post as resolved if you found your solution )
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.

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.