DS Job Design

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

aditya
Charter Member
Charter Member
Posts: 41
Joined: Sat May 28, 2005 7:32 am

DS Job Design

Post by aditya »

All,

I have a staging table from which data would have to be loaded onto 6 different tables, only straight inserts.

The six table have a few attributes common amoung them.

I had 2 job designs in mind and I wanted your suggestions on the best strategy.

Strategy 1 :

One DS Job loading all the data into six different table involving the staging table, transfomer and six tables.

Strategy 2:

DS Job wherein the staging table would only select the fieds specific to each table and load data individually.

Thanks
Aditya.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Is it one staging table to 6 different table or 6 staging tables to 6 other tables.
If its the first case, the option speaks about populating the 6 target tables.
If i understand properly, But the first approach involves loading the staging table as well. Pls clarify.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

One job to select data, do all the transformations and then load to 6 flat files, identical to your target tables.
A job for each table.
All together 7 jobs. Keep it modular. Will help in restartability. Also keeps the segments well defined.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
aditya
Charter Member
Charter Member
Posts: 41
Joined: Sat May 28, 2005 7:32 am

Post by aditya »

Kumar,

Thanks for the reply. Sorry abt being unclear while asking the question.

Actually there is only ONE STAGING TABLE. This table feeds data into SIX DIFFERENT TABLES.

Thanks
Aditya.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

If performance squeezes, you can approach single job to avoid multiple read.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you have to stage into tables? Sequential files are much faster for staging areas. Are you REALLY still on version 4?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
aditya
Charter Member
Charter Member
Posts: 41
Joined: Sat May 28, 2005 7:32 am

Post by aditya »

Ray,

Unfortunately the client for which I work is still on Ardent 4.5.1 Version. They have a process of parsing complex flat files and loading into a staging table in Oracle. From where data would be picked up and later loaded to other ODS tables.

Thanks
Aditya.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If performance is being an issue, stage into text files and use sqlldr to get the data from there into the Oracle staging tables, perhaps in an after-job subroutine running ExecSH. You'll be amazed how much faster this can go. Don't use the ORABULK stage though - its performance is abysmal.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do you mean Sql loader used by Datastage is not scalable. Or its with the version?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm assuming he's specifically referring to the old ORABULK stage, which I don't really recall any specifics of. The newer ORAOCIBL stage in automatic mode loads data as fast as you can shove it into it. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The newer ORAOCIBL stage doesn't exist in version 4.x, however. To quote Mr Duke, the ORABULK stage serks!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Is it direct load from Staging to all 6 tables or are you doing any transformations in middle. If there are no transformations in between, use 6 select reads and insert into tables. Do it parralelly so that the performance might increase if DB doesn't have bottleneck. My suggestion is write 6 different jobs and call it parallely so that you have restartability if it fails for one table. Try to use ORABULK but not sure it's availability in version 4
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

6 repeated reads on the single table for restratability is not a wise approach.
Read one and write into 6 flat file and use SQL loader to load it as noted, or read and write in the same job as one option that you have mentioned.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

It's again depends on how Database and network servers are configured as well with number of CPU's (Environment) probably he can do a POC and go ahead based on that.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Even if database is very fine tuned and has high band width, its not worth hitting the database again and again for the same data. IMHO.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply