Setting Up SAP HANA Connector

Untar the SAP HANA adapter package and load its Docker image on a Docker host.

3 min read Updated SS

Follow the steps below to set up the SAP HANA Connector:

Note:
This connector can run on any operating system supports docker.

1. Untar the ext-system-adapter_PayPal_SAP_Hana_Adapter.tar.gz file.

tar -xvf ext-system-adapter_PayPal_SAP_Hana_Adapter.tar.gz

Access the ext-system-adapter_PayPal_SAP_Hana_Adapter folder, which contains the following.

  • conf.tar file
  • sql.tar file
  • ext-system-adapter_<tag>.tar file

The ext-system-adapter_<tag>.tar file is a Docker image that you can load directly in Docker.

2. Untar the following files:

a. tar file:

tar -xvf conf.tar

b. sql.tar file:

tar -xvf sql.tar

3. The conf directory contains all the configuration files of the

  • adapter-conf.yaml
  • logback.xml

Update the adapter-conf.yaml file as shown below.

ParameterValue
className“com.appnomic.heal.etladapter.re positories.AdapterConfigMaster”. Do not modify.
properties:
hibernate.connection.usernameUser name of the SAP HANA database.
hibernate.connection.passwordPassword of the SAP HANA database.
hibernate.connection.autoReconnect“true”. Do not modify.
hibernate.c3p0.min_size“1”. Do not modify.
hibernate.c3p0.max_size“3”. Do not modify.
  hibernate.connection.url“jdbc:mysql://<ip-address of Percona>:<port number of Percona>/<HANA schema name>? verifyServerCertificate=false&use SSL=true&requireSSL=true&ena bledTLSProtocols=TLSv1.2&use ServerPrepStmts=true&cacheSer verConfiguration=true”
adapterProperties:
hibernate.connection.usernameUsername of the appsone database.
hibernate.connection.passwordPassword of the appsone database.
hibernate.connection.autoReconnect“True”. Do not modify.
hibernate.c3p0.min_size“1”. Do not modify.
hibernate.c3p0.max_size“3”. Do not modify.
hibernate.connection.urljdbc:mysql:// ://<ip-address of appsone DB>:<port number of appsone DB>/appsone
connector.idTo get the connector ID, refer to the mst_connector_details table.

For example:

className: "com.appnomic.heal.etladapter.repositories.AdapterConfigMaster"

properties:

hibernate.connection.username: "dbadmin"
hibernate.connection.password: "<password>"
hibernate.connection.autoReconnect: "true"
hibernate.c3p0.min_size: "1"
hibernate.c3p0.max_size: "3"
hibernate.connection.url: "jdbc:mysql://192.0.2.78:3307/dataadapter_sap? verifyServerCertificate=false&useSSL=true&requireSSL=true&enabledTLSProto cols=TLSv1.2,TLSv1.3&useServerPrepStmts=true&cacheServerConfiguration=true"

adapterProperties:

hibernate.connection.username: "dbadmin"
hibernate.connection.password: "<password>"
hibernate.connection.autoReconnect: "true"
hibernate.c3p0.min_size: "1"
hibernate.c3p0.max_size: "3"
hibernate.connection.url: "jdbc:mysql://192.0.2.78:3307/appsone" connector.id: "5"

4. The SQL directory contains the SAP HANA directory, which contains the below

SapHana/ adapter.sql
SapHana/ adapter_insert.sql
SapHana/ adapter_hana_create.sql
SapHana/ adapter_hana_insert.sql

5. Create a folder named ‘logs‘ inside ext-system- adapter_PayPal_SAP_Hana_Adapter

6. As per the configuration you require, update .sql scripts in SQL. Refer to Configuring SAP HANA Connector.

7. Execute all .sql scripts in the sql folder in MySQL on the server, where MySQL runs, to create the requisite database schema and tables.

Use the commands below.

mysql -h <percona-IP> -u <username> -p'<pssword>' -P 3307 --ssl- mode=disabled  < adapter.sql
mysql -h <percona-IP> -u <username> -p'<pssword>' -P 3307 --ssl- mode=disabled (scheema_name) < adapter_insert.sql
mysql -h <percona-IP> -u <username> -p'<pssword>' -P 3307 --ssl- mode=disabled (scheema_name) < adapter_hana_create.sql
mysql -h <percona-IP> -u <username> -p'<pssword>' -P 3307 --ssl- mode=disabled (scheema_name) < adapter_hana_insert.sql

For Information:

If HEAL is deployed in HA Mode, connector Database replication will not happen; execute all connector SQL files on the Secondary node of the Percona Server.

8. As not all connectors support TLSv1.3, follow the steps below to update TLSv1.2 in addition to TLSv1.3.

a. Open the cnf file in the path below:

<Installer  path>/conf/PERCONA/

b. Update 2 along with TLS v1.3.

tls_version=<TLS version 2>,<TLS version 3>

For example:

tls_version=TLSv1.2,TLSv1.3

9. Load the Docker image, tag it, and then push it using the following:

To load the image, use:

docker load <ext-system-adapter_<tag>.tar>

To tag the image, use:

docker tag <ext-system-adapter: <tag>> <host_entry>:<docker registry port>/<ext-system-adapter: <tag>>

To push the image, use:

docker push <host_entry>:<docker registry port>/<ext-system-adapter: <tag>>

For example:

To load the image, use the following:

docker load <<adapter image>>

To tag the image, use the following:

docker tag cassandra:3.11.6 registry.example:8091/cassandra:3.11.6

To push the image, use the following:

docker push registry.example:8091/cassandra:3.11.6

10. To pull the image to the server where you want to run the connector, use the command (this is required only when the Docker registry is installed on a different server):

podman pull <host_entry>:<docker registry port>/<ext-system-adapter:sapAdapter-<tag>

11. Configure the volume section in the Nomad file as below:

volumes = [
          "/opt/Installer/Heal/centralized_logs/sap-connector:/opt/heal/ext-system-adapter/logs",
          "<untarred conf directory path>:/opt/heal/ext-system-adapter/conf"
]