SAP HANA
SAP HANA is supported as a source database — the database LakeXpress extracts data from. It cannot be used as the LakeXpress DB.
Connecting to SAP HANA requires the hdbcli Python driver. If you are using FastBCP for high-throughput exports, the HDBDOTNETCORE runtime is also required (see the note at the bottom of this page).
Connection Parameters
| Parameter | Required | Description |
|---|---|---|
ds_type | Yes | Must be "saphana" |
auth_mode | Yes | "classic" for individual fields; "connection_string" to supply a full ODBC connection string |
server | Yes | Hostname or IP |
port | Yes | Port (default: 39017) |
database | Yes | Database name |
username | Yes | SAP HANA username |
password | Yes | SAP HANA password |
Required Permissions
-- Source database user:
GRANT SELECT ON SCHEMA your_schema TO lakexpress_user;
-- Metadata access:
GRANT SELECT ON SYS.TABLES TO lakexpress_user;
GRANT SELECT ON SYS.COLUMNS TO lakexpress_user;
Example: Source Database
{
"source_saphana": {
"ds_type": "saphana",
"auth_mode": "classic",
"info": {
"server": "hana-prod.company.com",
"port": 39017,
"database": "HDB",
"username": "$env{LX_HANA_USER}",
"password": "$env{LX_HANA_PASSWORD}"
}
}
}
Example: Connection String Mode
Use auth_mode: "connection_string" when you need to pass advanced ODBC driver options, or when your environment already manages connection strings centrally. The entire connection is expressed as a single connection_string value; the individual server, port, database, username, and password fields are not used.
{
"source_saphana_cs": {
"ds_type": "saphana",
"auth_mode": "connection_string",
"info": {
"connection_string": "DRIVER={HDBODBC};SERVERNODE=$env{LX_HANA_HOST}:39017;DATABASE=$env{LX_HANA_DB};UID=$env{LX_HANA_USER};PWD=$env{LX_HANA_PASSWORD}"
}
}
}
FastBCP requires the HDBDOTNETCORE runtime. Set the HDBDOTNETCORE environment variable to the runtime directory path before running LakeXpress.
See Also
- Database Connections Overview - Auth file format, security best practices