[Schema] Set default value for datetime in metadata schema

One Star

[Schema] Set default value for datetime in metadata schema

I see in this post that we can set a default date value to current date.
https://help.talend.com/search/all?query=Verifying+default+values+in+a+retrieved+schema&content-lang...
I try it but when my flow want to create an XML file with the tAdvancedFileOutputXML, an error occur as 'sysdate is not valid'.
I think that this sysdate is an Oracle value, not Talend.
Then, how can i set my default date value to current date in my metadata schema ? If can't, did i must set these default in my tMap ?
One Star

Re: [Schema] Set default value for datetime in metadata schema

Hi,
I use this for the date:
TalendDate.formatDate("dd-MM-yyyy",TalendDate.getCurrentDate())

Regards
Burnside.
One Star

Re: [Schema] Set default value for datetime in metadata schema

You used this in a tMap component ?

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog