Skip to Content

SAP HANA

There are two methods Etleap uses to extract data from a SAP HANA source connection: Query-based extractions and Change Data Capture (CDC). With Query-based extractions, all data is extracted with SQL queries.

With CDC, Etleap will take an initial snapshot of the table using SQL queries and capture incremental changes using triggers that are automatically defined on the source table.

Source Setup

Step 1. Create a Database User

Complete the following steps to create a user that will allow Etleap to connect to your database:

  1. Create a new user for the Etleap connection. The <user_name> and <password> values will be needed when creating the connection in Etleap.
    CREATE USER <user_name> PASSWORD <password> NO FORCE_FIRST_PASSWORD_CHANGE;
  2. Grant the SELECT permission to the schema or tables you would like to extract data from.
    Choose one of the statements below to assign select permissions at a certain level
    GRANT SELECT ON SCHEMA "<schema_name>" TO <user_name>; GRANT SELECT ON "<schema_name>"."<table_name>" TO <username>;
    You can now use this user to set up a new connection in Etleap.

Step 2. Whitelist Etleap’s IP Addresses

Etleap’s IP addresses must be whitelisted in HANA. There are different addresses to whitelist depending on your deployment model. Review the IP Whitelisting article for more information on which to use.

Prefer using an API? Go here  and select SAP HANA under the Body header to create your connection via API.

Change Data Capture (CDC) Setup

Step 1. Create the ETLEAP_CTT Schema

Etleap expects the ETLEAP_CTT schema to be present in the source database when operating CDC pipelines. These instructions assume that the user used to connect to Etleap is etleap_user.

Etleap will create a table and procedure in the ETLEAP_CTT schema, and define triggers on any source tables that have an Etleap pipeline. The triggers will be created in the same schema as the source table.

Run the following query to create the ETLEAP_CTT schema:

CREATE SCHEMA ETLEAP_CTT;

Grant the necessary permission to the etleap_user on the ETLEAP_CTT schema:

GRANT INSERT, UPDATE, SELECT, TRIGGER, EXECUTE, CREATE ANY ON SCHEMA ETLEAP_CTT TO etleap_user;

Step 2. Grant Permissions in the Source Schema

You’ll need to grant permissions to the etleap_user in order to create required procedures and triggers on the source tables. These instructions assume that the tables to capture changes from exist in a schema named INPUT_SCHEMA.

GRANT SELECT, TRIGGER ON SCHEMA "INPUT_SCHEMA" TO etleap_user;

Step 3. Enable CDC Support

Note

CDC support can only be enabled when creating a connection in Etleap. It cannot be modified after a connection is created.

To enable CDC support for an SAP HANA connection, check the following checkbox in the connection setup.

A screenshot of the "Enable Change Data Capture" checkbox in the Etleap UI

CDC Objects Defined in the Source

Etleap automatically creates a CTT table and a GET_TABLE_STRUCTURE procedure in the ETLEAP_CTT schema when you create your first SAP HANA CDC pipeline. The objects will be automatically created when the first pipeline for a CDC-enabled HANA connection is created in Etleap.

Etleap will also create three triggers for each ingested table. Etleap creates a CREATE, UPDATE, and DELETE trigger on the source table when a pipeline is first set up. These triggers will be created in the same schema that the table exists in.

Caution

To keep track of new changes to the data, the triggers created for each source table will continue to write changes to the CTT table when pipelines are stopped or paused.

This will lead to growth of the CTT table overtime if pipelines are not resumed.

CDC Limitations

  • The maximum value length that Etleap supports for SAP HANA CDC is 5000.
  • Values of the data types CLOB and NCLOB are automatically truncated to 5000 characters if they exceed the limit.
  • BLOB values, which are extracted as hexadecimal strings, are truncated to 5000 hexadecimal character, or 2500 bytes.