reject a record!!
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 248
- Joined: Fri Jul 30, 2010 9:04 am
reject a record!!
A job is designed to load data into a table.
These records are unique records so before loading into the table remove_duplicates stage is used to remove the duplicates.
Finally all the records without the duplicates are loaded,one record among them has all fields null except a field which is "0" as it is an integer
Is there any function in transformer to remove that particular record before loading into the table?
Thanks
These records are unique records so before loading into the table remove_duplicates stage is used to remove the duplicates.
Finally all the records without the duplicates are loaded,one record among them has all fields null except a field which is "0" as it is an integer
Is there any function in transformer to remove that particular record before loading into the table?
Thanks
Regards,
Kenny
Kenny
-
- Participant
- Posts: 248
- Joined: Fri Jul 30, 2010 9:04 am
Transformer constraint
There are 5 fields( 4 char,1 integer)
the 4 fields has null in that records and the other interger field has "0".
IsNotNull(dslink.Person_name)
where Person_name is one of the 4 fields.
can I use the above function in the transformer constraint to reject the single record?
There are 5 fields( 4 char,1 integer)
the 4 fields has null in that records and the other interger field has "0".
IsNotNull(dslink.Person_name)
where Person_name is one of the 4 fields.
can I use the above function in the transformer constraint to reject the single record?
Regards,
Kenny
Kenny
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As mentioned above, create a single stage variable (svRejectFlag) and evaluate it based on all the columns that would make it true or false, and apply the constraint on the stage variable.
Code: Select all
svRejectFlag = IsNull(in.Col1) Or IsNull(in.Col2) ..
-
- Participant
- Posts: 248
- Joined: Fri Jul 30, 2010 9:04 am
I removed all the duplicates by using remove _duplicates stage so the field person_name has only one row which has null and that is the key which I used in remove duplicates.
For the safe side I will use the stage variable svRejectFlag.
In this stage variable IsNull(in.col1) or IsNull(in.col2)...cnotains only the rows with null values.
When you give a stage variable as svrejectflag does it reject the records which we described in the stage variable.
suggest please!!
Thanks,
For the safe side I will use the stage variable svRejectFlag.
In this stage variable IsNull(in.col1) or IsNull(in.col2)...cnotains only the rows with null values.
When you give a stage variable as svrejectflag does it reject the records which we described in the stage variable.
suggest please!!
Thanks,
Regards,
Kenny
Kenny
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No.kennyapril wrote:When you give a stage variable as svrejectflag does it reject the records which we described in the stage variable.
But it does give you a good basis on which to construct constraint expressions to handle the rows that are "good" and those which you wish to dispose of differently.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 248
- Joined: Fri Jul 30, 2010 9:04 am
-
- Participant
- Posts: 248
- Joined: Fri Jul 30, 2010 9:04 am