Today, I want to use kettle to extract a table with 30 million records. I 'd like to take a brief look at Kettle's extraction efficiency. I don't want to report an error when extracting data to 7999 rows. View logs:
"
... Couldn't get row from result set...
... Value '2017-00-00 'can not be represented as Java. SQL. timestamp...
"
At first, I did not pay attention to the following time issues. I focused on "couldn't get row from result set" and found some online materials, increase MySQL net_write_out and cancel "use result streaming cursor" in kettle's "DB connection", but the error still persists. It seems that they are not a problem.
When the problem cannot be solved, I began to pay attention to the following error. I queried the 7999 rows where the error was stopped, it is found that from this line, this time field has a null value and '2017-00-00 00:00:00 'value in addition to the normal time data. Is this type of value caused by errors, after you query the relevant information, you will know that JDBC (default Act) considers that a date and time value such as null or '2017-00-00 'is invalid. To avoid this problem, edit the JDBC connection attribute and add the following attribute values:
Zerodatetimebehavior = converttonull
When designing related tables in the production system, it is best not to use a value like '2017-00-00 'by default.