Interactive data visualization and reporting capabilities for SAP HANA data, available through both the Web UI and the REST API.
The Analytics feature provides server-side aggregation with a secure query builder, enabling drag-and-drop data exploration, SQL-mode queries, and dashboard composition — all without writing raw SQL.
graph LR
A[Web UI / Client] -->|POST /hana/analytics-ui| B[Analytics Route]
B -->|Validated SQL| C[SAP HANA]
C -->|Result Set| B
B -->|columns + data + metadata| A
| Feature | Description |
|---|---|
| Dimensions | Group-by columns for categorical breakdowns |
| Measures | Aggregated numeric columns (SUM, AVG, COUNT, MIN, MAX) |
| Filters | WHERE-clause conditions with parameterized values |
| Cross-filters | Dashboard tiles can filter each other interactively |
| Limit control | Configurable row limits (1–10,000) for large datasets |
| Execution timing | Response includes query execution time in milliseconds |
# Start the UI server
hana-cli ui
# Navigate to the Analytics workspace in the Vue UI
# Available at http://localhost:3010 under the Analytics sectionThe graphical workspace supports three modes:
- Explore — Drag dimensions and measures onto a canvas to build visualizations interactively
- SQL — Write and execute ad-hoc queries using the built-in query editor
- Dashboard — Compose multiple chart tiles into a grid layout with cross-filtering
Send a POST request to build and execute an aggregated query:
curl -X POST http://localhost:3010/hana/analytics-ui \
-H "Content-Type: application/json" \
-d '{
"schema": "MY_SCHEMA",
"object": "SALES_DATA",
"dimensions": ["REGION", "PRODUCT_CATEGORY"],
"measures": [
{ "column": "REVENUE", "aggregation": "SUM", "alias": "TOTAL_REVENUE" },
{ "column": "ORDER_ID", "aggregation": "COUNT", "alias": "ORDER_COUNT" }
],
"filters": [
{ "column": "YEAR", "operator": "=", "value": 2026 }
],
"limit": 500
}'{
"columns": ["REGION", "PRODUCT_CATEGORY", "TOTAL_REVENUE", "ORDER_COUNT"],
"data": [
["EMEA", "Electronics", 1250000, 3420],
["APAC", "Electronics", 980000, 2810]
],
"metadata": {
"totalRows": 12,
"aggregated": true,
"executionTime": 45
}
}Builds and executes a parameterized GROUP BY query.
| Field | Type | Required | Description |
|---|---|---|---|
schema |
string | Yes | Database schema name |
object |
string | Yes | Table or view name |
dimensions |
string[] | No* | Columns to group by |
measures |
object[] | No* | Aggregated columns |
filters |
object[] | No | WHERE conditions |
limit |
integer | No | Row limit (default: 1000, max: 10000) |
*At least one dimension or measure is required.
| Field | Type | Required | Description |
|---|---|---|---|
column |
string | Yes | Column name |
aggregation |
string | Yes | One of: SUM, AVG, COUNT, MIN, MAX |
alias |
string | No | Output column alias |
| Field | Type | Required | Description |
|---|---|---|---|
column |
string | Yes | Column name |
operator |
string | Yes | One of: =, !=, >, <, >=, <=, IN, LIKE, BETWEEN |
value |
any | Yes | Scalar value, array (for IN/BETWEEN), or string |
| Operator | Value Type | Example |
|---|---|---|
=, !=, >, <, >=, <= |
Scalar | { "column": "YEAR", "operator": "=", "value": 2026 } |
IN |
Non-empty array | { "column": "REGION", "operator": "IN", "value": ["EMEA", "APAC"] } |
LIKE |
String with wildcards | { "column": "NAME", "operator": "LIKE", "value": "SAP%" } |
BETWEEN |
Array of exactly 2 | { "column": "AMOUNT", "operator": "BETWEEN", "value": [100, 500] } |
The analytics endpoint uses multiple layers of protection against SQL injection:
- Identifier validation — All schema, table, column, and alias names are validated against a strict regex (
/^[a-zA-Z0-9_][a-zA-Z0-9_]*$/). Invalid identifiers are rejected with a 400 error. - Identifier quoting — Validated identifiers are wrapped in double-quotes in the generated SQL.
- Parameterized values — All filter values are passed as prepared-statement parameters (
?placeholders) — never interpolated into the SQL string. - Allowlist enforcement — Only whitelisted aggregation functions and operators are accepted.
The analytics endpoint complements these CLI analysis commands:
- Data Profile — Statistical profiling of table columns
- Column Stats — Column store compression and statistics
- Calc View Analyzer — Performance metrics for calculation views
- API Server — REST API server overview
- Web UI — Web user interface overview
- HTTP Routes — Complete route reference