mysql - Talend could not parse column as timestamp -
i need in issue,
i have talend job load data table simple tmap.
i called mysterious error because happended specific datetimes
java.sql.sqlexception: not parse column timestamp, was: "2009-06-01 00:00:00"
thousands of rows before row containing line doesn't generate error
when modify date 2009-06-01 00:00:00 or changing day part or month or hour, goes without error.
the datasource mariadb , destination mysql database
thnks help
and part of code contain error generated
if (colqtyinrs_tmysqlinput_5 < 6) { row5.created_at = null; } else { if (rs_tmysqlinput_5.getstring(6) != null) { string datestring_tmysqlinput_5 = rs_tmysqlinput_5 .getstring(6); if (!("0000-00-00") .equals(datestring_tmysqlinput_5) && !("0000-00-00 00:00:00") .equals(datestring_tmysqlinput_5)) { row5.created_at = rs_tmysqlinput_5 .gettimestamp(6); } else { row5.created_at = (java.util.date) year0_tmysqlinput_5 .clone(); } } else { row5.created_at = null; } }
since provided no further information in
how source data looks like, e.g. date field or string field in source?
why parsing happen, seems connected source data being string
how parsing pattern looks like
i going assume bit here.
1st: assume provide string in source. since case, you'd need make sure date in column formatted same way. also, you'd need show timestamp format parsing.
2nd: said you'd need change values of date work. seems me issue parsing, example have switched accident month , day field, e.g. yyyy-dd-mm hh:mm:ss
or alike. again, depends on parsing string.
since there bit of confusion i created blog post date handling in talend consult well.
Comments
Post a Comment