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
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
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
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.