EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.


Run SAS Procedures inside Netezza

Question: Netezza is doing a fantastic job in data procession, No doubt about that! But how about SAS procedures, Can we run SAS procedures inside Netezza box ?

Answer: There are so far 7 SAS procedures enabled in-database executing inside Netezza: Proc SQL, Proc Freq, Proc Means, Proc Rank, Proc Report,Proc Sort,
Proc Summary, Proc Tabulate.
Netezza 5 or higher are required. How can you run and test that?

First, you need to have the authoriry to run that; otherwise, there will be some error log message showing up. Then there are several options you have to enable:

Here are the options ...
sastrace=',,,d': specifies that all SQL statements that sent to DBMS are sent to log.
nostsuffix : make your log output much more easier to read and understand
msglevel=i : show all levels of log output.
sastraceloc=stdout or sastraceloc=file 'c:\work\trace.log': specify log location.
In the following netezza library connection:
libname nza_lib netezza server='****' database=*** user=**** Password=****
connection=unique read_only=no autocommit=yes sqlgeneration=DBMS;

sqlgeneration=DBMS: allows SAS procedures(e.g. Proc Freq) that are enabled for in-database processing to generate SQL. By default, sqlgeneration=NONE; if you don't specify sqlgeneration=DBMS, then you are not able to run Proc Freq Inside Netezza.

Now you can run one of those 7 procedures inside Netezza, for instance, run this basic Freq procedure:

        Proc freq data=nza_lib.data1;
        table var1; run;

You will notice some difference in the log output window. When this freq procedure is running inside netezza, you will see some corresponding sql code generated in log output, which tells you that it's running inside netezza; Otherwise, it's still inside SAS, reading the data first, then running proc freq. You can see the log output in the following picture, click to see bigger.

Also you can run some other procedures inside Netezza, it requres calling nza system build-in functions; for example, here is the code to run liearn regression inside Netezza (via Aginity):

        CALL nza..LINEAR_REGRESSION('model=modelA, intable=fitness,
        id=id, target=Oxygen, calculateDiagnostics=true');

Click to see bigger: How Can you Run SAS Procedures inside Netezza?.

Run SAS Procedure inside Netezza

Related links:

Continue to : Common Errors collections inside Netezza/SAS running   SAS tutorial home
Back to: Damerau Levenshtein distance in SQL Netezza   Statistics tutorial home