Class OlapAPI

java.lang.Object
com.jedox.etl.core.scriptapi.ScriptAPI
com.jedox.etl.components.scriptapi.BaseAPI
com.jedox.etl.components.scriptapi.OlapAPI
All Implemented Interfaces:
com.jedox.etl.core.scriptapi.IPropertiesAware, com.jedox.etl.core.scriptapi.IScriptAPI

public class OlapAPI extends BaseAPI
Use with binding OLAP to work with Jedox OLAP databases.

getDatabase(String) opens a connection to the OLAP server and returns an IDatabase object to access the database configured in a JedoxOlap connection in an Integrator project.

Example in Groovy to add a new cube Cube with two dimensions A and B to database Sample:


 db = OLAP.getDatabase("Sample");
 
 dimA = db.addDimension("A");
 dimB = db.addDimension("B");
 
 cube = db.addCube("Cube", [dimA, dimB] as IDimension[]);
 
  • Constructor Details

    • OlapAPI

      public OlapAPI()
  • Method Details

    • getConnection

      public com.jedox.palojlib.interfaces.IConnection getConnection(String connection) throws com.jedox.etl.core.component.ETLRuntimeException
      Opens a connection to the OLAP server from a JedoxOlap connection. Use the returned IConnection to manage databases on this server.

      This connection will be closed automatically At the end of the Integrator execution.

      To access the database in a JedoxOlap connection, use getDatabase(String) directly instead of getConnection(String) and then IConnection.getDatabaseByName(String).

      Parameters:
      connection - name of a JedoxOlap connection in the Integrator project
      Returns:
      an IConnection to access the open connection
      Throws:
      com.jedox.etl.core.component.ETLRuntimeException - if an error occurs and log level is set to "OFF", otherwise the error is logged with the configured level (ERROR by default)
    • getDatabase

      public com.jedox.palojlib.interfaces.IDatabase getDatabase(String connection) throws com.jedox.etl.core.component.ETLRuntimeException
      Opens a connection to the OLAP server from a JedoxOlap connection and returns an IDatabase object for the database of the JedoxOlap connection.

      This connection will be closed automatically At the end of the Integrator execution.

      Parameters:
      connection - name of a JedoxOlap connection in the Integrator project
      Returns:
      an IDatabase to access the database
      Throws:
      com.jedox.etl.core.component.ETLRuntimeException - if an error occurs and log level is set to "OFF", otherwise the error is logged with the configured level (ERROR by default)
    • data

      public Object data(String connection, String cube, String[] coordinates) throws com.jedox.etl.core.component.ETLRuntimeException
      Returns the cell value of a cube in a database referenced by a JedoxOlap connection.
      Parameters:
      connection - name of a JedoxOlap connection in the Integrator project
      cube - name of the cube
      coordinates - list of dimension elements to reference the cube cell
      Returns:
      cube cell value
      Throws:
      com.jedox.etl.core.component.ETLRuntimeException - if an error occurs and log level is set to "OFF", otherwise the error is logged with the configured level (ERROR by default)
    • erename

      public void erename(String connection, String dimension, String oldName, String newName) throws com.jedox.etl.core.component.ETLRuntimeException
      Renames a single element of a dimension in a database referenced by a JedoxOlap connection.
      Parameters:
      connection - name of a JedoxOlap connection in the Integrator project
      dimension - name of the dimension
      oldName - name of the dimension element to rename
      newName - new name of the dimension element
      Throws:
      com.jedox.etl.core.component.ETLRuntimeException - if an error occurs and log level is set to "OFF", otherwise the error is logged with the configured level (ERROR by default)
    • erename

      public void erename(String connection, String dimension, String[] oldNames, String[] newNames) throws com.jedox.etl.core.component.ETLRuntimeException
      Renames a list of elements of a dimension in a database referenced by a JedoxOlap connection.
      Parameters:
      connection - name of a JedoxOlap connection in the Integrator project
      dimension - name of the dimension
      oldNames - array of element names of the dimension
      newNames - array of the new element names of the dimension
      Throws:
      com.jedox.etl.core.component.ETLRuntimeException - if an error occurs and log level is set to "OFF", otherwise the error is logged with the configured level (ERROR by default)