How to use ORCHESTRATE in presql

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
bgs_vb
Premium Member
Premium Member
Posts: 79
Joined: Mon Jan 02, 2006 5:51 am

How to use ORCHESTRATE in presql

Post by bgs_vb »

Hi ,
We have created a parallel job using Teradata connector stage as target ,sequential file as source stage .

We need to delete few records using presql before loading the data.
Delete from table where col1=orchestrate.col1 .

But job is aborting with error as "Object 'ORCHESTRATE' does not exist."

How do we use orchestrate in presql in teradata ?
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Hi,
I came to understand that we cant use ORCHESTRATE in Pre/Post sql statement since it Pre/Post sql statement executes once for stage and Orchestate will execute for each and every row processed.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't leverage any "row data" in the pre or post areas, which is basically what you are trying to do. You'd either need to hard-code any values there or perhaps use job parameters to control what values get deleted.

So what kind of "few records" do you need to delete?
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

If you are doing an insert , Can you try the "Delete Before Insert" Action in the "Write Mode" property ? That may allow you to use row values ( probably auto generated SQL)
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

To add to this make sure you make the column as key based on which records are to be deleted before insert
Thanks,
Prasanna
Post Reply