I defined a source as a sequential file where one column is set as Nullable "No".
The data is coming correctly. But when I load the data into database, I can see some null values. (The data is being loaded as the column is defined as nullable in database oracle).
So I want to replace the null value with a pre-defined string. Before that, I want to trim first and then check for null values.
So, first, i am trying to trim the string. I used function as follows in specifications for MODIFY stage.
ADDR_1=STRING_TRIM[NULL,end](ADDR_1)
When I execute the job, I am getting the following error:
OC_LOAD_TUTORIAL_TBL: ?? (IIS-CONN-DAAPI-000398; Schema reconciliation detected a size mismatch for column ADDR_1. When writing column VARCHAR(min=0) into database column VARCHAR(min=0,max=30), truncation, loss of precision or data corruption can occur.; CC_DBSchemaRules; reportSizeMismatch; CC_DBSchemaRules.cpp; 1,575)
Am I missing anything here.
Thanks a lot in advance.
Null handling issue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 21
- Joined: Tue Nov 02, 2010 2:36 pm
- Location: India
Null handling issue
Thank you,
Regards
Gowtham
(Learning DS)
Regards
Gowtham
(Learning DS)
empty string and null are two different things.I want to trim first and then check for null values
If you are using modify stage just for this purpose, I don't think its a good idea. Moreover as you have mentioned that in source sequential you defined that column as nullable No, then in that case you can't get values from source.
Also you have mentioned that in Oracle you are able to see blank values. Are you sure that those are NULL values or they could be empty strings as well?
-
- Participant
- Posts: 21
- Joined: Tue Nov 02, 2010 2:36 pm
- Location: India
Thanks for your reply.
Yes, I execute the query with condition as Where ADDR_1 Is null in oracle database. It returned many records.nitkuar wrote:Also you have mentioned that in Oracle you are able to see blank values. Are you sure that those are NULL values or they could be empty strings as well?
Thank you,
Regards
Gowtham
(Learning DS)
Regards
Gowtham
(Learning DS)