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