Extracting data from source

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
waitnsee
Participant
Posts: 23
Joined: Tue Jul 06, 2004 10:20 am

Extracting data from source

Post by waitnsee »

how do I ensure that, I am not reading the same record from the source?
Is there any specific mechanism?

thanks.

VPR
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I think that you need to store the source table's primary key in the target table or a permanent staging table.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Somewhere you need to record that you've processed it. If there's an incrementing key in the source, all you need to record is the maximum key value processed, and select any key larger. If the records in the source are timestamped, you can select on this basis. Store the primary keys when extracting; at worst you can use a NOT IN join when selecting the next batch. There are other ways too. Know your data and be creative in thinking about your ETL techniques!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply