# Apache Hive

## Apache Hive

### Features

| Feature          | Info                                                                                                               |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ |
| Type             | Relational                                                                                                         |
| Driver           | Included                                                                                                           |
| Version Included | 3.1.3                                                                                                              |
| Hop Dependencies | None                                                                                                               |
| Documentation    | [Documentation Link](https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBC) |
| JDBC Url         | jdbc:hive2://\<host:port>,\<host2:port2>/databaseName                                                              |
| Driver folder    | Hop Installation/plugins/databases/hive/lib                                                                        |

### Partitions

Apache Hive need to have a PARTITION clause generated before the fields definition. To do this you can add table and clause definitions in the specific Hive field called 'Table-partition clauses'. This is the format to specify:

`TABLE1(CLAUSE1);SCHEMA2.TABLE2(CLAUSE2)`

For example, if you want to partition a `customers` table by `statecode` dynamically, you can add the following: `customers(statecode)` and for `INSERT INTO` statement Hop will add `PARTITION(statecode)`.

HINT: for dynamic partitioning you can add the following statements in the `advanced` tab of the RDBMS metadata as statements to run right after connecting:

```highlight
SET hive.exec.dynamic.partition = true;
SET hive.exec.dynamic.partition.mode = nonstrict;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/relational-database-connections/apache-hive.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
