HANA

HANA is a column-oriented, in-memory relational database.

watsonx.data on IBM Software Hub

watsonx.data Developer edition

HANA

Configure the following details for HANA:

Field Description
Display name Enter the database name to be displayed on the screen.
Database name Enter the name of your database.
Hostname Enter the Hostname.
Port Enter the Port number.
Username Enter the Username.
Password Enter the Password.
Port is SSL enabled Use the toggle switch to enable or disable SSL connection. If enabled,

i. The Upload SSL certificate (.pem, .crt, .cert, or .cer) link is enabled.

ii. Click the Upload SSL certificate (.pem, .crt, .cert, or .cer) link.

iii. Browse the SSL certificate and upload.

Validate certificate Use the toggle switch to validate whether the SSL certificate that the host returns is trusted or not.
Connection status Click the Test connection to test the data source connection. If the data source connection is successful, a success message appears. You must add a JAR as part of the Bring Your Own JAR (BYOJ) process to enable the test connection option. See Bring Your Own JAR (BYOJ) Process.

Console UI

Associate catalog

Console UI

Select the checkbox to associate a catalog to the data source. This catalog is automatically associated with your data source and serves as your query interface with the data stored within.
Catalog name / Name
  • Console UI

    Catalog name: Enter the name of the catalog.
  • Platform UI

    Name: Enter the name of the database associated with your data source. The database serves as your query interface with the data stored within.
Create Click Create to create the database.

Bring Your Own JAR (BYOJ) Process

The following is the procedure to add your own JAR to the HANA data source:
  1. Log in to the IBM® watsonx.data console.
  2. From the navigation menu, go to the Configurations page and click the Driver manager tile.
  3. Click Add driver.
  4. Upload the HANA JAR and specify the driver version. Currently, only one JAR(ngdbc-2.17.12.jar) is supported for HANA data source.
  5. Click Add. Once the driver is successfully added, it undergoes a series of validation. If the validation is successful, it is set to 'inactive' status otherwise it is set to 'failed' status.
  6. Click the vertical ellipsis icon to assign or delete the driver.
  7. To assign the driver to an engine:
    • Click Assign.
    • Select one or more engines to assign the driver. Once assigned, the driver is set to 'active' status.
      Note: You can link the HANA data source to the engine only when a driver is associated to that engine. Only one HANA driver can be associated to an engine at a time.
  8. To unassign a driver from an engine, users must first introduce another driver.
  9. Click Save and restart engine.
  10. In the Infrastructure manager, hover over the HANA data source and click the Manage associations icon.
  11. Select the engine to modify the catalog's association with it. All in-flight queries on the modified engines are stopped.
  12. Click Save and restart engine.

Limitations for SQL statements

  • DROP TABLE statement is supported only when enabled in the catalog.
  • By default, SAP HANA creates VARCHAR columns with a size of 1. So if a base table column is defined with just VARCHAR without specifying a size (e.g., VARCHAR(size)), then CTAS (Create Table As Select) operations do not work.
  • For the database-based catalogs, CREATE SCHEMA, CREATE TABLE, DROP SCHEMA, DROP TABLE, DELETE, DROP VIEW, ALTER TABLE, and ALTER SCHEMA statements are not available in the Data manager UI.

Limitations for data types

  • BLOB and CLOB data types support only CREATE and SELECT statements.
  • BINARY data type supports only SELECT statement.
  • The data that is shown for the BLOB and BINARY data types from the UI is in Base64 format, while the result from presto-cli is in hexadecimal format.
  • When the fields of data type REAL have 6 digits or more in the decimal part with the digits being predominately zero, the values when queried are rounded off. It is observed that the rounding off occurs differently based on the precision of the values. For example, a decimal number 1.654 when rounded to 3-digits after the decimal point are the same. Another example is 10.890009 and 10.89000. It is noticed that 10.89000 is rounded to 10.89, whereas 10.89009 is not rounded off. This is an inherent issue because of the representational limitations of binary floating point formats. This might have a significant impact when querying involves sorting.