Page 1 of 1

Jobs contain lesser fields than defined in metadata

Posted: Mon Dec 11, 2006 5:15 am
by rumu
Hi All,
I am new to Px.I am facing the following problem:
In metadata tehre is 12 fields.In source it is sometimes comimg 11 or 12.When the no of col is 11 then the job is failing.
we r using sequential file stage to read data.
Like ServerJobs is there ny property to set "Missing columns action"?

Pls suggest.

Thanks in advance.

Regards,

rumu

Re: Jobs contain lesser fields than defined in metadata

Posted: Mon Dec 11, 2006 8:34 am
by thebird
rumu wrote: Like ServerJobs is there ny property to set "Missing columns action"?
rumu
You can set the Reject Mode option inside the Sequential File stage to "Output" to capture all records that have a mismatch in the defined metadata, in a reject link.

If you set this property to "Continue" then the job will simply discard such records and finish to completion.

Aneesh

Posted: Mon Dec 11, 2006 2:09 pm
by ray.wurlod
There is no "missing columns action" in parallel Sequential File stage.

Posted: Mon Dec 11, 2006 9:43 pm
by rumu
ray.wurlod wrote:There is no "missing columns action" in parallel Sequential File stage. ...
Hi Ray,
I have to pass all records whether the column is present or not.
Pls suggest how to achievs that?

Regards,

rumu

Posted: Mon Dec 11, 2006 9:57 pm
by ray.wurlod
Capture the short rows in the reject link as a raw string. Run this through a Column Import stage to parse it into the eleven columns, then through a Column Generator stage to add the twelfth column. Bring both streams together using a Funnel stage.

Posted: Mon Dec 11, 2006 11:29 pm
by vmcburney
You could also import it as 11 columns and split the 11th and 12th columns in a transformer stage. Not completely sure if this will work!