When you update a dynamic lookup cache and target table, the source data might contain some null values. The Integration Service can handle the null values in the following ways:
Insert null values.
The Integration Service uses null values from the source and updates the lookup cache and target table using all values from the source.
Ignore null values.
The Integration Service ignores the null values in the source and updates the lookup cache and target table using only the not null values from the source.
If you know the source data contains null values, and you do not want the Integration Service to update the lookup cache or target with null values, select the Ignore Null property for the corresponding lookup/output port.
For example, you want to update the master customer table. The source contains new customers and current customers whose last names have changed. The source contains the customer IDs and names of customers whose names have changed, but it contains null values for the address columns. You want to insert new customers and update the current customer names while retaining the current address information in a master customer table.
For example, the master customer table contains the following data:
Primary Key
CUST_ID
CUST_NAME
ADDRESS
CITY
STATE
ZIP
100001
80001
Marion James
100 Main St.
Mt. View
CA
94040
100002
80002
Laura Jones
510 Broadway Ave.
Raleigh
NC
27601
100003
80003
Shelley Lau
220 Burnside Ave.
Portland
OR
97210
The source contains the following data:
CUST_ID
CUST_NAME
ADDRESS
CITY
STATE
ZIP
80001
Marion Atkins
NULL
NULL
NULL
NULL
80002
Laura Gomez
NULL
NULL
NULL
NULL
99001
Jon Freeman
555 6th Ave.
San Jose
CA
95051
Select Insert Else Update in the Lookup transformation in the mapping. Select the Ignore Null option for all lookup/output ports in the Lookup transformation. When you run a session, the Integration Service ignores null values in the source data and updates the lookup cache and the target table with not null values:
PRIMARYKEY
CUST_ID
CUST_NAME
ADDRESS
CITY
STATE
ZIP
100001
80001
Marion Atkins
100 Main St.
Mt. View
CA
94040
100002
80002
Laura Gomez
510 Broadway Ave.
Raleigh
NC
27601
100003
80003
Shelley Lau
220 Burnside Ave.
Portland
OR
97210
100004
99001
Jon Freeman
555 6th Ave.
San Jose
CA
95051
When you choose to ignore NULLs, you must verify that you output the same values to the target that the Integration Service writes to the lookup cache. When you choose to ignore NULLs, the lookup cache and the target table might become unsynchronized if you pass null input values to the target. Configure the mapping based on the value you want the Integration Service to output from the lookup/output ports when it updates a row in the cache:
New values.
Connect only lookup/output ports from the Lookup transformation to the target.
Old values.
Add an Expression transformation after the Lookup transformation and before the Filter or Router transformation. Add output ports in the Expression transformation for each port in the target table and create expressions to ensure you do not output null input values to the target.