how to pass table name to oracle stage?

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
yabhinav
Participant
Posts: 37
Joined: Wed Mar 05, 2008 11:54 pm
Location: Hyderabad

how to pass table name to oracle stage?

Post by yabhinav »

Is it possible to send table name to oracle stage when using it in conjunction with a lookup?

I'm able pass column names using ORCHESTRATE.column_name but when I do the same for table name it says invalid table.

Is there any work around for this?

P.S: I'm using sparse lookup
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No. While the table name can be a job parameter it cannot be dynamically supplied from the input data, if that's what you are trying to do. Now, that doesn't mean you couldn't build some kind of stored procedure to do that, I would think.
-craig

"You can never have too many knives" -- Logan Nine Fingers
yabhinav
Participant
Posts: 37
Joined: Wed Mar 05, 2008 11:54 pm
Location: Hyderabad

Post by yabhinav »

Thanks for the information Craig. I'm planning to frame the query before the job starts and send it as a parameter.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to look into the 'sql file' option instead of passing in the query as a parameter.
-craig

"You can never have too many knives" -- Logan Nine Fingers
yabhinav
Participant
Posts: 37
Joined: Wed Mar 05, 2008 11:54 pm
Location: Hyderabad

Post by yabhinav »

chulett wrote:You might want to look into the 'sql file' option instead of passing in the query as a parameter. ...
Can you please elaborate. I have no idea where to find the sql file option?
yabhinav
Participant
Posts: 37
Joined: Wed Mar 05, 2008 11:54 pm
Location: Hyderabad

Post by yabhinav »

I got it. Its available in the RDBMS stage. I was searching for the option in Oracle stage! :oops:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It may not be documented all that well, it works in more than just the DRS stage from what I recall.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

yabhinav wrote:Thanks for the information Craig. I'm planning to frame the query before the job starts and send it as a parameter.
Let us know if this works. I remember that i tried this years back and was not lucky...
Kandy
_________________
Try and Try again…You will succeed atlast!!
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

You can build the query by writing a routine and then you can pass the table name.
Regards
Sreeni
Post Reply