Skip to main content

SAP HANA

SAP HANA is an in-memory relational database designed for high-performance analytics and real-time data processing, commonly used alongside SAP's enterprise applications.

Supported Versions

Dremio supports SAP HANA 2.0. The connector was tested against HANA Express.

Connect to SAP HANA

  1. In the Dremio console, click Add Data on the Home page.
  2. In the Add Data dialog, select SAP HANA.
  3. Configure the connection using the sections below, then click Save.

General

Under Name, enter the connection name. The name cannot include the following special characters: /, :, [, or ].

Connection

  • Under Host, enter the URL or IP address for the SAP HANA instance. Example: sap://myServer
  • Under Port, enter the port. Port 39017 is the default for SAP HANA.
  • Under Schema (optional), enter the schema within the SAP HANA instance to which you want to connect.

Authentication

Dremio requires a username and password to access SAP HANA.

  • Username - The username with sufficient privileges to perform read/write actions on the SAP HANA instance.
  • Password - The password associated with the username.

Advanced Options

The following settings control more advanced functionalities in Dremio.

  • Advanced Options
    • Record fetch size - Number of records to fetch at once. Set to 0 (zero) to have Dremio automatically decide. The default value is 200.
    • Maximum idle connections - The maximum number of idle connections to keep. The default value is 8.
    • Connection idle time (s) - Idle time, in seconds, before a connection is considered for closure. The default value is 60.
    • Query timeout (s) - The timeout, in seconds, for query execution before it is canceled. Set to 0 for no timeout. The default value is 0.
  • Connection Properties
    • Name - The unique name for any custom properties.
    • Value - The value associated with the custom property.

Reflection Refresh

This tab controls the frequency of Reflection refreshes and the timespan for expiration for any queries.

  • Never refresh - Prevents refreshing any Reflections from this connection.
  • Refresh every - Sets the time interval at which Reflections are refreshed. This can be set to hours, days, or weeks.
  • Set refresh schedule - Specifies the daily or weekly schedule.
  • Never expire - Prevents expiring any Reflections from this connection.
  • Expire after - Sets the time after a Reflection is created that it expires and can no longer be used for queries. This can be set to hours, days, or weeks.

Metadata

This tab offers settings that control how dataset details are fetched and refreshed.

  • Dataset Handling
    • Remove dataset definitions if underlying data is unavailable - If this box is not checked and the underlying files under a folder are removed or the folder/source is not accessible, Dremio does not remove the dataset definitions. This option is useful when files are temporarily deleted and put back in place with new sets of files.
  • Metadata Refresh
    • Dataset Discovery
      • Fetch every - Specifies the time interval at which Dremio fetches object names. This can be set by minutes, hours, days, or weeks.
    • Dataset Details
      • Fetch mode - Restricts when metadata is retrieved.
      • Fetch every - Specifies the time interval at which metadata is fetched. This can be set by minutes, hours, days, or weeks.
      • Expire after - Specifies the timespan for when dataset details expire after a dataset is queried. This can be set by minutes, hours, days, or weeks.

Privileges

This connection inherits privileges from Project settings. To grant specific users or roles additional privileges in this connection:

  1. Enter the username or role name that you want to grant access to and click the Add to Privileges button. The added user or role is displayed in the USERS/ROLES table.
  2. For the users or roles in the USERS/ROLES table, toggle the checkmark for each privilege you want to grant on the Dremio source that is being created.
  3. Click Save after setting the configuration.

See Privileges for additional information about privileges.

Edit an SAP HANA Connection

  1. On the Open Catalog page, under Connections, right-click the connection and select Settings.
  2. Update the connection configuration as needed.
  3. Click Save.

Delete an SAP HANA Connection

  1. On the Open Catalog page, under Connections, right-click the connection and select Delete.
  2. Click Delete to confirm.

Predicate Pushdowns

Dremio delegates the execution of these expressions and functions to the database being queried, often dramatically improving query performance. It can also offload entire SQL queries that include one or more of the following expressions and functions:

%, *, +, -, /
<, <=, <>, =, >, >=, !=
AND, NOT, OR, ||
ABS
ACOS
ADD_MONTHS
ASIN
ATAN
ATAN2
AVG
CAST
CBRT
CEIL
CEILING
CHAR_LENGTH
CHARACTER_LENGTH
CONCAT
COS
COT
DATE_ADD
DATE_DIFF
DATE_SUB
DATE_TRUNC_CENTURY
DATE_TRUNC_DAY
DATE_TRUNC_DECADE
DATE_TRUNC_HOUR
DATE_TRUNC_MILLENNIUM
DATE_TRUNC_MINUTE
DATE_TRUNC_MONTH
DATE_TRUNC_SECOND
DATE_TRUNC_YEAR
DEGREES
E
EXP
EXTRACT_DAY
EXTRACT_DOW
EXTRACT_DOY
EXTRACT_HOUR
EXTRACT_MINUTE
EXTRACT_MONTH
EXTRACT_QUARTER
EXTRACT_SECOND
EXTRACT_WEEK
EXTRACT_YEAR
FLOOR
IS DISTINCT FROM
IS NOT DISTINCT FROM
IS NOT NULL
IS NULL
LCASE
LEFT
LN
LOCATE
LOG
LOG10
LPAD
LTRIM
MAX
MIN
MOD
MONTH
PI
POSITION
POW
POWER
RADIANS
RAND
REPLACE
REVERSE
RIGHT
ROUND
RPAD
RTRIM
SIGN
SIN
SQRT
SUBSTR
SUBSTRING
SUM
TAN
TO_CHAR
TO_DATE
TRIM
TRUNC
TRUNCATE
UCASE
UPPER
YEAR