Creating an ontology from a relational database and showing it in a dashboard

EN | ES


This type of ontologies are created from a pre-existing table in a relational database that is external to the platform. The data is not stored in the platform's RTDB. Instead, all the operations on this ontology are referred to that external database.

Ontology Creation

To create an external ontology, follow these steps:

  1. Access the menu option DEVELOPMENT > My Ontologies
  2. You will see a list with the existing ontologies. Select the button New to choose the type of ontology you want to create.
  3. Next select the type of ontology you will create. In this case, Creation from external relational database.
  4. The first step is registering the external database to be used. To do this, click on the button My Datasources.
  5. You will see a list with the datasources already registered in the platform. To create a new one, use the button New. Bear in mind that only a user with the Administrator role is authorized to register new datasources.
  6. Once the data to access the external database have been filled in, select the button New.

    If you go back to the ontology creation screen, you can see the datasource you have just created is already there.
  7. Once the datasource is selected, you will see a list with the tables in that external data source. Select the OPENPLATFORM table from the oracle4 datasource.
    Select the option Associate ID. This will allow you to select a field from the future ontology as the unique ID for each instance. That is to say, queries on that identifier can be made. In this case, select the field COLUMN3 as your identifier.


  8. Lastly, you can see that, when a table from the datasource is selected, you are shown an instance of the data stored on it. Select the button Generate Schema to generate the ontology schema from this data.


    Which gives this result:


  9. Lastly, create the ontology using the button

Operating on the ontology

Once the ontology is created, the next step is performing operations on it. To do this, access the menu option TOOLS>Query Tool.

Then select the OPENPLATFORM ontology:

Launch a SELECT type QUERY.

These data you've obtained come from the external database you configured at the beginning of this tutorial. You can also launch UPDATE, DELETE and SELECT COUNT sentences.


Dashboard Creation

Lastly, you will create a very simple dashboard using this ontology, accessing the data stored in the external database. To do so:

  1. Access the menu option Visualization > My Dashboards



  2. Select the New button .
  3. Fill in the applicable fields:
    Then select the NEW button to create it. You will automatically see the just-created dashboard, empty. To add a gadget:
  4. Select the button and you will see, in the lower part of the screen, a list with the types of gadgets that can be created. For this example, select Table and drag it to the dashboard's white background:


  5. When you release the element, a modal window will appear:

    Select New Gadget.
  6. You will see again a modal window where you will insert the gadget's name, then select the ontology you want to use - in this case OPENPLATFORM

    The next step is defining which data is interesting and should be shown. In this case, launch a query like this one:

    select * from OPENPLATFORM where ROWNUM <= 3;

    If you click Run Query , you will see the query's result and validate that it is what you need. When it fits your requirements, click on Continue .

  7. Now you see a new window where you can, on one hand, give a specific visualization format:

    and on the other hand, select which fields in the ontology will be shown:

    We can see in real time how our gadget is shown with the selected values. When it is satisfactory, click on and the gadget will be sent to the dashboard's page.