Skip to main content

Add the SAP HANA Connector

Authenticate to SAP HANA

After you add the connector, you need to set the required properties.
  • Server: Enter the name of the server that runs .
  • Port: Enter the port number for . The default port value is 39013.
supports authenticating to in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

Password

Okta

Kerberos

To connect with Kerberos, specify these settings:
  • Auth Scheme: Select Kerberos.
  • User: Enter the username that you use to authenticate to your account.
  • Password: Enter the password that you use to authenticate to your account.
  • Kerberos KDC: Enter the host name or IP address of your Kerberos Key Distribution Center (KDC) machine.
  • Kerberos Realm: Enter the Kerberos realm that you use to authenticate to Kerberos.
  • Kerberos SPN: Enter the service principal name (SPN) for the Kerberos domain controller.
  • Kerberos User: Enter the principal username (in the format Host/User@Realm) for the Kerberos domain controller.
  • (Optional) Kerberos Keytab File: Enter the full file path to your Kerberos keytab file.
  • (Optional) Kerberos Ticket Cache: Enter the full file path to an MIT Kerberos credential cache file.

Trigger-Based Change Data Capture for SAP HANA

supports trigger-based change data capture (CDC) for SAP HANA sources. When trigger-based CDC is enabled, creates database triggers on the selected source tables by using the permissions that are granted to the database user. These triggers capture INSERT, UPDATE, and DELETE operations and write each change to a centralized change-log table, which reads to replicate data efficiently and reliably. When trigger-based CDC is enabled, performs the following actions:
  • creates INSERT, UPDATE, and DELETE triggers on each selected source table
  • captures row-level changes as they occur
  • writes a record for each change to a global change-log table

CDC Change-Log Table

All triggers that are created for CDC write to a single global change-log table:
  • Schema: _CDATA
  • Table: _CDC_TRG_CHANGE_LOG
This table is shared across all tracked tables and stores the complete row image for every change. For UPDATE operations, both the before and after values are recorded. For DELETE operations, all available row values are preserved to ensure complete change visibility and correct downstream replication.

Authentication

Trigger-based CDC for SAP HANA supports only the Password authentication scheme.

Prerequisites

Before you enable trigger-based CDC for SAP HANA, ensure that the following requirements are met:
  • Minimum driver version: The CData SAP HANA driver version must be 25.0.9511 or later.
  • Schema support: Tables that reside in system schemas are not supported. Schemas that match the patterns SYS, SYS_*, and PUBLIC are treated as system schemas and cannot be used for trigger-based CDC.
  • Database permissions: The database user that is specified in the SAP HANA connection must have the following privileges: Catalog access:
    GRANT CATALOG READ TO <ReplicationUser>;
    
    Source schema privileges:
    GRANT SELECT ON SCHEMA <source_schema> TO <ReplicationUser>;
    GRANT TRIGGER ON SCHEMA <source_schema> TO <ReplicationUser>;
    
    Change-log schema privileges (_CDATA): The CDC engine writes change events to the _CDATA._CDC_TRG_CHANGE_LOG table. The required permissions depend on whether the replication user owns the _CDATA schema.
    • The user owns the _CDATA schema: No additional grants are required. The user automatically has full privileges on objects in schemas that the user owns.
    • The user does not own the _CDATA schema: Grant SELECT, INSERT, and DELETE privileges on the _CDATA schema, as follows:
      GRANT SELECT, INSERT, DELETE ON SCHEMA _CDATA TO <ReplicationUser>;
      
These privileges allow to read system metadata, create and execute triggers on the selected source tables, and read from and maintain the _CDATA._CDC_TRG_CHANGE_LOG change-log table for CDC processing.

Unsupported Data Types

Trigger-based CDC does not support columns that use the following SAP HANA data types:
  • TEXT
  • BINTEXT
  • ST_POINT
  • ARRAY
SAP HANA does not allow triggers to reference these data types. As a result, columns that use these types are excluded from change capture.

Enable Trigger-Based CDC for SAP HANA

To enable trigger-based CDC for a SAP HANA source in :
  1. Create or edit a job that uses SAP HANA as the source.
  2. Select the source tables that you want to replicate.
  3. Enable CDC for the job, as explained in Creating a CDC Job in
    During job initialization, creates the required triggers and the _CDATA._CDC_TRG_CHANGE_LOG table if they do not already exist.
  4. Run the job to begin capturing and replicating change events.
After CDC is enabled, continuously reads from the change-log table and applies INSERT, UPDATE, and DELETE operations to the destination.

Trigger Management

The CDC engine automatically manages triggers for each task in the job, as follows:
  • When a table is added to a job, creates the corresponding INSERT, UPDATE, and DELETE triggers.
  • When a task or an entire job is removed, checks whether any remaining jobs still reference the same source tables. If no other jobs require those tables, drops the corresponding triggers.
    Although triggers and jobs can be dropped from , the _CDATA._CDC_TRG_CHANGE_LOG table is never dropped by the application.

Schema Change Detection

The CDC engine monitors source table schemas for structural changes during each polling cycle. Before polling for data changes, the engine compares the current table metadata with a stored baseline to detect differences.

Detected Changes

The CDC engine treats the following supported column changes as breaking changes:
  • A column is added.
  • A column is removed.
  • A column data type is changed.
Changes to unsupported columns are detected and logged but do not interrupt CDC processing.

CDC Engine Behavior When Schema Changes Occur

When the CDC engine detects a breaking schema change, it performs the following actions for the affected tables:
  • drops stale triggers
  • deletes stale rows from the _CDATA._CDC_TRG_CHANGE_LOG table
  • stops the job with the status Schema Changed and reports the affected tasks
On the next job run:
  • Each affected task is set to REFRESHTABLE, which causes the table to be fully reloaded and replication to restart from a new baseline.
  • The CDC engine re-creates triggers that are based on the updated schema and establishes a new baseline.
Tables that are not affected by the schema change continue replicating without interruption.

Known Limitations

If a column that is referenced in a trigger definition is dropped while the CDC engine is stopped, write operations on the source table can fail. This behavior occurs because the trigger becomes invalid when the column is removed. SAP HANA raises an error when the trigger executes, which can block INSERT, UPDATE, or DELETE operations until the CDC engine is restarted and the trigger is re-created to match the updated schema.

Data Retention

The _CDATA._CDC_TRG_CHANGE_LOG table is shared by all CDC-enabled jobs. provides the following job-level properties to control retention and cleanup:
  • changelog.retention.hours—Specifies how long change records are retained in the change-log table. The default retention time is 168 hours (seven days).
  • changelog.cleanup.interval.minutes—Specifies how often scans the change-log table and removes expired records. The default interval is 60 minutes.

SAP Client Filtering

In SAP ERP and SAP S/4HANA environments, client-dependent tables include the MANDT column, which stores the SAP client identifier. To capture changes for a specific SAP client, you can set the sap.client.id job property (the default value is null). When this property is set, filters change events based on the value of the MANDT column and processes only the rows that belong to the specified client.

Complete Your Connection

To complete your connection:
  1. Specify the following properties:
    • (Optional) Database: Enter the name of your database.
    • (Optional) Schema: Enter the schema for your database.
    • Include System Objects: Select whether you want to fetch HANA System schema and tables. By default, the Enable checkbox is not selected.
    • Use SSL: Select whether you want to enable Secure Sockets Layer (SSL). By default, the Enable checkbox is not selected.
  2. Define advanced connection settings on the Advanced tab. (In most cases, though, you should not need these settings.)
  3. Click Create & Test to create your connection.

More Information