Skip to Content
avatar image
Former Member

NULL in source gets converted to Blanks in target

I am using Data Services to load data from the SQL server to Teradata. For target columns of VARCHAR or CHAR data types in Teradata, if the corresponding source column value is NULL, the data is loaded into the target as a blank field value instead of NULL. But for other datatypes like datetime or int, NULL in source is loaded as NULL in target. I am using the FASTLOAD bulk loader option in Data services to load data into teradata.

Should i change any setting in the data services config file to solve this problem?

Edited by: indumeena on May 31, 2011 9:54 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 31, 2011 at 08:10 PM

    Maybe yu can user the function nvl located on Miscellaneous Functions with this yuo can replace null value for a specific value

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2012 at 03:39 AM

    Hi,

    Please try this!

    The data type of a NULL value is INTEGER. That's why the Teradata Database returns a blank value by treating Null as a bad character.

    Better use cast fucntion for null values.

    For example: nvl(<Column_Name>,cast(<Column_Name> as Integer)) ornvl(<Column_Name>,cast(NULL as VARCHAR(10)))

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 06, 2014 at 12:42 PM

    use in qurey in mapping tab:

    ifthenelse(columnname is null,'  ',columnname)

    Add comment
    10|10000 characters needed characters exceeded