sequential file is rejecting records with null values

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
vcannadevula
Charter Member
Charter Member
Posts: 143
Joined: Thu Nov 04, 2004 6:53 am

sequential file is rejecting records with null values

Post by vcannadevula »

Hi all,

I am populating records into a sequential file where columns are defined as nullable but still the file is rejecting rows if we dont specify any null field value.My requirement is to not to have any value in the null fields

Please let me know what all options I have to change for this

Thank You
bgs
Participant
Posts: 22
Joined: Sat Feb 05, 2005 9:43 pm

Post by bgs »

If the column is nullable and you are receiving nulls then you have to mention null feild value when you are using sequential file.
I think using a dataset is a better option where you dont have to mention any null feild value.
But if your requirement is to use a sequential file stage then you have to mention a null feild value.
vbeeram
Participant
Posts: 63
Joined: Fri Apr 09, 2004 9:40 pm
Contact:

define the null field value

Post by vbeeram »

When u use sequential file stage,define the value for nullable field.
For that double click on that column (u get edit column Metadata editor)there specify the null field value.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Simple solution:

Add the following Environment Variable:

APT_IMPEXP_ALLOW_ZERO_LENGTH_FIXED_NULL

Set the value for the above environment variable to 1.

In every Sequential File (Input and Output), Click on Format tab, Field defaults folder, and choose "Null Field Value", and set the value to '' (two single quotes.)

That way, the flat file will have blanks.

This will NOT work properly with fixed length files. You will have to employ the prior post's solution for fixed length files.
chalasaniamith
Participant
Posts: 36
Joined: Wed Feb 16, 2005 5:20 pm
Location: IL

Re: sequential file is rejecting records with null values

Post by chalasaniamith »

hi to all,
I am populating records into a sequential file where columns are defined as nullable but still the file is rejecting rows if we dont specify any null field value.My requirement is to not to have any value in the null fields

Is Sequnetial file will check this contraint while writing the reocrds.I thought seq file just writes the row as specified .If i am wrong let mek now.
For ex i am specifying that in seq file there is a primary key but its still writing the duplicates also in server job .Usally files write thr rows but doent check the constraints
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Can you please use the quote metatag to quote the previous posts?

Your reply is unreadable because it's mixed with the quotes.

Thanks.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

For ex i am specifying that in seq file there is a primary key but its still writing the duplicates also in server job .Usally files write thr rows but doent check the constraints
A full stop is followed by two spaces. Just like on this line.

The sequential file stage cannot remove duplicates, the key fields you define in this stage are meaningless as a sequential file has no indexing or primary key processing. You need to use the sort stage, the remove duplicates stage or the aggregation stage to remove duplicates.
bgs
Participant
Posts: 22
Joined: Sat Feb 05, 2005 9:43 pm

Post by bgs »

In the partitions tab in sequential file you can select any collecting type and select the unique option , and select the column in which you receive duplicates.this will sort the incoming records
Post Reply