Skip to content
Learn › Connectors: open the docs menu

SAP HANA connector

The SAP HANA connector imports data from your SAP HANA database into Mammoth as a dataset. Browse tables directly or write custom SQL queries, with AI-assisted query generation from a plain-language description when it is enabled for your workspace.

Before you start

You need:

  • An SAP HANA instance reachable from the internet
  • A HANA user with SELECT access to the schemas and tables you want to import
  • Your HANA server's Host URL, Port, Username, Password, and Database name
  • Mammoth's IP address added to your HANA instance's allowed inbound list—see Network requirements

Tip: Confirm your port with your HANA administrator. The connection form pre-fills Port with 443, but that's a generic default, not a HANA-specific one. Many on-premises SAP HANA instances listen on a port in the 3<instance number>15 range instead (for example, 30015 for instance 00). Ask your HANA administrator for the correct port rather than assuming 443 will work.

Step 1: Select the SAP HANA connector

  1. In Mammoth, go to Data Library and click + New Dataset
  2. Select Connectors
  3. Search for SAP HANA or find it in the Databases category
  4. Click the SAP HANA tile

Step 2: Create a connection

Click New Connection to open the credential form.

FieldDescriptionExample
Host URLHostname or IP address of your SAP HANA serverhana-prod.example.com
PortTCP port your HANA instance listens onConfirm with your HANA admin—see tip above
UsernameHANA user with SELECT accessMAMMOTH_READER
PasswordPassword for the HANA user—
DatabaseName of the HANA database to connect toPROD
Display NameOptional label for this connection in MammothHANA Production

A callout below the fields reminds you to whitelist Mammoth's IP address in your database settings—see Network requirements for the exact address to use.

After filling in the fields, click Connect. Mammoth validates the credentials and saves the connection; if validation fails, the error message appears at the bottom of the form.

Step 3: Select a SAP HANA profile and query your data

Once connected, select the connection under Existing Connections. Mammoth lists the schemas in your HANA database as Profile entries. Click a profile to browse the tables in that schema—a profile in this connector corresponds to a HANA schema, even though the list is labeled "Profile" rather than "Schema."

Browse SAP HANA tables

Click any table in the List of tables panel to load a preview query using double-quoted identifiers, HANA style: SELECT * FROM "schema"."table".

Generate a SAP HANA query with AI

When enabled for your workspace, SAP HANA shows the Describe the data you need... AI query box above the query editor. Describe the data you need—for example, "all orders completed in the last 90 days"—and click the generate button. The box is disabled while Mammoth sets up metadata for AI query.

Write a custom SAP HANA query

SELECT "ORDER_ID", "CUSTOMER_ID", "AMOUNT", "ORDER_DATE"
FROM "SALES"."ORDERS"
WHERE "ORDER_DATE" >= ADD_DAYS(CURRENT_DATE, -90)
  AND "STATUS" = 'COMPLETED'

Query validation supports only SELECT statements. See Understanding data preview & query for a full guide to the preview screen.

Step 4: Save the SAP HANA dataset

  1. Enter a dataset name in the Save table as field
  2. Check the Update Method (the default is Replace all data). To change it, click the edit icon, pick an option, and click Save changes:
    • Replace all data—Replaces all existing data
    • Add new data—Adds new data based on a unique sequential column
    • Replace with new data—Replaces existing data with new data based on a unique sequential column For Add new data and Replace with new data, also choose a Key column—a numeric or date column with incrementing values, such as an ID or a date.
  3. Click Save as dataset. When the dataset is saved, click Done

Allow Mammoth in your SAP HANA network settings

Add Mammoth's IP address to your SAP HANA instance's allowed inbound connections. See Network requirements for the current IP address and configuration steps.

Troubleshoot SAP HANA connections

Connection fails

  • Confirm the port with your HANA administrator—see the tip in Before you start
  • Verify Mammoth's IP address is whitelisted in your HANA network settings
  • Check the username and password are correct for the target database

HANA error codes

The message "HANA Error Code {code}: {description}" is passed through directly from the HANA driver. The {code} and {description} identify the specific HANA-side error (for example, invalid object name or insufficient privileges)—use them to look up the issue in SAP's HANA documentation or check with your HANA administrator.

No tables appear after selecting a profile

Your HANA user may lack SELECT privileges on that schema. Ask your HANA administrator to grant access to the relevant schema and tables.

Query returns a column ambiguity error

Qualify column names with their table or alias (for example, "o"."ORDER_ID" instead of "ORDER_ID") when your query joins multiple tables.

Report an issue · support@mammoth.io