Page 1 of 1

How to use ORCHESTRATE in presql

Posted: Thu Mar 07, 2013 1:37 am
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 ?

Posted: Thu Mar 07, 2013 5:21 am
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.

Posted: Thu Mar 07, 2013 7:23 am
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?

Posted: Thu Mar 07, 2013 5:00 pm
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)

Posted: Fri Mar 08, 2013 12:30 am
by prasannakumarkk
To add to this make sure you make the column as key based on which records are to be deleted before insert