Filter Condition failed in Sequential 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
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Filter Condition failed in Sequential File

Post by dsedi »

Hi All,

one of my job read data using sequential file stage from .csv file which contains a header record followed by actual data.

so we are using
grep -v -e "^01" command in the "filter" options of the sequential file

now my job failed due to no rows(data) in my input file except the header record.
so,Jobs aborts with message

Filter status 256
Filter process failed: 1
Import error at record 0


any suggestions to overcome this?

Thanks in advance
Edi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello Edi,

instead of doing a UNIX filter, just define the sequential file details as "First line is column names" and DS will ignore the first one.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

Thanks ArndW !

but first line in data file doesn't have column names
it have some metadata information about the file (anyway it was not used in the particular job).

and where do i need to specify the option "First line is column names" while reading?

Edi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

dsedi,

the first line is not used for column names in Px jobs, it is just a flag you can specify in the Sequential file stage, Properties -> Options -> First Line is Column Names; this basically tell Ds to ignore the first line. It doesn't really matter what the contents are.
logic
Participant
Posts: 115
Joined: Thu Feb 24, 2005 10:48 am

Post by logic »

Edi,

In sequential file stage, click on "Outputs", then "Format" and click the box (left hand side)- "first line is column names".
:)

dsedi wrote:Thanks ArndW !

but first line in data file doesn't have column names
it have some metadata information about the file (anyway it was not used in the particular job).

and where do i need to specify the option "First line is column names" while reading?

Edi
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

Thanks....
but this is Parallel Extender/PX) JOb
Not the server Job!

i am able to find "first line is column names" option in Dsserver JOb sequential stage..not in PX sequential file stage..

well ..is there any way to instruct my job to continue even if my greb command output is null..(i.e no data)..

Dsedi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

dsedi

look carefully at your Parallel Job Sequential file stage. It is there, just as I described. The Server sequential file stage has a click-box, the Px stage has a textual description on the left, and then lets you change on the right when you activate it.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

Thanks ArndW !

Nice learning!

i am able to find the option you specified in PX 7.5
and also in DS server ...

NOT in PX Version 7.0... :o i am using PX7.0

ok..fine...
so is there any other way to specify the job to continue even if my Filter output is null?

Edi
bibhudc
Charter Member
Charter Member
Posts: 20
Joined: Thu Jun 19, 2003 12:26 pm

Post by bibhudc »

dsedi,

can you try with this to eliminate the first line -- sed -e '1d' filename ?
Bibhu
Post Reply