Install & Compatibility
Where this runs
tested against v2.28.26042901 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✓ 15.3s
314MB installed
● package 314MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ConnectionContext
✓ from hana_ml.dataframe import ConnectionContext
Correct import path for establishing HANA connection.
create_dataframe_from_pandas
✓ from hana_ml.dataframe import create_dataframe_from_pandas
Used to transfer pandas DataFrame to HANA DataFrame.
Establishes connection to SAP HANA and runs a simple query.
from hana_ml.dataframe import ConnectionContext
import os
# Connect to HANA (use environment variables for credentials)
cc = ConnectionContext(
address=os.environ.get('HANA_HOST', 'localhost'),
port=int(os.environ.get('HANA_PORT', 30015)),
user=os.environ.get('HANA_USER', 'USER1'),
password=os.environ.get('HANA_PASSWORD', 'Password123')
)
print(cc.connection.isconnected())
# Create a HANA DataFrame from a SQL query
hdf = cc.sql('SELECT * FROM DUMMY')
print(hdf.head())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'hana_ml'
Python cannot find the hana_ml package. Either not installed or installed from wrong source.
fixRun `pip install hana-ml` and verify installation with `pip list | grep hana-ml`.
DBTError: db error: [SAP AG][LIBODBCHDB DLL][HDBODBC] Communication error -10: cannot connect to host
Incorrect host, port, or network issues. Firewall or wrong address.
fixCheck HANA_HOST and HANA_PORT environment variables. Ensure the HANA instance is reachable. For testing, use `telnet <host> <port>`.
Upgrade
Version history
2.28.26042901latest on PyPI · released Apr 29, 2026
Audit
Dependencies
hdbclirequiredSAP HANA database client driver for connection