Non Nullable to Nullable using Modify stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 60
- Joined: Tue Jul 12, 2005 3:34 am
Non Nullable to Nullable using Modify stage
Hi,
I have a non nullable field in source. But in target this field is non nullable. I want to make it non nullable using modify stage. Currently this is achieved using transformer stage. Also if the value of the field in source is '' then i want to set it to null in target. I could find nullable to non nullable handling using handle_null functions but i want the reverse.
Can anyone help.
Thank In Advance.
I have a non nullable field in source. But in target this field is non nullable. I want to make it non nullable using modify stage. Currently this is achieved using transformer stage. Also if the value of the field in source is '' then i want to set it to null in target. I could find nullable to non nullable handling using handle_null functions but i want the reverse.
Can anyone help.
Thank In Advance.
Re: Non Nullable to Nullable using Modify stage
Hikhanparwaz wrote:Hi,
I have a non nullable field in source. But in target this field is non nullable. I want to make it non nullable using modify stage. Currently this is achieved using transformer stage. Also if the value of the field in source is '' then i want to set it to null in target. I could find nullable to non nullable handling using handle_null functions but i want the reverse.
Can anyone help.
Thank In Advance.
You want to do non nullable to nullable or
nullable to non nullable?
Ashwin
-
- Participant
- Posts: 60
- Joined: Tue Jul 12, 2005 3:34 am
Non Nullable to Nullable using Modify stage
Hi,
My mistake. Source is Non-Nullable and Target is Nullable.
In the join stage if the join is outer and if the condition fails then the fields which are non nullable will have '' values.
In the target, if such values are nullable i want to assign Null to these fields.
eg If field1 = '' then SetNull else field1
But in the specification of Modify stage i can not use if then else...
Any idea how to achieve this...
Thanks in advance...
My mistake. Source is Non-Nullable and Target is Nullable.
In the join stage if the join is outer and if the condition fails then the fields which are non nullable will have '' values.
In the target, if such values are nullable i want to assign Null to these fields.
eg If field1 = '' then SetNull else field1
But in the specification of Modify stage i can not use if then else...
Any idea how to achieve this...
Thanks in advance...
What is the output stage. If it is sequential file stage, try to play with "Nullable field value" and "Default value", I guess you can acheive your need, using these option. And can avoid Modify stage as well. I dont have access right now, will let you now later.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
khanparwaz,
Maybe you can try the following
After join stage, add Filter stage to filter into two links, one with '' values, the other without. Then add Modify stage after the link with '' values, and set the specification to be "field = make_null(field, "")". Then combine these two links with Funnel stage.
Is it what you wanted ?
Maybe you can try the following
After join stage, add Filter stage to filter into two links, one with '' values, the other without. Then add Modify stage after the link with '' values, and set the specification to be "field = make_null(field, "")". Then combine these two links with Funnel stage.
Is it what you wanted ?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 60
- Joined: Tue Jul 12, 2005 3:34 am
Non Nullable to Nullable using Modify stage
Yes I want to set the field to Null if its ''.benny.lbs wrote:It seems his requirement not only to change the nullability, but also want to set NULL.
ray.wurlod wrote:What about simply targetfield:nullable integer=sourcefield ? ...