SAP HANA
Write data to an SAP HANA table using UPSERT for merge operations. Use Zeotap to materialize model results, enriched profiles, or audience data into SAP HANA for real-time analytics and application serving.
Prerequisites
- An SAP HANA database instance (HANA 2.0+ or HANA Cloud)
- A database user with INSERT, UPDATE, DELETE, and CREATE TABLE privileges on the target schema
- Network connectivity between Zeotap and the SAP HANA server (port 443 for HANA Cloud, or your configured instance port)
Authentication
SAP HANA uses Username & Password authentication.
- Enter the database Username and Password in Zeotap
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Host | Text | Yes | SAP HANA server hostname or IP address |
| Port | Number | No | Server port. Default: 443 |
| TLS Encryption | Select | No | Enable TLS encryption for the connection. Default: Enabled |
Target Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Schema | Text | Yes | Database schema to write to (e.g. MY_SCHEMA) |
| Table | Text | Yes | Target table name |
Supported Operations
Sync Modes: Upsert, Insert, Update, Mirror
| Mode | Description |
|---|---|
| Upsert | Inserts new rows and updates existing rows matched by primary key using SAP HANA’s UPSERT ... WITH PRIMARY KEY statement |
| Insert | Inserts new rows only; skips rows where the primary key already exists |
| Update | Updates existing rows only; does not insert new rows |
| Mirror | Upserts new and changed rows, then deletes rows that were removed from the source |
Audience Sync Modes: Add, Remove, Mirror, Upsert
| Mode | Description |
|---|---|
| Add | Adds new audience members to the target table |
| Remove | Removes audience members from the target table |
| Mirror | Adds new members, removes former members to match the source audience exactly |
| Upsert | Adds new members and updates existing member attributes |
Features
- Field Mapping: Yes
- Schema Introspection: Yes — Zeotap reads column metadata from SAP HANA’s
SYS.TABLE_COLUMNSsystem view
How It Works
- Zeotap creates a staging table in the target schema with all mapped columns plus internal tracking columns
- Batch rows are inserted into the staging table using multi-row INSERT statements
- Depending on the sync mode, Zeotap executes the appropriate SQL operation:
- Upsert:
UPSERT ... SELECT ... FROM staging WITH PRIMARY KEY - Insert:
INSERT INTO ... SELECT ... FROM staging - Update:
MERGE INTO ... USING staging WHEN MATCHED THEN UPDATE - Mirror: Upsert followed by
DELETEfor removed rows
- Upsert:
- The staging table is dropped after each batch
Rate Limits
SAP HANA does not impose API-level rate limits. Performance depends on your instance size, available memory, and concurrent workload. Zeotap uses batched operations to optimize throughput while respecting SAP HANA’s parameter limits per statement.
Best Practices
- Use HANA Cloud: For production workloads, SAP HANA Cloud provides automatic scaling, high availability, and simplified connectivity
- Schema naming: SAP HANA schema and table names are case-sensitive when quoted. Use uppercase names (e.g.
MY_SCHEMA,MY_TABLE) to match SAP HANA conventions - Primary key selection: Choose a primary key column that uniquely identifies each row. SAP HANA requires a primary key on the target table for UPSERT operations
- TLS encryption: Always enable TLS encryption for production connections. Disable only for local development environments
Troubleshooting
Connection refused
Verify the host, port, and that the SAP HANA instance is running and accepting connections. For HANA Cloud, ensure your IP address is allowlisted in the SAP HANA Cloud Central administration.
Authentication failed
Check that the username and password are correct. SAP HANA passwords are case-sensitive. Ensure the user account is not locked.
Insufficient privileges
The database user needs INSERT, UPDATE, DELETE privileges on the target table, and CREATE TABLE privileges on the target schema if the table does not yet exist. Grant privileges with:
GRANT INSERT, UPDATE, DELETE ON SCHEMA MY_SCHEMA TO my_user;
GRANT CREATE ANY ON SCHEMA MY_SCHEMA TO my_user;Table does not exist
Zeotap creates the target table automatically on the first sync. Ensure the user has CREATE TABLE privileges on the target schema.
Column type mismatch
Zeotap creates new columns as NVARCHAR(5000). If your target table has columns with different types, ensure the incoming data is compatible with the existing column types.
TLS handshake failure
If TLS encryption is enabled, ensure the SAP HANA server certificate is valid and its hostname matches the configured Host value. Zeotap uses the Host field as the TLS Server Name (SNI) for hostname verification. For HANA Cloud, TLS is required on port 443 and certificates are managed automatically. For on-premise installations, verify that the server certificate is trusted by the Zeotap runtime environment and that the Host matches the certificate’s subject. Disable TLS only for local development instances that do not support TLS.