Customized SQL in Oracle_Enterprise stage

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
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Customized SQL in Oracle_Enterprise stage

Post by lindatgeorge »

Hi,

I need to truncate and load the Oracle table in a parallel job using Oracle_Enterprise stage. While loading I need to pass customized SQL also.But I could not find any options for the same in Oracle enterprise stage.

Could you please help me on this.

Thanks in advance...

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

Post by Sainath.Srinivasan »

Do it in two steps - one truncate and custom SQL.

Btw, what you expect to do as 'custom' ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The answer will also depend on what kind of 'load' you are referring to.
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Load mode allows you to truncate the table before loading but restricts from using customized sql.

Upsert mode allows to write customized SQL but restricts for using truncate option like load.

So its better if you truncate the table in before job subroutine and use customized query in OE stage using upsert mode.

However it depend on kind of load and also the requirements.
Last edited by priyadarshikunal on Fri Jul 03, 2009 8:33 am, edited 1 time in total.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
lindatgeorge
Participant
Posts: 34
Joined: Mon Jun 15, 2009 12:16 am
Location: Bangalore

Post by lindatgeorge »

I need to load the tables daily. But before loading the data, I need to truncate the data, so that only one day's data will be present there.
Also while inserting data I am getting value from one oracle source table and few parameters. So I need to refer the parameters also in the insert statement. That is what I meant by customized SQL.


Please let me know if you need any more info.

thanks...
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Can't you use those parameters inside the job itself?

Provide more information and you may get a better logic to implement the same.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Design the job to perform reference activity such that the load is only 'load with truncate'.
Post Reply