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.
Highlighted
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.
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.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.