Page 1 of 1

Nullable Property in columns

Posted: Tue Nov 15, 2016 9:13 am
by s_avneet
Hi All.

Will DataStage not throw an error if a columns is set to Nullable = no is passed with a blank value??

I have set the Columns to Nullable = No in the column properties for both In and Out seq file.
On passing a blank value in one of the columns, it does not fail the record.

What i expected was the record to be rejected as not nullable was something like mandatory?

Thanks

Posted: Tue Nov 15, 2016 9:52 am
by qt_ky
These are all different things:
- Blank value or the empty string (known)
- Blanks or spaces (known)
- The ASCII null value or character zero (known)
- The Null value (represents the unknown)

Posted: Tue Nov 15, 2016 2:51 pm
by UCDI
as stated, blank and null are not the same.
The easy way out for a lot of data is to check the trimmed string's length and reject anything = 0. Specific data may need additional logic, but this gets a lot of them. Non-strings use similar ideas.

Posted: Wed Nov 16, 2016 8:36 am
by asorrell
Avneet,

Please do not hijack threads with a different topic, even if it is a thread you started. I've split out your second question to a different thread here.

viewtopic.php?p=474670

If you are done with this thread, and it answered your question, please mark it "Resolved" at the top of the page.

Thanks!