Null handling in schema file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 111
- Joined: Mon Nov 30, 2009 7:21 am
- Location: Bangalore
Null handling in schema file
Hi,
I'm facing warning message as "Exporting nullable fileld without null handling properties" in the stage in target position. The job is using schema file. I handled null in schema file as empty spaces.
Here comes the list of stages in the job,
1. sequential file ( source - using schema file)
2. Oracle (Upsert)
3. Reject link from oracle to Transformer ( just to abort the job if reject record count exceeds n)
4. 1st Output of transformer to sequential file.
5. 2nd output to Peek stage (just to give the condition saying abort)
In the 4th stage, the record is not getting inserted if NULL values are coming from the transformer(source).
Kindly suggest me what can I do on this case without changing the design using schema file.
Many thanks,
Poovalingam.
I'm facing warning message as "Exporting nullable fileld without null handling properties" in the stage in target position. The job is using schema file. I handled null in schema file as empty spaces.
Here comes the list of stages in the job,
1. sequential file ( source - using schema file)
2. Oracle (Upsert)
3. Reject link from oracle to Transformer ( just to abort the job if reject record count exceeds n)
4. 1st Output of transformer to sequential file.
5. 2nd output to Peek stage (just to give the condition saying abort)
In the 4th stage, the record is not getting inserted if NULL values are coming from the transformer(source).
Kindly suggest me what can I do on this case without changing the design using schema file.
Many thanks,
Poovalingam.
Go to your output sequential file stage and column view, double-click on the column number for the nullable field and see if the column meta data actually does show that you are handling nulls.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 111
- Joined: Mon Nov 30, 2009 7:21 am
- Location: Bangalore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 111
- Joined: Mon Nov 30, 2009 7:21 am
- Location: Bangalore
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Define the field as non-nullable and add a reject link to the sequential file.
Code: Select all
field name:nullable data type
You are the creator of your destiny - Swami Vivekananda
By default columns are not nullable in a schema file. So, I tried it, but it is not getting rejected. If I specify Column:not nullable the job throws an error and says Unknown schema type.
Here is the content of my schema file
record{final_delim=none, delim='|', quote=none, charset="ISO8859-1"}
(
Col_One:nullable int32;
Col_two:string[10];
Col_Three:string[15];
)
I was wondering if there is an option I should specify in the record definition itself like the delim='|'.
May be some thing like
record{final_delim=none, delim='|', quote=none, null_filed_value="", charset="ISO8859-1"}
Do you have any idea Anbu?
Here is the content of my schema file
record{final_delim=none, delim='|', quote=none, charset="ISO8859-1"}
(
Col_One:nullable int32;
Col_two:string[10];
Col_Three:string[15];
)
I was wondering if there is an option I should specify in the record definition itself like the delim='|'.
May be some thing like
record{final_delim=none, delim='|', quote=none, null_filed_value="", charset="ISO8859-1"}
Do you have any idea Anbu?
-
- Participant
- Posts: 1
- Joined: Fri Nov 13, 2009 5:36 am
- Location: Kolakata
Hi Poovalingam,
You can modify your schema file like the following:
record
{final_delim=end, delim='|', null_field='', quote=none, charset="ISO8859-1"}
(
Col_One:nullable int32;
Col_two:string[10];
Col_Three:string[15];
)
null_field='' will specify- On import, the value given to a field containing a null. On export, the value given to an exported field if the source field is set to null.
Thanks,
Nil Kamal
You can modify your schema file like the following:
record
{final_delim=end, delim='|', null_field='', quote=none, charset="ISO8859-1"}
(
Col_One:nullable int32;
Col_two:string[10];
Col_Three:string[15];
)
null_field='' will specify- On import, the value given to a field containing a null. On export, the value given to an exported field if the source field is set to null.
Thanks,
Nil Kamal
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
record
{final_delim=end, record_delim='\n', delim=',', null_field="", quote=double}
(
DM_TIMESTAMP:timestamp;
DM_TXID:string;
DM_OPERATION_TYPE:string;
DM_USER:string;
BEFORE_COMPANY:nullable string {null_field=''};
BEFORE_FACDIVN:nullable string {null_field=''};
{final_delim=end, record_delim='\n', delim=',', null_field="", quote=double}
(
DM_TIMESTAMP:timestamp;
DM_TXID:string;
DM_OPERATION_TYPE:string;
DM_USER:string;
BEFORE_COMPANY:nullable string {null_field=''};
BEFORE_FACDIVN:nullable string {null_field=''};
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill