Null management for an AS/400 IBMi source and a Snowflake target - 7.3

Talend Change Data Capture Reference Guide

Version
7.3
Language
English
Product
Talend Change Data Capture
Module
Talend Change Data Capture
Content
Data Governance > Third-party systems > Database components (Integration) > Change Data Capture
Data Quality and Preparation > Third-party systems > Database components (Integration) > Change Data Capture
Design and Development > Third-party systems > Database components (Integration) > Change Data Capture
Last publication date
2023-11-09

The SQL command file DD_SnowLoad.sql is used for null management.

About this task

Procedure

  1. To activate null management, you must check that the SnowFlakeTarget.Copy parameter in the DD_USRDATA.DD_PARAM table is up-to-date.
    Use the following query: UPDATE DD_USRDATA.DD_PARAM SET PARVAL = 'copy into "&dbname"."&schemaname".&snowtable from @~/&snowfile file_format = (type=csv FIELD_OPTIONALLY_ENCLOSED_BY = ''"'' ESCAPE =''\\'' TRIM_SPACE = TRUE);' WHERE PARNAME='SnowFlakeTarget.Copy'
    Warning: If other parameters have been added, you need to update this query with those parameters.
  2. For other needs, follow the null option rules for AS/400 IBMi as a source and Snowflake as a target:
    Null Type Rule
    Yes Alpha The blanks to the right are deleted.

    If the field is empty, "" is sent.

    If the field is null, null is sent.
    No Alpha The blanks to the right are not deleted.

    If the field is null, "" is sent.

    Rtrim Alpha The blanks to the right are deleted.

    If the field is empty, " " is sent.

    If the field is null, "" is sent.

    Idem Alpha

    No processing, empty are empty, null are null, varchar are varchar, nvarchar are nvarchar.

    The blanks to the right are not deleted for varchar.

    The blanks to the right are deleted for nvarchar (nvarchar are forced to RTRIM).

    Null Type Rule
    Yes Numeric If the value contained in the field is 0, then Null is sent.
    No Numeric If the value contained in the field is null, then 0 is sent.
    Idem Numeric Null are null, 0 are 0.
    Rtrim Numeric  
    Null Type Rule
    Yes Date Null are null, date are date.
    No Date Null are null, date are date.
    Idem Date Null are null, date are date.
    Rtrim Date Null are null, date are date.