Before and After SQL in netezza Enterprise 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
nansekar
Participant
Posts: 29
Joined: Mon Nov 03, 2008 6:23 am

Before and After SQL in netezza Enterprise Stage

Post by nansekar »

Hello

Does Netezza Enterprise stage as options for Before and After SQL.
The current version which i am working on is 8.1 and I dont see a option in netezza enterprise stage to have Before and After SQL

How it can be specified in Netezza enterprise stage
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

I think we do not have that option in Netezza Enterprise stage.We can achieve one[Before and After SQL] as below

After SQL If you are using Netezza Enterprise stage as target-

By writing Unix shell script through which we can access Netezza Database by using nzsql[It is similar to sqlplus in Oracle] and calling that script through After-SubRoutine

Before SQL If you are using Netezza Enterprise stage as source-

By writing Unix shell script through which we can access Netezza Database by using nzsql[It is similar to sqlplus in Oracle] and calling that script through Before-SubRoutine


But I am not sure how to achieve both the things?
nansekar
Participant
Posts: 29
Joined: Mon Nov 03, 2008 6:23 am

Post by nansekar »

Hello Team,
Please help me out to understand this.
There is a Option In Netezza Enterprise stages under Property tab, Options.

we have 2 options :

1.Close Command
Specify an SQL statement to run before the insert array is processed. You cannot commit work by using this option. The statements are executed only once on the conductor end node (node).
Command Specified in Close command executes as Post SQL.


2. Open Command
Specify an SQL statement to run after the insert array is processed. The statements are run only once on the conductor node.
It has said that the statement will be executed after Insert array statement, but when i tested its working as a PRESQL.


In this Context what does Insert array exactly means
Is there any differencence between conductor node and conductor end node.




The current datastage version which i am working on is 8.1
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You are misinterpreting what "insert array processing" means. As you've noted, for all practical purposes Open & Close are synonymous with Pre & Post SQL.
-craig

"You can never have too many knives" -- Logan Nine Fingers
nansekar
Participant
Posts: 29
Joined: Mon Nov 03, 2008 6:23 am

Post by nansekar »

Thank you Craig, So i will use Open command for pre sql and Close command for Post sql.. :)
Post Reply