Context Variable

Five Stars

Context Variable

HI Team,

 

I am having a doubt in passing value to context variable.

I am having a context variable named "I_From" which is of string type and i am giving dafault value as "2018-01-01"

Also Using the Implecit tContextLoad setting and am giving the filepath in which a file is placed.

In that file also am passing some values to the context variables, One of the context variable in that file is the same "I_From" .

 

My doubt is for the same variable the value is passed from file and also the default value assigned in context view,which value will be taken whether from file or value assigned in Context view.

 

NOTE: I checked the above scenario, for me it is taking the value from file eventhough it is assigned in context view, if the variable is not present in file then only the value from context view is taken.

 

Please clarify the above scenario.

 

Thanks-

Gayathri S


Accepted Solutions
Employee

Re: Context Variable

Hi Gayathri,

 

     The default values which you are assigning in the context view will be always replaced by the new values you are giving using Context load or through other components like tjava,tjavarow etc.

 

     The value in the context view will be assigned during the starting of a Talend Job. But during any point, if the value is being replaced by any means, the new value assigned in between your program will be the value for your context variable.

 

      Throughout the program if you are not modifying the value, the the original value in context view will be still available for usage.

 

       Hope I have answered your query :-)

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

 

 


All Replies
Employee

Re: Context Variable

Hi Gayathri,

 

     The default values which you are assigning in the context view will be always replaced by the new values you are giving using Context load or through other components like tjava,tjavarow etc.

 

     The value in the context view will be assigned during the starting of a Talend Job. But during any point, if the value is being replaced by any means, the new value assigned in between your program will be the value for your context variable.

 

      Throughout the program if you are not modifying the value, the the original value in context view will be still available for usage.

 

       Hope I have answered your query :-)

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

 

 

Five Stars

Re: Context Variable

Hi Nikhil,

 

Thanks for the reply.

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

Downloads and Trials

Test drive Talend's enterprise products.

Downloads