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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How do you pass a date context to talend job via command line

Hi,
How do you pass a date context to talend job via commandline? I was able to get it work in windows but not on unix.
For example, the following works (note I have to put double quotes):
job_test.bat --context_param some_date="2010-03-01 00:00:00"
But the same job running in unix doesn't:
./job_test.sh --context_param some_date="2010-03-01 00:00:00"
the return value is null
thanks!
Sarah
Labels (2)
4 Replies
Anonymous
Not applicable
Author

I got it work like this (as suggested in the topic http://www.talendforge.org/forum/viewtopic.php?id=7639)
./job_test_run.sh --context_param etl_started_at="yyyy-MM-dd;2010-03-01"
However, i can't get it to work with time portion. something like this
./job_test_run.sh --context_param etl_started_at="yyyy-MM-dd HH:mm:ss;2010-03-01 00:00:00"
Any idea? Thanks
Anonymous
Not applicable
Author

okay, after mucking around with it, finally got it to work. Seems like the format it accepts is:
./job_test_run.sh --context_param etl_started_at="yyyy-MM-dd-HH:mm:ss;2010-03-01-00:00:00"
Note that i have to put a dash between dd and HH to get it work, putting a space doesn't work.
TalendTeam, is this correct? Thanks
Anonymous
Not applicable
Author

Hello
TalendTeam, is this correct?

Yes, you are right.
Best regards
shong
Anonymous
Not applicable
Author

Shong, i want to put a string with space as a parameter in command line, how can i do it? (This is to set the email title)
Actually the string is truncated at the first space.