One Star

External configuration file

Hi people Smiley Happy
I am wondering is thare any easy way to store job variables (configuration) in external config file, so I'll be able to change (for example) input and output directories, db connections etc. withot changing complete job, just config file.


Regards!
4 REPLIES
One Star

Re: External configuration file

Hi
You might use the tContextLoad component.
Regards,
Pedro
One Star

Re: External configuration file

I am using this schema
tFileInputDelimited--row11-->tContextLoad--onComponentOk-->MsgBox(context.test)
but I am getting this error 'test cannot be resolved or is not a field'.
In input file I have 3 rows:
test;testing
nTest;nTesting
mTest;mTesting
One Star

Re: External configuration file

Hi
Have you added a context variable called test in your job?
According to the data in delimited file, you need to add three context variables(test, nTest, mTest).
Regards,
Pedro
One Star

Re: External configuration file

Thank you good sir! You introduced me to the magic world of contexts Smiley Tongue
Basically, creating a context group, defining few variables and linking context with job is answer for my question. I've just find that exported Talend job keeps context variables in file ~\\talenddemosjava\job_name\contexts\Default.properties which I can change as I wont.

Best regards!