Enabling Netezza Analytics for use in a database

Many of Netezza’s analytic functions require the presence of some metadata tables/views in order to work.  These tables/views are created when you initialize the analytic libraries in a particular database.

SYSTEM(ADMIN)=> call nza..kmeans('intable=t1,id=int1,k=10,model=kmeans,outtable=out,maxiter=5');
ERROR:  The metadata tables are not initialized. Please initialize: call nza..initialize();

Following this instruction generates this error:

SYSTEM(ADMIN)=> call nza..initialize();
NOTICE:  A "CREATE TABLE", "CREATE VIEW", or "GRANT" statement did not succeed.
You must enable your database for INZA first (run the script "create_inza_db.sh ").
For details, see the installation guide.

ERROR:  CREATE TABLE: permission denied.

In order to initialize the database properly, you have to call a shell script that comes with the analytics package.  That script is /nz/export/ae/utilities/bin/create_inza_db.sh.  It takes the database as a single parameter and creates several groups to manage privileges for that database.  Those groups are:

INZAUSERS — users who can execute analytic functions

INZADEVELOPERS — users who can create analytic functions

INZAADMINS — users who can create and manage other user’s analytic functions

In addition to this, the script will initialize the metadata tables properly.  The output of the script will look like:

[nz@netezza~]$ /nz/export/ae/utilities/bin/create_inza_db.sh foo
CREATE GROUP
CREATE GROUP
CREATE GROUP
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
REVOKE
ALTER USER
ALTER USER
 INITIALIZE
------------
 t
(1 row)

                     INITIALIZE
----------------------------------------------------
 The metadata objects are successfully initialized.
(1 row)
Advertisements
This entry was posted in administration, analytics, General and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s