can we execute oracle queries through any Datastage function

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
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

can we execute oracle queries through any Datastage function

Post by parvathi »

Hi all,
can we execute oracle queries through any Datastage function like how we execute unix commands.
As when i want the output of a single select query
'select * from tablename' i put this in a sqlfile in my unix directory and execite this file through the unix commands in the routine and assign to a variable in the datastage.

Can it be done in a simpler way?


Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Depends what "and assign to a variable in the datastage" means. Simplest way is probably in a job, but it all hinges on what you mean - how you plan on using this information you're selecting.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi Parvathi,
Why cant you use the OCI stage and output to a sequential stage for this. Which is for the same reason. If you the SQL that you use is not compatable in OCI stage, you can alternatively use Shell script directly to call the .sql through ExecuteCommand Activity or in any Before/After subroutine. But it doesnt make much difference from your previous approach.
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 »

There is no single function out of the box. But it's certainly possible to write a generic "Run SQL" function using BCI functions; I wrote one aeons ago. But, because you are UNIX-based, and presumably using the Data Direct ODBC drivers shipped with DataStage, you will need a licensed ODBC driver to adopt this approach.
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