Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Context_param in properties file for execution in commandLine

Hello,
I have a job with 2 parameters.
Actually, I execute the job by doing this :
jobname.bat --context_param param1=C:\TalendFiles\test.csv --context_param param2=toto
Is there possible to make Talend replace context parameters automatically with properties file?
For example , I make a properties file with my two parameters in and I give the path to the properties file in the commandLine?
example :
jobname.bat --context_properties C:\TalendFiles\job.properties
Do you know of it's possible?
Thank's for advance.
Labels (2)
15 Replies
Anonymous
Not applicable
Author

not sure if it is what you are looking for
i use a OS variable to keept the location of my properties file
set the job to load implicity context from the project menu (file > edit project settings > context loading > )
and i enter System.getenv("TALEND_INITIAL_CONTEXT") - System.getenv works on both windows and linux.
alevy
Creator III
Creator III

If you want to load the same context for many jobs, you can use the Project Settings to set the implicit context load settings jobs.

If all jobs have implicit context load so they can be run individually using context variables from a file but there is also a master job with implicit context load that calls all the other individual jobs, does the context file get read by each child job or just once for the master?
Anonymous
Not applicable
Author

hi alevy
I think there are many other threads in forum related to what you're asking (something about passing context from parent job to child job), so you might be better looking there. Anyway, the answer should be "yes to the second": if every job (parent and child) has the implicit context load set to on, then the context file is read by each child job and by the parent job too.
ciao
Anonymous
Not applicable
Author

Tks pti for the properties file explanation.
Anonymous
Not applicable
Author

Hi,
I am not able to access Hbase.It is showing 
: org.apache.hadoop.hbase.client.ZooKeeperRegistry - Can't retrieve clusterId from Zookeeper
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
I am not  able to figure out the hbase server and port.
Please help me on this.
raowaqasakram
Contributor III
Contributor III

thanks for detailed answer. You have saved my day. !