# SAP HANA

SAP HANA in-memory database

- Category: Databases
- Runs in: the Phloem cloud

Lets you and Hamming query an SAP HANA database with SQL, with its schemas and tables listed in Trace.

## What Phloem reads
- The schemas the user has privileges on, with their tables and columns, listed in Trace for Hamming and SQL autocomplete
- Schemas starting with `SAP` or `_SYS` are left out of Trace, but you can still query them by name

## What you need
- The server's host and SQL port, reachable from Phloem's cloud: 30015 for a tenant database, 30013 for the system database
- The tenant database name, unless you connect to the system database
- A database user and password that can read the schemas you want

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **SAP HANA**.
2. Enter a **Display Name**, then **Host**, **Port**, **Database/Tenant**, **Username** and **Password**.
3. Leave **Use SSL/TLS** on (the default) to encrypt the connection.
4. Choose **Test Connection**, then **Create Connection**.

## What Hamming can do
- Run SQL that you or Hamming write

## Notes
- Phloem runs any statement, not only `SELECT`. The user's privileges decide what a query can change.
- **Use SSL/TLS** encrypts the connection but does not check the server's certificate.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Host | Text | Yes | SAP HANA server hostname or IP address |
| Port | Number | No | Default: 30015 for tenant DB, 30013 for system DB |
| Database/Tenant | Text | No | Tenant database name (optional for system DB) |
| Username | Text | Yes |  |
| Password | Secret | Yes |  |
| Default Schema | Text | No | Default schema to use for queries |
| Use SSL/TLS | On / off | No | Enable encrypted connection (recommended) |
