What Should I Do If the Log Prompts that the Date Format Fails to Be Parsed?
Symptom
Possible Cause
CSS has a special processing mechanism on the time field. If the stored time data does not contain the time zone information, Kibana considers the time as the GMT.
The time displayed in the log may be different from the local time. For example, the time displayed in the log is eight hours earlier than the local time in the GMT+08:00 time zone. Therefore, when CDM migrates data to Cloud Search Service, if the index and type are automatically created by CDM (for example, if date_test and test1 of the migration destination highlighted in Figure 2 do not exist in Cloud Search Service, CDM automatically creates the index and type in Cloud Search Service), CDM, by default, sets the format of the time field to the standard format of yyyy-MM-dd HH:mm:ss.SSS Z, for example, 2018-01-08 08:08:08.666 +0800.
When data is imported from another data source to CSS, if the date format in the source data is not the standard format, for example, 2018/01/05 15:15:46, the CDM job fails to be executed, and the log shows that the date format cannot be parsed. You need to configure a field converter on CDM to convert the format of the date field to the required format of CSS.
Solution
- Edit the job and go to the Map Field tab page. Click the icon for creating a converter in the row of the source field to create a converter. See Figure 3.
- Select Expression conversion as the converter. Currently, expression conversion supports functions of the character string and date types. The syntax is similar to the Java character string and time functions. For details about how to compile the expression, see Expression Conversion.
- In this example, the source time format is yyyy/MM/dd HH:mm:ss. To convert the source time format to yyyy-MM-dd HH:mm:ss.SSS Z, perform the following operations:
- Add the time zone information +0800 to the end of the original date character string. The corresponding expression is value+" +0800".
- Use the original date format to parse the string to a date object. You can use the DateUtils.parseDate function for parsing. The syntax is DateUtils.parseDate(String value, String format).
- Format the date object into a character string in target format by using the DateUtils.format function. The syntax is DateUtils.format(Date date, String format).
In this example, the complete expression is DateUtils.format(DateUtils.parseDate(value+" +0800","yyyy/MM/dd HH:mm:ss Z"),"yyyy-MM-dd HH:mm:ss.SSS Z"). See Figure 4.
- Save the converter configuration and save and run the job to solve the problem that Cloud Search Service fails to parse the date format.
Troubleshooting FAQs
- What Should I Do If the Log Prompts that the Date Format Fails to Be Parsed?
- What Can I Do If the Map Field Tab Page Cannot Display All Columns?
- How Do I Select Distribution Columns When Using CDM to Migrate Data to DWS?
- What Do I Do If the Error Message "value too long for type character varying" Is Displayed When I Migrate Data to DWS?
- What Can I Do If Error Message "Unable to execute the SQL statement" Is Displayed When I Import Data from OBS to SQL Server?
- What Should I Do If the Cluster List Is Empty, I Have No Access Permission, or My Operation Is Denied?
- Why Is Error ORA-01555 Reported During Migration from Oracle to DWS?
- What Should I Do If the MongoDB Connection Migration Fails?
- What Should I Do If a Hive Migration Job Is Suspended for a Long Period of Time?
- What Should I Do If an Error Is Reported Because the Field Type Mapping Does Not Match During Data Migration Using CDM?
- What Should I Do If a JDBC Connection Timeout Error Is Reported During MySQL Migration?
- What Should I Do If a CDM Migration Job Fails After a Link from Hive to DWS Is Created?
- How Do I Use CDM to Export MySQL Data to an SQL File and Upload the File to an OBS Bucket?
- What Should I Do If CDM Fails to Migrate Data from OBS to DLI?
- What Should I Do If Error Message "Configuration Item [linkConfig.createBackendLinks] Does Not Exist" Is Displayed During Data Link Creation or Error Message "Configuration Item [throttlingConfig.concurrentSubJobs] Does Not Exist" Is Displayed During Job Creation?
- What Should I Do If Message "CORE_0031:Connect time out. (Cdm.0523)" Is Displayed During the Creation of an MRS Hive Link?
- What Should I Do If Message "CDM Does Not Support Auto Creation of an Empty Table with No Column" Is Displayed When I Enable Auto Table Creation?
- What Should I Do If I Cannot Obtain the Schema Name When Creating an Oracle Relational Database Migration Job?
- What Should I Do If invalid input syntax for integer: "true" Is Displayed During MySQL Database Migration?
- What Should I Do If the Migration Source Is Oracle and Error Message "snapshot too old" Is Displayed?
- What Should I Do If Error "Identifier name is too long" Is Reported During Entire DB Migration to Hive?
- What Should I Do If Data Is Lost During Migration to DLI?
- What Should I Do If the Oracle Link Connectivity Test Is Successful on the Link Creation Page but Fails on the Links Page?
- What Should I Do If Destination Fields Are Not Displayed When Auto Table Creation Is Enabled in the Destination Job Configuration?
- What Should I Do If a Job Exported from a Cluster Fails to Be Imported to Another Cluster?
- What Should I Do If an Error Message Is Displayed Indicating that the Block Is Missing During HDFS File Migration?
- What Should I Do If the CDM Job Management Page Cannot Be Accessed and a Message Is Displayed Indicating that the Network or Server Cannot Be Accessed?
- What Should I Do If a CDM Cluster of Version 2.8.6 Fails to Migrate Data from OBS to DLI?
- What Should I Do If Error Message "Read timedout" Is Displayed During DWS Data Migration?
- What Should I Do If No Database or Table Information Can Be Obtained Through a Hive Link?
- What Should I Do If Error "get filesystem" Is Reported During the Creation of a FusionInsight HDFS Link?
- What Should I Do If Error "Invoke DLI service api failed" Is Reported When the Data Migration from MySQL to DLI Is About to Complete?
- What Should I Do If a MongoDB Field Fails to Be Migrated to the Destination?
- What Should I Do If a Field Is Escaped and Contains a Backslash (\) During the Migration of a DLI Foreign Table (OBS File) to DWS?
- What Should I Do If "Error occurs during loader run" Is Reported During Migration from PostgreSQL to Hive?
- What Should I Do If Error Message "Lost connection to MySQL server during query" Is Displayed During Migration from MySQL to DWS?
- What Should I Do If Error Message "For input string: "false" Is Displayed During Field Type Conversion During MySQL-to-DLI Migration?
- What Should I Do If an Error Occurs During the Migration of TINYINT Data from MySQL to DWS?
- What Shoud I Do If the Data Volume Is Inconsistent Before and After Data Migration?
- What Should I Do If an Error Is Reported Indicating an Incorrect Username or Password During Link Creation but They Are Correct Indeed?
- What Should I Do If a Message Is Displayed Indicating that the Fields in the Lower Camel Case Do Not Exist During Data Migration from a Database to OBS?
- What Should I Do If Error "invalid utf-8 character string" Is Reported When CSV Data Is Inserted into the MySQL Database?
- What Should I Do If a Scheduled Job Fails and Link Connectivity Is Abnormal?
- What Should I Do If CSV Data Fails to Be Inserted into a MySQL Database?
- What Should I Do If Error "timeout waiting for connection from pool" Is Reported During ES Writing?
- Why Is Error ORA-01555 Reported During Migration from Oracle to DWS?
- What Shoud I Do If the FTP Connectivity Test Fails and an Internal Server Error Is Reported?
- What Should I Do If All Users Except User root Cannot Access RDS for MySQL?
- Hudi Source Case Library
- Hudi Destination Case Library
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore