Qubit Docs العربية

SAP HANA

Connect SAP HANA or SAP HANA Cloud so Qubit can read the tables and views in one schema. You can copy the data into Qubit on a schedule (Sync Mode) or query HANA live (Direct Mode). Servers inside a private network can be reached through an SSH bastion host.

Before you start

  • Create a dedicated technical user for Qubit and grant it SELECT on the schema you want to use, for example GRANT SELECT ON SCHEMA "SALES" TO QUBIT_READER. Qubit only sees the tables and views this user can read.
  • Create the user with NO FORCE_FIRST_PASSWORD_CHANGE, or sign in with it once to set its password. HANA refuses a user that still has to change its initial password.
  • Note the host and port:
    • SAP HANA Cloud: the SQL endpoint shown in SAP HANA Cloud Central, on port 443. Allow Qubit's IP addresses in the instance's connection settings.
    • On-premise: the server name and the tenant's SQL port, 3NN15 where NN is the instance number, for example 30015 for instance 00.
  • A schema with more than 1,000 tables, such as the ABAP schema of S/4HANA (SAPHANADB or SAPABAP1), needs a list of the tables to use. Pointing Qubit at a schema of reporting views is usually the better choice.

Connect SAP HANA

  1. Open Data Catalog from the sidebar, click Add Data, then choose Connect a database.
  2. On the New Data Source page, click SAP HANA. It is under Databases.
  3. Enter a Connection Name.
  4. Fill in the connection details:
    • Host: the server name, without the port.
    • Port: defaults to 443, the SAP HANA Cloud port.
    • Tenant database: only when the port belongs to the system database. Leave it empty for SAP HANA Cloud and for a tenant's own port.
    • Schema: the schema to read. Schema names are case-sensitive and usually upper case.
    • User and Password: the user you created.
    • Tables: optional. Table and view names separated by commas, with * as a wildcard, for example VBAK, VBAP, KNA1, Z_SALES*.
    • Use TLS: on by default, and required by SAP HANA Cloud. Qubit always validates the server certificate.
  5. Under Connection Mode, choose Sync Mode to copy the data into Qubit, or Direct Mode to query HANA live.
  6. To reach HANA through a bastion host, turn on Connect via SSH tunnel and enter the SSH host, SSH port, SSH username, SSH private key (PEM), and the key passphrase if it has one. The tunnel always uses Direct Mode, so no data is copied into Qubit. With TLS on, the certificate is still validated against the HANA host name.
  7. For Sync Mode, choose a Sync Schedule. The default is Daily.
  8. Click Create.

Qubit tests the connection before saving it, then takes you to the Data Catalog. You cannot change the connection mode or the SSH tunnel after the connection is created.

How the data arrives

In Direct Mode, each question runs on HANA, so filters, joins and totals are computed there and only the answer comes back. A few calculations have no exact HANA equivalent; for those, Qubit reads at most one million rows of each table involved and completes the calculation itself.

In both modes, columns keep their HANA types, with these exceptions:

  • BOOLEAN columns hold 1 and 0 in Direct Mode.
  • TIME columns arrive as text, spatial columns as text in WKT form, and VARBINARY columns as hexadecimal text.
  • BLOB columns are left out.

If the test fails

The form shows the error message:

  • "Authentication failed": check the user and password.
  • "This user must change its password before it can connect": sign in with the user once to set a new password.
  • "Could not reach" or "timed out": check the host and port, and that HANA accepts connections from Qubit. For SAP HANA Cloud, check the instance's allowed connections. For a private server, use the SSH tunnel.
  • "The server's TLS certificate could not be validated": enter the host name the certificate was issued for.
  • "Tenant database was not found": check the tenant name, or leave the field empty when the port is the tenant's own.
  • "Schema does not exist or this user cannot read it": check the schema name, including upper and lower case, and the user's grants.
  • "List the ones Qubit should read under Tables": the schema has more than 1,000 tables and views. List the tables to use under Tables.