I'm reading data from Oracle database and storing into file.
Note: I want to do it using dynamic Schema only, I have reasons so please deal with my concern
Here is the data
Below is the output when I mention date format(yyyy-MM-dd HH:mm:ss) in dynamic schema Date's format window.
But when I mention date format(dd-Mm-yyyy HH:mm:ss) in dynamic schema Date's format window.
ID|Name|LastName|Location|Department|DateJoin (I always want this format only)
what happens to my Job that sometimes even after setting my Dynamic schema date to (dd-Mm-yyyy HH:mm:ss), it produces different date format(yyyy-MM-dd HH:mm:ss) in output....? Why is it so...? Its a case when no tjavarow component is present, Direct connection.
What should I do to avoid this use case so that I could recieve every time dd-Mm-yyyy HH:mm:ss in output.
Do you think so in below job setting, it can avoided, not matter what date format comes and what date pattern is set in Dynamic schema window, it will give me only dd-Mm-yyyy HH:mm:ss in output ?
String IncolumnValue = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(row7.c.getColumnValue(columnName));
SimpleDateFormat reqPattern = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date reqDate = reqPattern.parse(IncolumnValue);
row8.c = row7.c;
Note: This code is also not working as expected, gives output on the basis of what is set in Dynamic schema's date pattern window.
Since you are using dynamic schema right,what you have define the date format in tFileoutputDelimited of dynamic schema,that will be populated.
@manodwhb That's true. But what to do when we get a date format in output which is different from mentioned in dynamic schema window...?
My job shows this behaviour thrice in a week and produce different format in output. May I know please what could be the reason for that ? And How this can be handled within dynamic schema if job produce date format which is different from the one mentioned in Dynamic schema window.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema