Replace null value with NA using Pentaho Kettle

Lavanya D. picture Lavanya D. · Mar 30, 2016 · Viewed 10.5k times · Source

I have an input csv file with one column field value as empty. I want to replace that field value as NA in my destination table. And in my destination table that column is specified as not null column.

I tried using if field value is null, value mapper step. but it doesnt work out.. can anyone suggest how to proceed.

Answer

Marlon Abeykoon picture Marlon Abeykoon · Mar 30, 2016

The NULLS can not be replaced using If field value is null step if you enable Lazy Conversion in CSV input step.

So untick the lazy conversion? check box in CSV Input step. Then in If field value is null step check Select fields check box and select the field you want to check nulls and type NA in Replace by value column.