Nullable Property in columns

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
s_avneet
Participant
Posts: 22
Joined: Wed Aug 31, 2016 8:28 am

Nullable Property in columns

Post 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
Avneet
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post 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)
Choose a job you love, and you will never have to work a day in your life. - Confucius
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post 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.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post 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!
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply