---
title: "HIVE + Impala Storage para Entidades"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220829380/HIVE%20%2B%20Impala%20Storage%20para%20Entidades"
format: markdown
---
> Macro (toc)

The platform allows to connect to HIVE or Impala and from a table to generate the ontology that represents it (remember that the ontology represents the abstraction of the persistence mechanism so that it makes me independent of the access giving me a SQL interface whatever the DB is, returning me JSON whatever the database is and giving me security and auditing).

For that from the Control Panel I will go to the option **Create Ontology** and from there I will select:

![image](media://0a286af6-f7d0-49cd-8c6d-e9cbf7ba638b)

After this I will select the JDBC connection that applies to me (either HIVE or Impala).

![image](media://dc92cf67-59a3-4ffb-8586-18b6526f4ef6)

If there is no connection and I have the access data I can create it from > Macro (inline-media-image)



![image](media://f59efa56-bfdb-48e3-a5fd-33eea642a66f)

Once the connection is selected, a list of existing Tables will appear:

![image](media://f6dcd088-f5cb-41fc-b98f-47f5c7e1b1c3)

And selecting one will map the columns of the table and generate the JSON-Schema that represents the ontology:

![image](media://0373e54e-08ab-4dc2-b61f-0ec981bebdfd)

After this, we will complete the definition of the ontology (at least the meta-inf and description part), we can even modify the name of the ontology and finally click on New.

After this we already have the ontology that represents my HIVE/Impala table. This ontology is now available for the rest of the Platform tools, either to compose my dashboards, to publish my APIS,...

In the example we see a query in the Query Tool. The platform uses Impala as query engine, which allows online access to tables with millions of records:

![image](media://53609783-8af4-499b-9c47-0a9b76d13167)


In Big Data scenarios it is typical to access HIVE/Impala tables directly from Spark.

The Platform Notebook allows you to do so:

![image](media://5b66ffcb-a0e4-4eca-90b7-fc9bf7c0505c)

![image](media://b7e76a82-9fb8-4502-b726-41f60710800c)

  


Then, since a table is inferred as an ontology, you can see the data directly from all the operations performed on the table (NOTE: in Impala it is necessary to launch the invalidate metadata command).