One Star

[resolved] user input in runnable jar

I have the following :
tMSSqlInput -> tSortRow->tMap->tFileOutputExcel
In the tMSSqlInput, I use a context variable for the query :
Select ....
From ...
where Num = +context.num
this is working fine in Talend , when I run the job, it ask me to enter the value for num and I extract the good information.
I try to export this job as runnable jar.
When I run the runnable jar, it does nothing, it doesn't ask for anything.
Is there a way to do this, have a user input in the runnable jar
Thank you
Christophe
3 REPLIES
Community Manager

Re: [resolved] user input in runnable jar

Hi
Using a tmsgbox at the beginning of job to requires a input from user, please see my screenshot.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] user input in runnable jar

Thank you Shong - this is very good. You answered the exact question. However in the simple scenario the query can be amended as:
"...
where Num = " + ((String)globalMap.get("tMsgBox_1_RESULT"))

One less component. One less context var.
Of course if the "Num" needs to be used again, then the context var is better.
One Star

Re: [resolved] user input in runnable jar

I forgot to subscribe to my original message and see the answer just now
It is working fine, I took the second option as it is a simple job.
Thank you