Unable to read a Seq File

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
atul9806
Participant
Posts: 96
Joined: Tue Mar 06, 2012 6:12 am
Location: Pune
Contact:

Unable to read a Seq File

Post by atul9806 »

Hi Team
I am facing problem while reading a Seq file.

This is my file :
EMPNO,PROJNO,ACTNO,EMPTIME,EMSTDATE,EMENDATE
10,AD3100,10,0.5,1/1/2002,7/1/2002
70,AD3110,10,1,1/1/2002,2/1/2003
230,AD3111,60,1,1/1/2002,3/15/2002
230,AD3111,60,0.5,3/15/2002,4/15/2002
230,AD3111,70,0.5,3/15/2002,10/15/2002
230,AD3111,80,0.5,4/15/2002,10/15/2002
230,AD3111,180,0.5,10/15/2002,1/1/2003
240,AD3111,70,1,2/15/2002,9/15/2002
240,AD3111,80,1,9/15/2002,1/1/2003
250,AD3112,60,1,1/1/2002,2/1/2002
250,AD3112,60,0.5,2/1/2002,3/15/2002
250,AD3112,60,1,1/1/2003,2/1/2003
250,AD3112,70,0.5,2/1/2002,3/15/2002
250,AD3112,70,1,3/15/2002,8/15/2002
250,AD3112,70,0.25,8/15/2002,10/15/2002
250,AD3112,80,0.25,8/15/2002,10/15/2002
250,AD3112,80,0.5,10/15/2002,12/1/2002
250,AD3112,180,0.5,8/15/2002,1/1/2003
I am using "comma" as delimiter but getting this error while reading file.
##I TFCN 000001 15:11:06(000) <main_program>
Ascential DataStage(tm) Enterprise Edition 7.5
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved


##I TOSH 000002 15:11:06(001) <main_program> orchgeneral: loaded
##I TOSH 000002 15:11:07(000) <main_program> orchsort: loaded
##I TOSH 000002 15:11:07(001) <main_program> orchstats: loaded
##W TCOS 000049 15:11:07(002) <main_program> Parameter specified but not used in flow: DSProjectMapName
##I TFSC 000001 15:11:08(004) <main_program> APT configuration file: C:/Ascential/DataStage/Configurations/default.apt
##W TOIX 000000 15:11:14(000) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 27
##W TOIX 000154 15:11:14(001) <Sequential_File_8,0> Import warning at record 0:
##W TOIX 000018 15:11:14(002) <Sequential_File_8,0> Import unsuccessful at record 0:
##W TOIX 000000 15:11:14(003) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 25
##W TOIX 000154 15:11:14(004) <Sequential_File_8,0> Import warning at record 1:
##W TOIX 000018 15:11:14(005) <Sequential_File_8,0> Import unsuccessful at record 1:
##W TOIX 000000 15:11:14(006) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 26
##W TOIX 000154 15:11:14(007) <Sequential_File_8,0> Import warning at record 2:
##W TOIX 000018 15:11:14(008) <Sequential_File_8,0> Import unsuccessful at record 2:
##W TOIX 000000 15:11:14(009) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 28
##W TOIX 000154 15:11:14(010) <Sequential_File_8,0> Import warning at record 3:
##W TOIX 000018 15:11:14(011) <Sequential_File_8,0> Import unsuccessful at record 3:
##W TOIX 000000 15:11:14(012) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 28
##W TOIX 000154 15:11:14(013) <Sequential_File_8,0> Import warning at record 4:
##W TOIX 000018 15:11:14(014) <Sequential_File_8,0> Import unsuccessful at record 4:
##I TOIX 000157 15:11:14(015) <Sequential_File_8,0> (no further reports will be generated from this partition until successful import)
##I TOIX 000163 15:11:14(016) <Sequential_File_8,0> Import complete. 0 records imported successfully, 73 rejected.
**VIEWDATA ROW LIMITER HIT**
I am unable to understand the error
please help
~Atul Singh
<a href=http://www.datagenx.net>DataGenX</a> | <a href=https://www.linkedin.com/in/atulsinghds>LinkedIn</a>
jaysheel
Participant
Posts: 57
Joined: Mon Apr 07, 2008 1:54 am
Location: Bangalore

Post by jaysheel »

In the seq file stage what datatype you have given for the date columns. The date columns are not in proper format. Change those column types as Varchar and try reading it.
- Jaysheel -
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Although changing the data type of the date columns to string will solve the reading problem, you will still want to convert this string date to a real date. I would edit the extended attributes of the date column in your source sequential file stage and add a format of "%dd/%mm/%yyyy" so that the dates are converted correctly while reading the file.
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Agree with the above although wouldn't %dd expect a two digit day? Can't say I've ever tried against a 1 digit day as I've autmatically used %(d,s)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I didn't look at the input file in detail and didn't notice that the days and months can be one digit.
Post Reply