Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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

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


Overview

Process a semantic model object.

  1. Process a semantic model with the NOW option

  2. Process a semantic model with ONCE option

  3. Cancel a semantic model job if currently running

  4. Resume a semantic model job

  5. Replace partitions

  6. Data profile for the semantic model with the ONCE option

  7. Data profile for the semantic model with the NOW option

Examples

  1. Process a semantic model with the NOW option

    /**
    * method to build semantic model Object
    * @param sModelName: name of the semantoc model
    * @param folderName: name of the folder containing semantic model
    * @param buildType: type of the job , FULL or INCREMENTAL
    * @param additionalParams: JSONObject containing fields: userParams, replacePartition, consolidationType, buildSourceDatasets,
    * recommendationParamsJson, minimalAggregation, minimalAggregation, factDataPartitionSize,
    * factDataPartitionCount, incrementalJobProcessType
    * factDataPartitionCount, incrementalJobProcessType, buildConnectionName
    */
    public void buildCubeNow(String cubeName, String folderName, String buildType, UserInfo userInfo, JSONObject additionalParams);
  2. Process a semantic model with the ONCE option

    /**
    * method to process the semantic model Object
    * @param sModelName: name of the semantic model
    * @param folderName: name of the folder containing semantic model
    * @param buildType: type of the job, FULL or INCREMENTAL
    * @param additionalParams: JSONObject containing fields: userParams, onceDateTime, replacePartition, consolidationType, buildSourceDatasets,
    * recommendationParamsJson, minimalAggregation, minimalAggregation, factDataPartitionSize,
    * factDataPartitionCount, incrementalJobProcessType, buildConnectionName
    */
    public void buildCubeOnce(String cubeName, String folderName, String buildType, UserInfo userInfo, JSONObject additionalParams);
  3. Cancel semantic model job if currently running.

    /**
    * Method to add ONCE build schedule for the semantic model object
    * @param sModelName: name of the semantic model
    * @param folderName: name of the folder containing semantic model
    * @param buildType: type of the job, FULL or INCREMENTAL
    * @param onceDateTime: date time in format mm/dd/yyyy hh:mm
    * @param userInfo: Object of type UserInfo containing information about logged in user
    * @param incrementalJobProcessType: type of process: FACT_ADJUSTMENTS
    */
    public void buildCubeOnce(String sModelName, String folderName, String buildType, String onceDateTime, UserInfo userInfo, String incrementalJobProcessType);
  4. Resume semantic model build

    /**
    * method to resume semantic model build for semantic model object in ReportObjectManager. 
    * @param historyId: history id of last resumable semantic model build.
    * @param userInfo: Object of type UserInfo containing information about logged in user.
    */
    public void resumeBuild(String historyId, UserInfo userInfo);
  5. Replace partitions.

    /**
    * method to launch Replace Partition and incremental job with Replace partition:
    * @param CubeObject:  Object of type CubeObject.
    * @param PartitionInfo: Object of type PartitionInfo.
    * @param userInfo: Object of type UserInfo containing information about logged in user.
    */
    public void launchReplacePartitionBuild(CubeObject co, PartitionInfo replacePartitionInfoObj, UserInfo userInfo);
    public void launchReplacePartitionWithIncrementalBuild(CubeObject co, PartitionInfo replacePartitionInfoObj, UserInfo userInfo);
  6. Data profile for a semantic model with ONCE option

    /**
    * method to add ONCE Data Profile schedule for semantic model object
    * @param co: CubeObject to be profiled
    * @param onceDateTime: date time in format mm/dd/yyyy hh:mm
    * @param profile: Object of type DataProfile containing field information
    * @param userInfo: Object of type UserInfo containing information about logged in user
    * @param buildConnectionName: name of build connection
    */
    public void profileCubeOnce(CubeObject co, String onceDateTime, DataProfile profile, UserInfo userInfo, String buildConnectionName);
  7. Data profile for a semantic model with the NOW option.

    /**
     * method to add NOW Data Profile schedule for semantic model object
     * @param co: CubeObject to be profiled
     * @param profile: Object of type DataProfile containing field information
     * @param userInfo: Object of type UserInfo containing information about logged in user
     * @param buildConnectionName: name of build connection
     */
    public void profileCubeNow(CubeObject co, DataProfile profile, UserInfo userInfo, String buildConnectionName;
  8. Parse connectionXML and set internal properties of DBConnection. 

    /**
    * Constructor accepting connectionXML as input. Connection properties will be set by parsing this XML.
    * @param connectoinXML
    */
    public DBConnection(String connectoinXML)
  9. Set a property in a DBConnection object.

    /**
    * Method to set connection property.
    * @param propertyName
    * @param propertyValue
    */
    public void setProperty(String propertyName, String propertyValue)
  10. Set a property in a DBConnection. It is useful when a value is encrypted.

    /**
    * Method to set connection property.
    * @param propertyName
    * @param propertyValue
    * @param isEncrypted
    * @param cryptographicAlgorythm
    */
    public void setProperty(String propertyName, String propertyValue, String isEncrypted, String cryptographicAlgorythm)

Sample code

/*Method to trigger semantic model process  
 *BuildType Can be FULL, INCREMENTAL 
 */ 
public static void buildCubeNow(SchedulerManager schedulerManager, UserInfo userInfo) { 
schedulerManager.buildCubeNow("CubeName", "CubeFolderName", "BuildType", userInfo); 
} 
/*Method to Cancel semantic model job 
 *BuildType Can be FULL, INCREMENTAL 
 */ 
public static void cancelCubeBuild(SchedulerManager schedulerManager, UserInfo userInfo){ 
schedulerManager.cancelCubeBuild("CubeName", "CubeFolderName", "BuildType", userInfo); 
} 
/*Method to Resume semantic model job*/ 
public static void resumeBuild(ReportObjectManager repObjManager, UserInfo userInfo){ 
try { 
repObjManager.resumeBuild("CubeBuildHistoryID", userInfo); 
} catch (ReportObjectException e) { 
e.printStackTrace(); 
} 
       } 
/*Method to trigger Data Profile on the semantic model*/ 
public static void profileCubeNow(SchedulerManager schedulerManager, RepositoryManager repManager, UserInfo userInfo) { 
try { 
/*Semantic model and its folder should be present on Kyvos*/ 
CubeObject cubeObject = repManager.getCubeByName("CubeName", "CubeFolderName", userInfo); 
DataProfile profile = new DataProfile(); 
schedulerManager.profileCubeNow(cubeObject, profile, userInfo); 
} catch (ReportObjectException e) { 
e.printStackTrace(); 
} 
       } 
  • No labels