how to implement the oracle minus keyword in data stage

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
ramesh_c
Participant
Posts: 27
Joined: Thu Dec 14, 2006 3:37 am
Location: delhi

how to implement the oracle minus keyword in data stage

Post by ramesh_c »

Hi all,

I want to perform the minus which we will do in oracle through datastage .Is there any stage which will perform this .

Thanks in advance

Ramesh .
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Re: how to implement the oracle minus keyword in data stage

Post by Sreenivasulu »

HI ,

To implement MINUS (of oracle ) in datastage you can do in two ways:
1. Write the query containing MINUS in userdefined sql
2. Use a hash lookup making all the columns as keys (with a non unique contstraint) and reject if all the columns match.

Regards
Sreeni
ramesh_c wrote:Hi all,

I want to perform the minus which we will do in oracle through datastage .Is there any stage which will perform this .

Thanks in advance

Ramesh .
Yuan_Edward
Participant
Posts: 73
Joined: Tue May 10, 2005 6:21 pm
Location: Sydney

Re: how to implement the oracle minus keyword in data stage

Post by Yuan_Edward »

Try the combination of Outer join and filter stages.
ramesh_c wrote:Hi all,

I want to perform the minus which we will do in oracle through datastage .Is there any stage which will perform this .

Thanks in advance

Ramesh .
Edward Yuan
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What about the Change Data Capture stage?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Yuan_Edward
Participant
Posts: 73
Joined: Tue May 10, 2005 6:21 pm
Location: Sydney

Post by Yuan_Edward »

:) Good idea!
DSguru2B wrote:What about the Change Data Capture stage? ...
Edward Yuan
ramesh_c
Participant
Posts: 27
Joined: Thu Dec 14, 2006 3:37 am
Location: delhi

Post by ramesh_c »

Thanks all ,

I tried by using change data capture stage .But it is not giving the exact resullt which is coming through query .
I think i am giving wrong keys &values in the properties. What my requirement is "the records which are coming in current months from the file minus the rexcords that are coming prior month".

The value column i kept is Quantity. And rest of all columns from the file i kept as keys. I cant able to find what is wrong in it .


Thanks,
Ramesh.
Yuan_Edward
Participant
Posts: 73
Joined: Tue May 10, 2005 6:21 pm
Location: Sydney

Post by Yuan_Edward »

I took back what I said in my previous post. All the columns have to be keys to get the exact result (in this case only keep the Deletes). You may also want to remove the duplicates after change data capture.
=============================================
Does the metadata matches between the before and after data streams? Only the records with change code "Delete" or "Edit" should be kept as the result of "before data MINUS after data".

By the way i guess you don't have to give so many keys.
ramesh_c wrote:Thanks all ,

I tried by using change data capture stage .But it is not giving the exact resullt which is coming through query .
I think i am giving wrong keys &values in the properties. What my requirement is "the records which are coming in current months from the file minus the rexcords that are coming prior month".

The value column i kept is Quantity. And rest of all columns from the file i kept as keys. I cant able to find what is wrong in it .


Thanks,
Ramesh.
Edward Yuan
Post Reply