on 05-31-2011 8:45 PM
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
use in qurey in mapping tab:
ifthenelse(columnname is null,' ',columnname)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe yu can user the function nvl located on Miscellaneous Functions with this yuo can replace null value for a specific value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response. But my problem is, I need the NULL value in a source column ( datatype VARCHAR) to be loaded as a NULL value only (NOT Blanks) into a teradata target column (of datatype varchar or char ). I do not have a problem when loading source data of datatypes DATE and INT (NULL in source loaded as NULL in teradata target). It is only with columns of datatype varchar, i have this issue.
My ds.config has the following parameters set as:
LOADER_REPLACE_NULL_WITH=(null)
LOADER_REPLACE_BLANK_WITH=-null-
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.