Change Capture to Get the Deleted Recods.

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
reddy.cba
Premium Member
Premium Member
Posts: 27
Joined: Wed Jan 31, 2007 3:32 am
Location: sydney

Change Capture to Get the Deleted Recods.

Post by reddy.cba »

HI,
I will try my best to explain the Logic i am trying to build...

we have a two tables A & B
I have to get the results output to a dataset for Delete records, Edit Recods and Insert Records:

Table A has two fields A1 & A2 with the values U1, T1 & U2, T2 & U3 , T3
Table B has two fields B1 & B2 with the values U1, T1 & U5, T2 & U6 & T6

Now if we use change capture using Table A Left outer Join Table B

we get
Copy stage records : U1 & T1
Insert Stage Recods: U3 & T3
Edit Stage recods : U2 & T2
when using chane capture with Key value as Field A2:
But i am Unable to get the deleted records i.e U6 & T6.
can anyone pls suggest how i should be able to get the deleted record.
When i use right outer join i will be missing again the records in A which do not present in B.
Please suggest any alternatives.
Thanks Heaps
Reddy
Man Has Created Money...Its not Money which has created Man....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use SQL set operator DIFFERENCE when extracting.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
reddy.cba
Premium Member
Premium Member
Posts: 27
Joined: Wed Jan 31, 2007 3:32 am
Location: sydney

Post by reddy.cba »

Thanks Ray,
I was able to get by making the following change:

Using Full Outer JOin
and changing the Drop Output for Column to false from Its Default Stage(True).
Post Reply