Java.lang.RuntimeException:Date pattern must is set for column update_time in the schema of component

Source: Internet
Author: User

Using Talend Open Studio, read the data from the MySQL data source, export the data to an Excel document, another MySQL database, and an ordinary file, encountering a header error, as shown in the model:

TMap to output every field in 30.7 to an Excel field, as shown in:

However, there are two fields, Update_time and last_msg_intime are date types, and in Excel, they should be set to string types.

In Toexcel, it is not enough to set the above two fields to a string type, you need to convert MSYQL fields to strings in the process of mapping, using string.valueof (Row1.update_time), String.valueof (row1.last_msg_intime) Note that last_msg_intime.tostring () cannot be used here because the last_msg_intime is likely to be empty, so that a null pointer exception is reported.

Here's how to modify it:

The TOS generates the Java code directly from the model, generating the following code:

Java.lang.RuntimeException:Date pattern must is set for column update_time in the schema of component

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.