Create Oracle Analytics Cloud custom plug-ins for your dashboard

May 22, 2023 | 9 minute read
Prasenjit Thakur
Senior Product Manager
Text Size 100%:

Plug-ins for visualizations in Oracle Analytics Cloud are a great way to extend the functionalities of your dashboard. Recognizing that you can’t make a visualization for every possible scenario, you can build custom plug-ins. Custom plug-ins allow you to add extended capabilities to your dashboard and add more value to your workflow. Oracle Analytics Cloud provides SDKs for building and changing custom plug-ins. To invoke SDK mode, you download and install Oracle Analytics Desktop (OAD) on your local machine.

Follow these steps.

Step 1: Download the latest Oracle Analytics Desktop version by clicking here.

  1. Click Download.pic 1 download OAD
  2. Select the Platforms option and click Download.pic 2 platform downloadSelect either Microsoft Windows or Apple Mac OS.pic 3 install OAD

       c. When the file is downloaded, install Oracle Analytics Desktop.

By default, it gets installed in this folder: C:\Program Files\Oracle Analytics Desktop.

Step 2: Set up the environment variables.

  1. On the Windows taskbar, right-click the Windows icon and select System.
  2. In the Settings window, under Related links, click Advanced System Settings.
  3. On the Advanced tab, click Environment Variables.pic 4 environment variables
  4. Click New to create an environment variable. Click Edit to modify an existing environment variable.pic 5 user variables

If the paths of User variables - DVDESKTOP_SDK_HOME, JAVA_HOME, Path, PLUGIN_DEV_DIR, TEMP, and TMP don't exist, create them by clicking New.

You can create a PLUGIN_DEV_DIR directory here: C:\custom-plugins.
You can modify an existing environment variable by clicking the Edit option.

Here is a brief description of the user variables:

  • DVDESKTOP_SDK_HOME: the path where the OAD dvdesktop application is located.
  • JAVA_HOME: the path where the JDK is located.
  • Path: the path where gradle bin files are stored.
  • PLUGIN_DEV_DIR: the folder where all your plug-in related files are located.
  • TEMP: the path to local temporary files.
  • TMP: the path to local temporary files.

After creating or modifying an environment variable, click Apply and then OK to have the change take effect.

Step 3: Create a “Hello Viz” custom plug-in.

a. Open the command prompt window.

b. Create the plug-in development environment by entering the following command:

pic 15 gradle run

pic 16 gradle run cmd

The bicreateenv script is in the <installation directory>\Oracle Data Visualization Desktop\tools\bin directory.

Check if the scripts exist in this path. By default, the scripts are located here: C:\Program Files\Oracle Analytics Desktop\tools\bin.
pic 8 bicreateenv bin files

c. Create the visualization plug-in:pic 9 bicreatepluginpic 10 bicreateplugin cmd
Running this command creates the following files in the plug-in development directory:pic 11 src files

The "src" folder should contain three files:

  1. helloVizstyles.css is the stylesheet where all styles for the new visualization are stored.
  2. helloViz.js contains the default visualization implementation logic for a functional plug-in that you can customize.
  3. helloVizdatamodelhandler has the logic for mapping the logical data model to a physical data layout.

The .css, .js , and Datamodelhandler files are stored here: C:\custom-plugins\src\customviz\com-company-helloviz.

pic 12 plugin files

Before moving to the next step, close the Oracle Analytics Desktop application if it's still running.

d. Open Oracle Analytics Cloud (OAC) in SDK mode:

To open OAC in SDK mode, download and install Gradle on your local machine.

By default, the Gradle files are stored in C:\gradle\gradle-<version>\bin

Run the following commands in a command window:

pic 15 gradle run

pic 16 gradle run cmd

Once completed, it automatically opens OAC in SDK mode in a browser.

pic 17 OAC SDK

If OAC doesn’t load, click the hidden icons arrow in the taskbar and then select the OAC icon.

pic 18 OAC SDK icon

Right-click and select the Copy URL to Clipboard option.

pic 19 OAC icon

Paste the URL in any browser and press Enter to open OAC in SDK mode.

pic 20 OAC SDK mode_2

e. Click Create and select Workbook to create a workbook.

pic 21 OAC workbook

f. Add a dataset.

You can use any dataset of your choice. To upload a dataset, click Dataset and select Upload Dataset.

pic 22 upload dataset

Select the dataset and click Add to Workbook.

pic 23 dataset

g. Drag and drop the Hello Viz icon into the canvas.

pic 24 helloviz plugin

pic 25 helloviz workbook

Now you can drag and drop any columns to any grammar to see the expected output, as shown in the following figure.

pic 26 dashboard

There you go! You can use the Hello Viz plug-in in your dashboard.

Additional Tips:

You can find all the custom plug-ins on your OAC instance using these steps:

  1. Click the hamburger icon at the top-left corner.pic 27 hamburger icon
  2. Select Console.pic 28 console
  3. Click Extension.pic 29 extensions

 pic 30 upload extensions

Now you can see all the plug-ins that you created.

Call to Action

In this article, you learned to create custom plug-ins on OAC.  You saw the step-by-step process to install OAD, which is required to invoke OAC SDK mode, set up the system environment variables, and create a Hello Viz plug-in. Use these tips to create custom plug-ins and enhance your OAC dashboard capabilities. 

To learn more, visit the guide on creating plug-in visualizations for Oracle Analytics.

In my next article, I'll explain how to modify only a few lines in the Hello Viz script to enhance its functionalities. I'll explain more about the content of the three files in the src folder and how you can edit those to extend the capabilities of your dashboard.

Prasenjit Thakur

Senior Product Manager

Previous Post

Loading Data from Oracle Object Storage into Oracle Fusion Analytics

Bindu Goparaju | 16 min read

Next Post

Configuring Fusion Analytics Content Duty Roles to Secure Custom Content

Devi Prasad Kolli | 6 min read