Removing NULLs from Data - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software

A SQL error occurs when data containing ASCII null (embedded in a non-empty VARCHAR field) is inserted into the Aster Database. This error can arise when data is inserted into the Aster database through any means, including ncluster_loader and the Teradata Connector. Note that the ASCII null character is unrelated to the concept of NULL values in the database.

When Aster encounters ASCII null in the data that is being inserted, it treats the null character as invalid UTF-8. The following workaround applies to data being loaded from Teradata, but the same concepts (though not the same syntax) apply when loading data from other systems.

When loading from a Teradata system, the easiest workaround is to identify the CHAR or VARCHAR field with the ASCII nulls and then add a construct like this to your SELECT statement:

WHERE fieldname NOT
LIKE ''%''||''00''XC||''%'')

The ‘00’XC is Teradata syntax to specify the character with the ASCII value 00.

If you can't afford to exclude those records, then you will need to update the values to replace the ASCII nulls with spaces or some other valid ASCII/UTF-8 character, either in the table or in the query that is being run on the Teradata system so that the ASCII nulls are filtered out before they reach the Aster Database.