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
sequential file is rejecting records with null values
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 143
- Joined: Thu Nov 04, 2004 6:53 am
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.
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.
define the null field value
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.
For that double click on that column (u get edit column Metadata editor)there specify the null field value.
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.
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.
-
- Participant
- Posts: 36
- Joined: Wed Feb 16, 2005 5:20 pm
- Location: IL
Re: sequential file is rejecting records with null values
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
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
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
A full stop is followed by two spaces. Just like on this line.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
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn