Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
while try to load the below data using tVerticaoutputbulkexec, record 3, with null values for d1 date column is getting rejected.
ID|d1|d2|Val
1|20071231|20071226|dt
2|20070302|20171226|dt
3||20171231|dt3
Output:
[statistics] connected
1|12-31-2007|12-26-2007|8
2|03-02-2007|12-26-2017|8
3||12-31-2017|0
Number of records inserted into table hls_others.test_Date by tVerticaOutputBulkExec_2_tVBE: 2
[statistics] disconnected
Error :
COPY: Input record 3 has been rejected (Invalid date format '' for column 2 (d1).Invalid input syntax for date: ""). Please see /Out/TestDate_Rej.dlm, record 1 for the rejected record. This record was read from STDIN
i am using below logic to handle null but still this record is getting error out
(row2.d1.equals(null)||row2.d1.equals("") ||row2.d1.length()==0)? null :
TalendDate.parseDate("yyyyMMdd",row2.d1)
to avoid this, i am handling null and still it is throwing an error.
Mapping Design
mapping
(row2.d1.equals(null)||row2.d1.equals("") ||row2.d1.length()==0)? null :
TalendDate.parseDate("yyyyMMdd",row2.d1)
Pl Advise how to handle this situation ?
(row2.d1=null||row2.d1.equals("") ||row2.d1.length()==0)? null :TalendDate.parseDate("MM-dd-yyyy",row2.d1)