Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i am trying to generate csv after querying recods...and i am getting below error..is there any way to resolve this issue..
Caused by: java.text.ParseException: Unparseable date: "2019-03-12T12:30:00.000Z"
error :
Exception in component tSalesforceInput_1 (datecheck)
org.talend.components.api.exception.ComponentException: UNEXPECTED_EXCEPTION
at org.talend.components.salesforce.runtime.SalesforceAvroRegistry$StringToDateConverter.convertToAvro(SalesforceAvroRegistry.java:349)
at org.talend.components.salesforce.runtime.SalesforceAvroRegistry$StringToDateConverter.convertToAvro(SalesforceAvroRegistry.java:333)
at org.talend.components.salesforce.runtime.BulkResultAdapterFactory$ResultIndexedRecord.get(BulkResultAdapterFactory.java:95)
at org.talend.codegen.enforcer.OutgoingSchemaEnforcer.get(OutgoingSchemaEnforcer.java:189)
at local_project.datecheck_0_1.datecheck.tSalesforceInput_1Process(datecheck.java:1886)
at local_project.datecheck_0_1.datecheck.runJobInTOS(datecheck.java:2771)
at local_project.datecheck_0_1.datecheck.main(datecheck.java:2620)
Caused by: java.text.ParseException: Unparseable date: "2019-03-12T12:30:00.000Z"
at java.text.DateFormat.parse(Unknown Source)
at org.talend.components.salesforce.runtime.SalesforceAvroRegistry$StringToDateConverter.convertToAvro(SalesforceAvroRegistry.java:347)
... 6 more
[statistics] disconnected
Job datecheck ended at 16:14 12/03/2019. [exit code=1]
i have changed data type from date to string then it worked
@uganesh,the field you were extracting from saleforce,the date format is "yyyy-MM-dd'T'HH:mm:ss'.000Z'" since you might have changed the date format for that field in the schema of tsaleforceinput,your format should be "yyyy-MM-dd'T'HH:mm:ss'.000Z'"
If you want to connver the date format from one "yyyy-MM-dd'T'HH:mm:ss'.000Z'" to "dd/MM/yyyy" then do in the Output section of Tmap,just specifying the new date for the output column.
if i don't change also getting same error...find below screenshot where format is same
@uganesh ,i am not able to find the issue column,I am sure that there might be difference because of that you will get that date format issue.
schema is same for both input and out put....the data which is coming from input is like 2019-03-12T10:36:46.055Z ...whether i need to parse this ?
@uganesh ,for this 2019-03-12T10:36:46.055Z data the format should be "yyyy-MM-dd'T'HH:mm:ss'.000Z'",if you specify other than this in you will get error in tsalaforceinput like unparsable date exception.
@uganesh,if this issue resloved,please mark the solution and also provide Kudos.
i have changed data type from date to string then it worked