Problem in extract query

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
DS1
Charter Member
Charter Member
Posts: 29
Joined: Wed Mar 29, 2006 1:13 pm

Problem in extract query

Post by DS1 »

hello everyone,

I am facing a problem with an extract query that works well in the sql developer.
the oracle extract query goes like this..

select
a.clm1
null as clm2 (clm2 is decimal)
null as clm3 (clm3 is char)
from a

this query runs well in the sql but when it is run in the oracle enterprise stage it gives error like this -

In field "clm2": Parsing parameters "max=0" for schema type "string": Max length must be positive, got: "0"

I donot get this problem with char field.

is this common??

Thanks
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Post by vsi »

I guess the problem is with the metadata used in the oracle stage???? Check whether you have the Lengths mentioned in the metadata
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Problem in extract query

Post by sud »

DS1 wrote:hello everyone,

I am facing a problem with an extract query that works well in the sql developer.
the oracle extract query goes like this..

select
a.clm1
null as clm2 (clm2 is decimal)
null as clm3 (clm3 is char)
from a

this query runs well in the sql but when it is run in the oracle enterprise stage it gives error like this -

In field "clm2": Parsing parameters "max=0" for schema type "string": Max length must be positive, got: "0"

I donot get this problem with char field.

is this common??

Thanks
Hey,

The problem is because of passing null like that, there is an orchestrate error. Try by putting some value instead of null and then specifiying setnul() as derivation for the two cols in a subsequent stage. :idea:
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
DS1
Charter Member
Charter Member
Posts: 29
Joined: Wed Mar 29, 2006 1:13 pm

Post by DS1 »

Thanks for all the answers..
as mentioned by Sud, I have give a value '0' and then in the later stages have used setnull ,, however i wanted to know if it could be done at the sql level to reduce the burden on the transformer stage.

Thnaks
Post Reply