2

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.

mzy
  • 1,754
  • 2
  • 20
  • 36
Lavanya D.
  • 491
  • 2
  • 6
  • 15
  • you can use replace string step, you can't use field value is null step. – Venkatesh Panabaka Mar 30 '16 at 07:29
  • the if field value step should work fine here: did you check the box "select fields"? than you can choose the fields to be transformed to NA if null... – Seb Mar 30 '16 at 07:37

2 Answers2

4

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.

Marlon Abeykoon
  • 11,927
  • 4
  • 54
  • 75
0

there is a specific step that does just that- it replaces null values - In the Step you have a choice to a) pick either 1 or more field type(s) (STRING, INTEGER, etc.) or b) identify specific field(s) - then you provide a replacement string if you wish.