Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

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.
Labels (2)
5 Replies
Anonymous
Not applicable

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.
_AnonymousUser
Specialist III
Specialist III
Author

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?
_AnonymousUser
Specialist III
Specialist III
Author

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

Anonymous
Not applicable

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