#1 2007-11-23 10:11:02

Yong
Member
Registered: 2007-11-15
Posts: 12

Send parameter to job

Tags: [context, tos2.2.0]

I want to set the client host to a value other than the preset value ("localhost"). Can please advice how it should be set?

Configure it through the context/Default.properties file not seems work as the file will disappear after I restart the application.  In the Run tab, the Context tab is not editable.

Please advice.

Thanks.

Regards,
Yong

Offline

#2 2007-11-23 10:27:04

shong
Talend team
Registered: 2007-08-29
Posts: 10300
Website

Re: Send parameter to job

Hi

If you want to set the context value, you should set it in Contexts viewer, not in runjob viewer. Then, press Ctrl+Space bar to use the context.

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2007-11-23 10:40:17

Yong
Member
Registered: 2007-11-15
Posts: 12

Re: Send parameter to job

Hi Shong,

Ok. I can set the value in context tab. Can you advise, how should I set if I want to change the value of portStats to value other than "3334"?

From the java codes of the job, I can see the value can overridden if there is a parameter named "--state_port=XX" being assigned. But how should I pass in this parameter? I tried to change this value in the context/.properties file but it doesn't seems work.

Please advice.

Thanks.

Regards,
Yong

Last edited by Yong (2007-11-23 11:02:34)

Offline

#4 2007-11-23 11:03:36

shong
Talend team
Registered: 2007-08-29
Posts: 10300
Website

Re: Send parameter to job

Hi

how should I set if I want to change the value of portStats to value other than "3334"?

Do you want to change the port values to other values instead of 3334? if so, define a context 'port' in context viewer and set its values. Then, press Ctrl+Space bar and select: context.port in port fileds.

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#5 2007-11-23 11:43:01

mhirt
Talend team
Registered: 2006-09-19
Posts: 1638

Re: Send parameter to job

You can check the prompt checkbox in context view.
This will pop up a prompt before execution of the job in Talend where you can change temporary the default value of your context variable.

Regards,

Offline

#6 2007-11-23 11:43:20

Yong
Member
Registered: 2007-11-15
Posts: 12

Re: Send parameter to job

Hi,

Changes I make by press Ctrl + Space bar should be in the job.java file right?
I observed the changes make, cannot be saved. It will back to its default value : 3334 after I run / debug it.


How should I set the java file to take the value from the context view?

Please advice.

thanks.

Regards,
Yong

Last edited by Yong (2007-11-23 11:44:13)

Offline

#7 2007-11-23 11:52:15

shong
Talend team
Registered: 2007-08-29
Posts: 10300
Website

Re: Send parameter to job

Hi

Can you show a screenshot of your job ?

Best regards

          shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#8 2007-11-23 11:56:59

Yong
Member
Registered: 2007-11-15
Posts: 12

Re: Send parameter to job

Hi,

Which part of the job I should capture the screenshot for?
The java code part? context tab? or which part?

Please advice,
thanks.

regards,
yong

Offline

#9 2007-11-23 12:04:46

shong
Talend team
Registered: 2007-08-29
Posts: 10300
Website

Re: Send parameter to job

Hi

Your screenshots should contain context viewer, your job design and where would you use the context.


Best regards
     
        shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#10 2007-11-23 12:13:27

Yong
Member
Registered: 2007-11-15
Posts: 12

Re: Send parameter to job

Hi,

I'm still trying on the webservices. I suspect that the port and proxy I'm using is not allow me to access the web service. So I'm trying to change the port in the code by using the context. Not sure this will be the correct way to go.

Please advice.
Thanks.

Regards,
Yong


Uploaded Images

Offline

#11 2007-11-23 12:36:58

mhirt
Talend team
Registered: 2006-09-19
Posts: 1638

Re: Send parameter to job

You can change the default value in the Value as table or Value as tree tab of the context view.

Regards,

Offline

Board footer

Powered by FluxBB