External configuration file

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!
One Star

Re: External configuration file

Hi
You might use the tContextLoad component.
Regards,
Pedro
Highlighted
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!

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now