Document toolboxDocument toolbox

Java API for Designing Cube

Applies to: Kyvos Enterprise  Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace

Kyvos Azure Marketplace   Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)


Overview

  1. Create a semantic model object by passing a DRD name in the API.
    Kyvos fetches the DRD Object, validates it, and sets it in the semantic model object

  2. Add a dimension to this semantic model.
    To add more dimensions, call this API, which in turn will add the dimension to the internal list

  3. Add a hierarchy to this dimension.

  4. Add a level to this hierarchy.
    To add more levels, call this API, which in turn will add the levels to the internal list

  5. Add an attribute to the semantic model.
    To add more attributes, call this API, which in turn will add the attribute to the internal list

  6. Create a UserInfo object, to be used for authorizing the requester.

  7. Create measure groups and measures.

  8. Call the API to save the semantic model object in the repository.

  9. Retrieve existing semantic model objects from the repository by name.

  10. Get measure, dimension, hierarchy, level, and attribute by name.

  11. Update an existing semantic model object.

  12. Use smart recommendations for designing semantic model.

Example

  1. Create the Semantic model Object.

    /*  * method to create new semantic model object in Repository Manager.  * @param drdName: Name of the DRD.  * @param requestorUserInfo: Object of type UserInfo.  * @return cubeObject: Object of type CubeObject. */ public CubeObject createCubeObject(String drdName, UserInfo requestorUserInfo); /** * method to create new semantic model object from DRD inside a folder in Repository Manager. * @param drdName: Name of the DRD. * @param drdFolderdName: Name of the folder that contains DRD. * @param requestorUserInfo: Object of type UserInfo containing information about logged in user. * @return cubeObject: Object of type CubeObject. */ public CubeObject createCubeObject(String drdName, String drdFolderdName, UserInfo requestorUserInfo);
  2. APIs to create dimension, hierarchy, and level objects.

    /**  * method to add dimension.  * @param dimensionName: Name of the dimension.  * @return Dimension: Object of type Dimension. */ public Dimension addDimension(String dimensionName); /*  * method to add hierarchy in the dimension.  * @param hierarchyName: Name of the hierarchy.  * @return Hierarchy: Object of type Hierarchy. */ public Hierarchy addHierarchy(String hierarchyName); /*  * method to add new level in hierarchy with field.  * @param datasetName: Name of the dataset to associated.  * @param fieldName: Data field to be associated.  * @return Level: Object of type Level. */ public Level addLevel(String datasetName, String fieldName); /** * method to add new level in hierarchy with field and display field. * @param datasetName Name of the dataset to associated with field. * @param fieldName name of the field. * @param dispalyFieldDatasetName Name of the dataset to associated with display field. * @param displayFieldName name of the display field. * @return level: Object of type Level. */ public Level addLevelWithDisplayField(String datasetName, String fieldName, String dispalyFieldDatasetName, String displayFieldName);
  3. Create the Attribute object.

    /*  * @param datasetName: Name of the dataset to associated.  * @param fieldName: Data field to be associated.  * @return dimAttribute: Object of type DimAttribute. */ public DimAttribute addDimAttribute(String datasetName, String fieldName);
  4. Refer to step 4 under the Steps for using Java APIs section to create UserInfo object.

  5. Create Measure Groups and Measures.

  6. Add the semantic model object to the repository.

  7. API to retrieve existing semantic model object from repository by name.

  8. Get measure, dimension, hierarchy, level, and attribute by names.

    1. API to get Measure by name

    2. API to get Dimension by name

    3. API to get Hierarchy from Dimension

    4. API to get Level by level name from semantic model object

    5. API to get Attribute by attribute name from semantic model object

  9. API to update existing semantic model object.

  10. API to use smart recommendations for designing semantic model.

  11. Method to add Attribute through display field (under design semantic model) [correction in spelling]

  12. API to use smart recommendations for designing semantic model (update).

  13. API to save smart recommendation of semantic model in EntityObjectManager.

  14. API to use smart recommendations for designing semantic model (Update)
    Introduced one more Parameter (Aggregation type) in getAllRecommnedation JAVA API

  15. API to get only Aggregation type smart recommendation on designing semantic model.

  16. API to add a dimension. 

  17. Dimension to add time type hierarchy.

  18. Dimension to add hierarchy in a dimension.

  19. Hierarchy to add a level object in the hierarchy.

Sample code

Copyright Kyvos, Inc. All rights reserved.