How to maintain updated information as well as tracking

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
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

How to maintain updated information as well as tracking

Post by srinivas143 »

Hi All,

I had a requirement as follows.

I need to compare todays data and previous days data based on a key column and need to Insert new records and update the existing records...

scenario as follows...

previous day data

code
----
INR
USD

Todays data

code
----
INR
AUD


I need to compare the currency codes and If a new currency comes I need to insert the new record and update existing records.

And also I need to keep track of the new codes come in that day and existing codes which are not present in today's file
-------------------------------------
Resultant data need to contain as follows
Actual table
------------
code
----
INR
USD
AUD

Tracker table
-------------
AUD---New record
USD---Existing record which was not present in todays file


Any suggestions regarding what kind of stage I can use to do this scenario

Pls advise me

Kind Regards
Srini
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Read the parallel job developers guide for change data capture stage
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post by AmeyJoshi14 »

keshav0307 wrote:Read the parallel job developers guide for change data capture stage
hmmm...You can also use diff stage to achieve this purpose... :roll:
http://findingjobsindatastage.blogspot.com/
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

You can identify what is new & what is changed using CDC stage (Change Data Capture)
For new record Insert Code = 1
For Updated record Edit Code = 3
These codes are built-in in the CDC stage.
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Thank you all...will check
Post Reply