problem while making the columns in a transformer nullable

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
suneyes
Participant
Posts: 82
Joined: Mon Jul 21, 2008 8:42 am

problem while making the columns in a transformer nullable

Post by suneyes »

Hi,
I am giving the o/p of XML input stage to a transformer i/p.and the transformer is connected to a seq file stage.

when I step all the colums in all the stages NOT NULL I am getting 2000 rows out of each stage.which is expected result.

But requirement is that we need to have as many colums nullable fields.

When I made all the columns in all the stages as NULLABLE I am Getting the same 2000 rows out of XML INPUT stage.But the transformer is giving only 200 rows as output.When I see the output file I see nothing in it.

I am unable to find the reason behind it.

can any one provide some pointers which helps me in getting out of this
sun
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

do u have any contstraints in Transfermer Stage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please strive for a professional standard of written English on DSXchange. This includes not using SMS-style abbreviations (DSXchange is not a mobile telephony device) and paying attention to spelling. This request is made to help those participants whose first language is not English.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suneyes
Participant
Posts: 82
Joined: Mon Jul 21, 2008 8:42 am

Post by suneyes »

laknar wrote:do u have any contstraints in Transfermer Stage.
I have used IF THEN statement in a couple of places in the transformer

If DSLink5.name='input1' Then DSLink5.value ELSE '' --column1
If DSLink5.name='input2' Then DSLink5.value Else '' --column2

I am redirecting the same column (DSLink5.value ) to two different columns in the output link based on a column DSLink5.name.
This is the oly place I am using transformation.
I am propagating the rest of the fields to the output link without any transformation.
sun
suneyes
Participant
Posts: 82
Joined: Mon Jul 21, 2008 8:42 am

Post by suneyes »

ray.wurlod wrote:Please strive for a professional standard of written English on DSXchange. This includes not using SMS-style abbreviations (DSXchange is not a mobile telephony device) and paying attention to spelling. This request is made to help those participants whose first language is not English.



sorry about the SMS language.I will keep it in mind.
sun
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you want to have nullable columns then you need to handle this condition explicitly in Transformer stage expressions.

Code: Select all

If IsNull(DSLink5.name) Or IsNull(DSLink5.value) Then SetNull() Else If DSLink5.name="input1" Then DSLink5.value ELSE ""
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suneyes
Participant
Posts: 82
Joined: Mon Jul 21, 2008 8:42 am

Post by suneyes »

ray.wurlod wrote:If you want to have nullable columns then you need to handle this condition explicitly in Transformer stage expressions.

Code: Select all

If IsNull(DSLink5.name) Or IsNull(DSLink5.value) Then Se ...[/quote]


found a better solution for my problem ray.
we have an option to convert nulls to spaces in xml input stage.
I just checked it and everything is working fine for me without incorporating any logic in the transformer.
sun
Post Reply