Page 1 of 1

Sequential File Null Value Field

Posted: Mon Mar 12, 2012 1:57 am
by kanasai167
I got a input file (.csv format) like this :

Name,Date,Amount
ABC,2000-11-11,1000
DEF,,
GHI,,



When i try to view the data in Sequential File stage , error popup. I believe is because of null value field in my input file.
However i set the Date field default value to 2000-01-01 but still receive error. Under the Sequential File option , i already set the Date Format String to %yyyy-%mm-%dd.
Same issue goes to my Amount field which is an Integer data type field.
After i set the Amount field default value to 0 then no more error on Amount Field. But i want my field remain NULL...
Is there any settings allows us to capture a null Date and Integer value in Sequential File.



Error message on Date Field :
##W IIS-DSEE-TFDA-00036 15:25:22(000) <Sequential_File_1,0> Data string ',,,,,,,CR,' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
##W IIS-DSEE-TFIG-00186 15:25:22(001) <Sequential_File_1,0> Field "CLOSING_DATE" delimiter not seen, at offset: 67
##W IIS-DSEE-TOIX-00154 15:25:22(002) <Sequential_File_1,0> Import warning at record 0.
##W IIS-DSEE-TOIX-00018 15:25:22(003) <Sequential_File_1,0> Import unsuccessful at record 0.
##W IIS-DSEE-TFDA-00036 15:25:22(004) <Sequential_File_1,0> Data string ',,,,,,,SR,' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %yyyy.
##W IIS-DSEE-TFIG-00186 15:25:22(005) <Sequential_File_1,0> Field "CLOSING_DATE" delimiter not seen, at offset: 70
##W IIS-DSEE-TOIX-00154 15:25:22(006) <Sequential_File_1,0> Import warning at record 1.

Posted: Mon Mar 12, 2012 2:28 am
by chetan.c
Hi,
Please try this.
Sequential file stage-->output tab--->Format tab--->Field defaults.
On the right side you will see "Available properties to add".
Select Null Field Value.

Thanks,
Chetan.C

Posted: Mon Mar 12, 2012 6:49 am
by chulett
Note that there are no null fields in a sequential file, only empty ones and they are not the same thing. The property mentioned will allow you to define the "in-band null" value for that field, what incoming value should be transformed to a null during import.

Posted: Mon Mar 12, 2012 7:41 pm
by qt_ky
chetan.c wrote:Select Null Field Value.
And set it to '' which is the empty string (2 single quotes).

Posted: Tue Mar 13, 2012 1:49 am
by kanasai167
it works , thanks