DataSet rejecting null records

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
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

DataSet rejecting null records

Post by reachmexyz »

Hi All

I am reading the data from a table and creating a dataset. Later i will use the same dataset in another job, do some transformations creating another file.
When i read the dataset in second job ( which is created in first job), some of the records are getting rejected because of a null in one the column.
Error below:
APT_CombinedOperatorController(2),1: Field 'HENCL' from input dataset '0' is NULL. Record dropped.
I know dataset accept nulls. I have checked the metadata and nullability was set to Yes. I couldn't figure why dataset is not reading the record with HENCL column NULL. I want this column as null.
Please help me out.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

* What database are you coming from?
* How is the data being read from the database? (SQL, table read, etc.)
* How is the field defined in the database?
* Have you confirmed that the data is stored in teh dataset as nullable? (Note: I like to look at the dataset on the server itself and check its schema using orchadmin: orchadmin describe -s <dataset>)

Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post by reachmexyz »

Column in database is nullable. I am using user defined SQL to pull data form database. I want this column as null. Thats why i am not using any null functions on this column. I cannot check orchadmin as it is not installed properly and not working. Is there any other way i can check teh descriptor file of datase.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

Not to get distracted, but when you say orchadmin is not installed right or not working, are you getting library errors? Something like this:
exec(): 0509-036 Cannot load program orchadmin because of the following errors:
0509-150 Dependent module /opt/CA/UnicenterAutoSysJM/autosys/lib/libicui18n.a could not be loaded.
0509-103 The module has an invalid magic number.
??

If so, do the following at the command line:

Code: Select all

. $DSHOME/dsenv
Then, in the same session where the dsenv was sourced, do your orachadmin commands. I know that on our system, I have to source in dsenv before I can run DataStage commands.

Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

First, rerun the job with APT_DISABLE_COMBINATION set to True and then let us know the exact operator/stage producing the error.
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post by reachmexyz »

mhester wrote:First, rerun the job with APT_DISABLE_COMBINATION set to True and then let us know the exact operator/stage producing the error.
I did ran the job with the paramter and log says Dataset is producing the erorr. Does DataSets doesnt take NULLS.
Whenever a look up is failed for a column, i am getting blank as the output instead of null. I was using NullTovalue(nullcolumn) and its not working. But when i changed to nullcolumn='', it started working.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

When you use NullToValue function you have to give some default value. Usually NullToValue(Column,'') if you want to default it to empty string.

As far as your original error message, are you doing any transformation on the field HENCL like using a Trim function etc without null handling.

Code: Select all

APT_CombinedOperatorController(2),1: Field 'HENCL' from input dataset '0' is NULL. Record dropped. 
These warnings are thrown whenever you are trying to apply a transform function without handling null values explicitly because a null value cannot be trimmed etc.

Hope that helps.
Kris

Where's the "Any" key?-Homer Simpson
nitkuar
Participant
Posts: 46
Joined: Mon Jun 23, 2008 3:09 am

Post by nitkuar »

I would also go with Kris and thinks that you are probably using transformation functions on this column without handling nulls explicitly.
Post Reply