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
SELECTaccess 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 the3<instance number>15range instead (for example,30015for instance00). Ask your HANA administrator for the correct port rather than assuming443will work.
Step 1: Select the SAP HANA connector
- In Mammoth, go to Data Library and click + New Dataset
- Select Connectors
- Search for SAP HANA or find it in the Databases category
- Click the SAP HANA tile
Step 2: Create a connection
Click New Connection to open the credential form.
| Field | Description | Example |
|---|---|---|
| Host URL | Hostname or IP address of your SAP HANA server | hana-prod.example.com |
| Port | TCP port your HANA instance listens on | Confirm with your HANA admin—see tip above |
| Username | HANA user with SELECT access | MAMMOTH_READER |
| Password | Password for the HANA user | — |
| Database | Name of the HANA database to connect to | PROD |
| Display Name | Optional label for this connection in Mammoth | HANA 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
- Enter a dataset name in the Save table as field
- 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.
- 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.