Passing Job Parameter value in Oracle Connector Stage query

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
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Passing Job Parameter value in Oracle Connector Stage query

Post by nirdesh2 »

Hi,

I am running the sql query using "read select statement from file" in Oracle connector stage and I need to pass job's parameter value to this query at run time like extract date.
Can you suggest how we can pass the Parameter to sql query at run time.
I am using DS 8.5 version.
Nirdesh Kumar
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Sequencer the process.
Step 1) Have a script parse the text file first and string replace the tags with your environment variables being passed in. Output is a new text file coded with unique timestamp or runid for this execution.

Step 2) Take the NEW text file containing the massaged sql statement and pass that to your next job.

Step 3) Delete temp text file if job ran ok.


*drops 2 cents into cup*
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right... SQL files do not support #parameters# in them so you've got to build / rebuild the file each run with any parameter values subsituted in.

*throws another penny in the cup*
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply