parent child initial loading

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
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

parent child initial loading

Post by DSRajesh »

Dear All,

I have two empty master detail tables say journey (journeyid is PK) AND Trucks(Truckid is pk,journeyid if FK)
i have loaded master table records and i need to load second table Trucks where i need to populate journeyid values from Journey table.
as Trucks is an emptty table ,i dont have any matching keys bewteen Journeys and Trucks.then how can i load the trucks with journeyid column from master table journeyid values.

can any one suggest me on this about approach.

thanks
raj
RD
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Not sure what you are asking.

You must investigate your source systems to see what is available.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would be a question to an Analyst or Modeler at your site, not sure how anyone else would know your data / structures. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
hiral.chauhan
Premium Member
Premium Member
Posts: 45
Joined: Fri Nov 07, 2008 12:22 pm

Re: parent child initial loading

Post by hiral.chauhan »

DSRajesh wrote:Dear All,

I have two empty master detail tables say journey (journeyid is PK) AND Trucks(Truckid is pk,journeyid if FK)
i have loaded master table records and i need to load second table Trucks where i need to populate journeyid values from Journey table.
as Trucks is an emptty table ,i dont have any matching keys bewteen Journeys and Trucks.then how can i load the trucks with journeyid column from master table journeyid values.

can any one suggest me on this about approach.

thanks
raj

You need to find out the relationship between your Journey table and your Trucks table. Something like

One truck can make Many Journeys.

Then you can select JourneyId where truck = 'MyTruck'

Does that make sense?


-Hiral
Thanks,
Hiral Chauhan
Post Reply