Search This Blog

Wednesday, 3 April 2013

Warning : When checking operator: When validating import schema: At field "field_Name": Importing potential null to not nullable field

When checking operator: When validating import schema: At field "field_name": Importing potential null to not nullable field 

while using Netezza Enterprise stage.


 In Netezza Enterprise stage sometimes even if the column is defined not null in metadata, still the above warning can be seen. To remove this use NVL function.

e.g I have a column PURCHASE_ORDER_NUM VARCHAR(20) (NOT NULL). Use the nvl function in the query as NVL(PURCHASE_ORDER_NUM,’?’) as PURCHASE_ORDER_NUM and convert its nullability to YES in the metadata.
Since the column is defined NOT NULL in source we should not have any ‘?’ actually coming in the data.
Now since here we have converted the nullablity of the column to NULLABLE, we might have the column defined as NOT NULLABLE in the target. In such as a case you might have to use a transformer or a modify stage to convert the NULLABLITY of the column to NOT NULLABLE and define a rule like :

If(IsNull(link_name.PURCHASE_ORDER_NUM)) Then ‘?’ Else link_name.PURCHASE_ORDER_NUM


To use NVL for decimal or integer field, give a integer decimal value.
e.g if the column PURCHASE_ORDER_NUM was an integer or decimal column I would have used :
NVL(PURCHASE_ORDER_NUM,’-1’) AS PURCHASE_ORDER_NUM

No comments:

Post a Comment

Popular Posts