Search code examples
datetalend

Talend tparserecordset - not able to parse date


I am using talend to retrieve data from Oracle DB. I am using tOracleRow to select the data and I am parsing the resultset using tParseRecordSet component. The result set contains date fields and I am getting error on parsing the date filed. Below is my error.

 Exception in component tParseRecordSet_1
 java.lang.RuntimeException: Unparseable date: "2000-01-01 00:00:00.0"
   at routines.system.ParserUtils.parseTo_Date(ParserUtils.java:245)
   at data.extract_0_1.Extract.tFileInputExcel_1Process(Extract.java:1821)
   at data.extract_0_1.Extract.tOracleConnection_1Process(Extract.java:417)
   at data.extract_0_1.Extract.runJobInTOS(Extract.java:2427)
  at data.extract_0_1.Extract.main(Extract.java:2292)

I tried using date format - "yyyy-MM-dd'T'HH:mm:ss.ss.S", but still the error exits. Please advise.

Thanks


Solution

    1. Try to use tOracleInput to select data from DB. You don't need to use tParseRecordSet in this case.
    2. In schema for 'Date' type column use "yyyy-MM-dd HH:mm:ss.ss" in Date pattern.