Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Aggregator Transformation
  4. Custom Transformation
  5. Custom Transformation Functions
  6. Data Masking Transformation
  7. Data Masking Examples
  8. Expression Transformation
  9. External Procedure Transformation
  10. Filter Transformation
  11. HTTP Transformation
  12. Identity Resolution Transformation
  13. Java Transformation
  14. Java Transformation API Reference
  15. Java Expressions
  16. Java Transformation Example
  17. Joiner Transformation
  18. Lookup Transformation
  19. Lookup Caches
  20. Dynamic Lookup Cache
  21. Normalizer Transformation
  22. Rank Transformation
  23. Router Transformation
  24. Sequence Generator Transformation
  25. Sorter Transformation
  26. Source Qualifier Transformation
  27. SQL Transformation
  28. Using the SQL Transformation in a Mapping
  29. Stored Procedure Transformation
  30. Transaction Control Transformation
  31. Union Transformation
  32. Unstructured Data Transformation
  33. Update Strategy Transformation
  34. XML Transformations

Transformation Guide

Transformation Guide

Null Values

Null Values

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.

0 COMMENTS

We’d like to hear from you!