Installing Vertica Extensions on Vertica Database Cluster

To enable Vertica for PPM, you need to create the following functions on the Vertica database cluster:

  • The BRIDGE_HIERARCHY function by installing VerticaUDx.jar
  • The tlm and datadscale functions by installing RFunction.R

Creating BRIDGE_HIERARCHY

To create the BRIDGE_HIERARCHY function, follow these steps:

Prerequisite: Check the Java version on the clustered Vertica database servers with the following command and make sure the version is 1.7.0_55 or later:

java -version

  1. Copy VerticaUDx.jar from the unzipped package to a directory on the Vertica cluster initiator node. For example, /home/dbadmin/. Make sure you have Read access to that directory.

    To install the UDx library, you must copy the JAR file to the initiator node in the Vertica cluster. Then connect to the node to execute the CREATE LIBRARY statement.

    For more information about how to install the UDx library on Vertica cluster, refer to Developing User Defined Functions in Java in the Extending HP Vertica Guide.

  2. On the Vertica client, open the vsql client or any other administration tools that can run SQL commands.

  3. Specify the directory that Java is installed in the Vertica database with the following SQL command:

    SELECT SET_CONFIG_PARAMETER('JavaBinaryForUDx','<JAVA_HOME>');

    For exmaple, if Java is installed at /usr/bin/java, the command should be:

    SELECT SET_CONFIG_PARAMETER('JavaBinaryForUDx','/usr/bin/java');

  4. Create the BRIDGE_HIERARCHY function with the following commands:

    CREATE OR REPLACE LIBRARY JavaLib AS '<UDx_directory>'  LANGUAGE 'JAVA';
    CREATE OR REPLACE SOURCE BRIDGE_HIERARCHY AS LANGUAGE 'JAVA' NAME 'com.hp.ppm.bridge.BridgeSourceFactory' LIBRARY JavaLib;

    Replace <UDx_directory> with the directory where VerticaUDx.jar is located. In this example, the command should be:

    CREATE OR REPLACE LIBRARY JavaLib AS '/home/dbadmin/VerticaUDx.jar'  LANGUAGE 'JAVA';

Creating tlm and datascale

To create the tlm and datascale functions, follow these steps:

Prerequisite: To use R language with Vertica, you need to install the RPM (or Debian .deb) R language package that matches your server version.

Note: You must install the R Language Pack on each node in the cluster. The HP Vertica R Language package must be the only R Language package installed on the node. For detailed information, refer to Installing/Upgrading the R Language Pack for HP Vertica in the the Extending HP Vertica Guide.

  1. Copy RFunction.R from the unzipped package to any directory on a Vertica cluster initiator node. For example, /home/dbadmin/. Make sure you have Read access to that directory.
  2. On the Vertica client, open the vsql client or any other administration tools that can run SQL commands.
  3. Create the tlm and datadscale functions with the following commands:

    CREATE OR REPLACE LIBRARY rLib AS '<RFunction.R_directory>' LANGUAGE 'R';
    CREATE OR REPLACE TRANSFORM FUNCTION tlm AS LANGUAGE 'R' NAME 'tlmFactory' LIBRARY rLib;
    CREATE OR REPLACE FUNCTION datascale AS LANGUAGE 'R' NAME 'datascaleFactory' LIBRARY rLib;

    Replace <RFunction.R_directory> with the directory where RFunction.R is located. In this example, the command should be:

    CREATE OR REPLACE LIBRARY rLib AS '/home/dbadmin/RFunction.R' LANGUAGE 'R';