Page 1 of 1

Filter Condition failed in Sequential File

Posted: Mon Feb 28, 2005 10:42 am
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

Posted: Mon Feb 28, 2005 10:46 am
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.

Posted: Mon Feb 28, 2005 11:00 am
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

Posted: Mon Feb 28, 2005 11:07 am
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.

Posted: Mon Feb 28, 2005 11:10 am
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

Posted: Mon Feb 28, 2005 11:25 am
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

Posted: Mon Feb 28, 2005 11:37 am
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.

Posted: Mon Feb 28, 2005 11:58 am
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

Posted: Mon Feb 28, 2005 1:50 pm
by bibhudc
dsedi,

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