This content has been marked as final.
Show 2 replies
-
1. Re: Invalid dates in MySQL source tables are shown as NULL values in Teiid
shawkins Oct 1, 2015 9:14 AM (in response to fox123)> I wondered if showing an invalid date as NULL is a correct/expected behavior.
There isn't really a correct behavior here. Mysql has non-standard behavior around the 0 / invalid datetime value and it appears you have already set zeroDateTimeBehavior=convertToNull. Beyond that you would probably have to set the Teiid datatype of the column to string to differentiate between null and the 0 value.
-
2. Re: Invalid dates in MySQL source tables are shown as NULL values in Teiid
fox123 Oct 9, 2015 8:54 AM (in response to shawkins)Thanks for your reply.
I can confirm you that I have already set zeroDateTimeBehavior=convertToNull to avoid the exception "java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date" thrown by the JDBC driver.
If I add a cast to string, I can correctly see the 0 value and I can distinguish it from a real null.