Page 1 of 1

how to convert nullable to not null values

Posted: Mon Aug 16, 2010 4:37 pm
by developeretl
Hi,
Iam having trouble converting the null values to not null. Can you please guide how to convert the nullable values to not null using the transformer stage or any db2 query ( i used nvl and coalescequery it is not working )
Iam getting the values from the database which are having null values and i need to do transformation and updated them into another table there those fields are not null.

Posted: Mon Aug 16, 2010 5:07 pm
by ray.wurlod
Please be more specific about what you mean by "it is not working" and what - precisely - you want to do with inbound NULL values.

It should be straightforward once you have decided on how NULL is to be represented in the not null column - simply convert any inbound ("out of band") null into that representation ("in band null"). Use NullToValue() function in a Transformer stage.

Re: how to convert nullable to not null values

Posted: Mon Aug 16, 2010 11:42 pm
by sultan@cts
developeretl wrote:Hi,
Iam having trouble converting the null values to not null. Can you please guide how to convert the nullable values to not null using the transformer stage or any db2 query ( i used nvl and coalescequery it is not working )
Iam getting the values from the database which are having null values and i need to do transformation and updated them into another table there those fields are not null.
We are having NullToValue function in transformer stage.Make use of this.

Posted: Tue Aug 17, 2010 2:07 am
by Sainath.Srinivasan
Why is the response from sultan@cts rated as level 1 ? That is your solution (assuming you only are looking for transforming Null into a non-null value).

Search for NullToEmpty or NullToValue.

Posted: Tue Aug 17, 2010 2:47 am
by ETLJOB
It looks like any body can give rating for the solutions. I just checked it on your reply :wink:

Posted: Tue Aug 17, 2010 3:00 am
by ray.wurlod
I guess it's because it didn't add anything new. NullToValue() was already mentioned in my answer.