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

[resolved] Get the current Date into a Schema definition

Hi,
I'm runing out of tips trying to handle a default value for a date.
Is it possible to get the current date as default value into a metadata schema ?

I've tried TalendDate.getCurrentDate(), new java.util.Date(), sysdate etc... nothing works. I really want to handle it into the metadata, it seems much more "clean" to me, to handle it here, I don't wanna use variables into tmap or tJava that is too tricky, and I want to keep my jobs easy to maintain !
0683p000009MBjC.png
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi,
You cannot use TalendDate.getCurrentDate() as default value in schema setting.
You have to use the expression you already know in the tMap or tJava.
The default values in the database will only be used if you do not fill the column and set null as value is always a attempt to fill the column and prevents the database from setting the default value.
For default value, please take a look at a KB document: https://help.talend.com/search/all?query=Verifying+default+values+in+a+retrieved+schema&content-lang...
Best regards
Sabrina
Anonymous
Not applicable
Author

Thanks Sabrina, that's too bad but I can deal with it
Let's use tmap then
Anonymous
Not applicable
Author

Hi,
Feel free to let us know if there is any further help we can give.
Best regards
Sabrina