Page 1 of 1

Posted: Fri May 06, 2005 6:05 am
by ds_is_fun
Another way to do the same thing. Is
In your source column nullable = "Y" and target columns Nullable = "N"
Use a If Then Else statement
Like...
If IsNull(col1) Then <default_value> Else (col1)
This should also work.

Posted: Fri May 06, 2005 6:17 am
by ds_is_fun
ds_is_fun wrote:Another way to do the same thing. Is
In your source column nullable = "Y" and target columns Nullable = "N"
Use a If Then Else statement
Like...
If IsNull(col1) Then <default_value> Else (col1)
This should also work.
Sorry forgot to mention use the above in a transformer stage.

Posted: Fri May 06, 2005 6:20 am
by thebird
Hi,

I want to avoid the use of a transformer. Thats why I was trying to use a modify stage. Use of transformer I think impacts the efficiency.

Regards,

Thebird.

Posted: Fri May 06, 2005 6:35 am
by Sainath.Srinivasan
Is both your from and to mapping string values?

Posted: Fri May 06, 2005 9:02 am
by thebird
Hi,

My input and output are both strings. The exact statements that I entered was :

1)Latitude:string = NullToValue (Latitude,"NULL")
2)Latitude=NullToValue (Latitude,"NULL")
3)Latitude=NullToValue("NULL")

I also tried NullToZero in the above staments, inside the Modify stage.
But every time, the job log said

unknown conversion: NullToValue/NullToZero
expected field selector,got:")"

When I tried using NullToEmpty, though the job ran, the incoming raw didnt seem to have changed at all.

Can anyone help me with this?

Regards,

Thebird.

Posted: Fri May 06, 2005 2:28 pm
by richdhan
Hi Bird,

This has been discussed before. Do a search on handle_null. Modify stage uses orchestrate functions. Use handle_null in the modify stage specification.

Rich

Posted: Wed Jun 08, 2005 9:44 am
by battaliou
handle_null seems to be the way forward here, but in the PX developer pdf, they have a NullToValue example under the modify stage. Surely this function should be available? I'm happy with the work around.

Posted: Wed Jun 08, 2005 1:28 pm
by kiran reddy
Hi,
Modify Operator does not exactly behave as described in the PX documentation. If you have a chance go through the Orchestrate documentation.
I am doing the same by HANDLE_NULL
This would definitely work.

Stat_Qanty = HANDLE_NULL(Stat_Qanty,0)
Stat_Qanty = HANDLE_NULL(Stat_Qanty,value) for a numeric type


Name = HANDLE_NULL(Name,'value') for string type

Posted: Wed Jun 08, 2005 1:34 pm
by kiran reddy
In my previous message I forgot to stress on using only single quotes for a string type using HANDLE_NULL

Posted: Wed Jun 08, 2005 2:44 pm
by ray.wurlod
One of many errors in the manual. The functions that the Modify stage uses are similar but different from the functions that the Transformer stage uses; for example many of the Modify stage function names include underscores.
Maybe they'll become more consistent in a future release. Meanwhile you need to research and experiment to find what works (and share it here!).