Null Handling

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
srivvds
Participant
Posts: 6
Joined: Thu May 19, 2005 10:38 pm
Location: MN

Null Handling

Post by srivvds »

Hi,

While I am trying to convert datatypes for few columns like Varchar to Decimal, Varchar to Date and Varchar to Timestamp which are not nullable on the target table, I am getting following warnings:

1) APT_CombinedOperatorController,2: Numeric string expected, got "". Use Decimal default value.

2) APT_CombinedOperatorController,2: Null string argument.

Please let me know best way to get over these warnings.

Thank You,
RSSV
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Re: Null Handling

Post by pavankvk »

srivvds wrote:Hi,

While I am trying to convert datatypes for few columns like Varchar to Decimal, Varchar to Date and Varchar to Timestamp which are not nullable on the target table, I am getting following warnings:

1) APT_CombinedOperatorController,2: Numeric string expected, got "". Use Decimal default value.

2) APT_CombinedOperatorController,2: Null string argument.

Please let me know best way to get over these warnings.

Thank You,
RSSV
check the null value using IsNull function and assign a default value if it returns 1
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Looks like you are in a Transform stage, wrap a NullToValue around your string fields to turn them into zeros or reject them out of the transformer. If you were using a Modify you would do something like decimal_from_string(handle_null(stringfield, 0)).
srivvds
Participant
Posts: 6
Joined: Thu May 19, 2005 10:38 pm
Location: MN

Post by srivvds »

Hi,

In my case there is no default value like 0 or anything. If source field is null or empty or invalid value, after converting Datatype I should get null in target oci stage.

Can anyone please suggest detail solution for this problem.

Thank You,
RSSV
Post Reply