How to load current table records to historical table in tgt

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
ashoks99
Premium Member
Premium Member
Posts: 5
Joined: Wed Sep 06, 2006 4:26 pm
Location: hyd

How to load current table records to historical table in tgt

Post by ashoks99 »

Hi i have a job designed for scd2,in the target i have 2 tables historical and current table.My question is how to move records from current table to histotrical table my client wanted to do this weekly once.
Help would be appriciated a lot.
Havoc
Participant
Posts: 110
Joined: Fri Nov 24, 2006 8:26 am

Re: How to load current table records to historical table in

Post by Havoc »

ashoks99 wrote:Hi i have a job designed for scd2,in the target i have 2 tables historical and current table.My question is how to move records from current table to histotrical table my client wanted to do this weekly once.
Help would be appriciated a lot.
what is your target table structure? What are the columns used for identifying a history record ? Current Indicator.. Date Columns ?
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

We definitely need more info, as Havoc said. I am doing similar things, but would need to know general table layout structure to see how you are doing it. The way I do it now is to populate the additional fields I use for historical tracking and current row recognition during the transfer process, then everything is an insert marking the most current row with a flag.

Bestest!
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
ashoks99
Premium Member
Premium Member
Posts: 5
Joined: Wed Sep 06, 2006 4:26 pm
Location: hyd

Thans for replay i have some information

Post by ashoks99 »

In the target i have the following fields customer_ID,cust_state,Record_eft_dt and current_recoard_indicator so
if an update record comes then the fields Record_eft_dt should be with the updated date and the current_recoard_indicator should be "Y" here if the current_recoard_indicator already "Y" then it should be "N".
I hope its good information.Thanks,
ashoks99
Premium Member
Premium Member
Posts: 5
Joined: Wed Sep 06, 2006 4:26 pm
Location: hyd

Thans for replay i have some information

Post by ashoks99 »

In the target i have the following fields customer_ID,cust_state,Record_eft_dt and current_recoard_indicator so
if an update record comes then the fields Record_eft_dt should be with the updated date and the current_recoard_indicator should be "Y" here if the current_recoard_indicator already "Y" then it should be "N".
I hope its good information.Thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As you're doing the load perform a lookup against the target (or a copy of same) to determine existence, and set your flag accordingly.
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