records sincs last run date

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
DSkkk
Charter Member
Charter Member
Posts: 70
Joined: Fri Nov 05, 2004 1:10 pm

records sincs last run date

Post by DSkkk »

hi All,
i am extracting data from one table of teradata and putting it to another making some necessary transformations. if i run this job today then i am supposed to get the new records in the input table since last run date. but my input table doesn't have any column as timestamps to compare. if i save the last run date still i don't have anything in the table to get records after the last run date.
can anyone suggest anything for this?
thanks.
g.kiran
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

I assume there will be some column for the people populating it to determine whether the changes are successful as otherwise you may landup updating all rows.

Alternate options are
1.) Set a trigger to populate another temp table for any DML actions and use this temp table in your job.
2.) Use DataStage to generate checksum for each row and store in some table. So next time you receive the same key (assume there is some key), you can match this checksum to determine whether there has been any change since last capture.

In software like Oracle, you have CDC (Change Data Capture) mechanism for this purpose that you can use.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

My first suggestion is to bone up on Kimball's concept behind data warehousing.

My second suggestion is to implement a local resource file that is compromised of the previous data (and updated every time via lookup within Transformer), and compare the key fields with the input data. It's not as robust as EE's Change Capture stage, but it's a simple solution to identify new records.
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Doing comparision with all your records will cost you lot in terms of time and resource.
How hard is to add a new column with date and timestamp in your table. Make the column defaulted to currect date and timestamp. Create an index to this new date column. Use this column to extract data which will cost you less.

Thanks
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Post Reply