Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
karthik_T
Contributor
Contributor

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

Labels (2)
5 Replies
nivedhitha
Creator III
Creator III

 

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";

dipanjan93
Contributor
Contributor

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.

akumar2301
Specialist II
Specialist II

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

https://help.talend.com/reader/JdTBzKszzXoWvjpEJD3EBA/0lPtF5eayDI~33QdLfRY~A
karthik_T
Contributor
Contributor
Author

Hi   dipanjan93,

 

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

 

Thanks.

dipanjan93
Contributor
Contributor

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.