External properties file

One Star

External properties file

hi,
I have a flat file that needs to be loaded into the database. I can use talend open studio in my dev env where I can specify the location ("hard code"). This location will be different for my production environment. How can I specify the location in the properties file so that when my standlone job executes it looks into the properties file.
One Star

Re: External properties file

Define a context variable 'context.PROPSFILE' and set it to your default dev location (say C:\dev).
In the production environment, override the variable by passing in --context_param PROPSFILE=/opt/productionloc to the run script.
Another option is to set up dev, test, and prod contexts and store three different values in the job. Then, select the environment with --context.
Highlighted
One Star

Re: External properties file

thanks, but how can I use this context? - for example
I have my CSV file defined via metadata -> file delimited.
When I create a job and create a tfileinputdelimited
under the component basic settings -> filename/stream - i already see this been hard coded to my dev env.
do you an example anywhere i can take a look at?
One Star

Re: External properties file

ahh, just saw the tutorial section on Working with global context variables
http://www.talendforge.org/tutorials/tutorial.php?language=english&idTuto=34
Thanks
One Star

Re: External properties file

Employee

Re: External properties file

Thanks Carl for adding this interesting post!
Best,
Pcoffre.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog