Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm fairly new to TOS, and have hit an issue with using a date context variable in a trestclient parameter.
I've got the context set to date
and have chosen a date from the date picker.
then within the trestclient parameter i've got the following to get the unix timestamp time.
I'm getting this error though when I run the job.
its almost as if the context variables are not being passed to the trestclient properly.
any pointers please? i've spent quite alot of time trying to get this working.
it works fine when i put in the figure directly!
Thanks 🙂
Steve
It might be the format of the date value you are passing in the context.
It should be like this yyyy-mm-dd hh:mm:ss (for ex - 2021-01-17 18:46:14 )
If you check the value filed of the context you can see "..." to select the value.
Use that option to provide the specific value.
And if you want only the date in dd-mm-yyyy format, then you need to change it using "TalendDate.formatDate(pattern, date)".
Or better try to pass date value as string in your rest api call.
Thanks. i've been using the date picker, so the format is predefined and looks a what you say.
I think i must be doing something wrong across the board as my dbconneciton doens't work either. (get the same null value being parsed for a db connection.
uugh. fairly new to all this!
Hi so a quick update.
I've set the db conneciotn up in the meta and this works fine. from the meta I setup a context, which is now passing null values. even thought the meta based on the context tests ok...
what am I doing wrong? It's just not making sense to me!
Screen shots below.
Error
Meta setup.
Component setup.
The screeshot is not attached .
Could you add it again?
and in which format you are passing value in metadata and how you are passing in the dbConnection.
sure sorry not sure how they got missed.
Please see attached
ContextMeta
Component
Error
sorry forgot to hit reply. I've uploaded the additional screenshots...
Might be some jar issues.. can you select the jdbc provider option in tDBOutput and make it as microsoft and then try
Hi So I'm missing the JDBC Microsoft jar which I'm in the process of installing, but when I enter the values in as text the component works! odd
nope didn't work still the same issue. the contexts are passing as "null" rather than the data entered.