Skip to content

Feat/hana engine#1332

Open
ToniLippmann wants to merge 3 commits into
datacontract:mainfrom
ToniLippmann:feat/hana-engine
Open

Feat/hana engine#1332
ToniLippmann wants to merge 3 commits into
datacontract:mainfrom
ToniLippmann:feat/hana-engine

Conversation

@ToniLippmann

@ToniLippmann ToniLippmann commented Jun 22, 2026

Copy link
Copy Markdown

Implements RFC-0045: SAP HANA server type.

Adds a new hana server type for testing data contracts against
SAP HANA Cloud and SAP Datasphere (Open SQL schemas).

  • Native engine via hdbcli (SAP HANA Client) — bypasses the Ibis/sqlglot
    path because neither supports SAP HANA
  • Follows existing server-type conventions (host, port, schema;
    credentials via DATACONTRACT_HANA_* env vars)
  • Datasphere: validates primaryKey/unique at the data level
    (COUNT(DISTINCT ...)) because Open SQL objects are predominantly views
    with no catalog constraint metadata
  • [hana] is an opt-in extra onlyhdbcli is distributed under SAP's
    proprietary license (SAP Developer License) and is therefore intentionally
    excluded from [all]

Test results

Unit tests (mocked hdbcli, no live instance required):

  • test_hana_connection.py — passed
  • test_hana_schema_check.py — passed
  • test_hana_quality_check.py — passed
  • test_hana_type_mapping.py — passed
  • test_test_hana.py::test_hana_test_flow_bypasses_soda — passed

Integration tests (SAP Datasphere demo tenant):

  • test_hana_full_contract_pass — passed
  • test_hana_full_contract_fail_schema — passed
  • test_hana_quality_check_live — passed

ToniLippmann and others added 2 commits June 22, 2026 23:44
- Remove `hana` from `[all]` and `[dev]` meta-extras: hdbcli is
  distributed under SAP's proprietary license (SAP Developer License),
  not an OSI-approved open-source license, so bundling it into the
  default all-inclusive extra is inappropriate. Users must opt in
  explicitly with `pip install datacontract-cli[hana]`.
- Add SAP HANA Cloud / SAP Datasphere section to README (install table
  row, example YAML for HANA Cloud and Datasphere, TLS / Datasphere
  view notes, env-var reference table with license warning).
- Add Unreleased CHANGELOG entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@simonharrer

Copy link
Copy Markdown
Contributor

Only works with ODCS 3.2, as we are adding hana as a server type

`data_contract_checks` was removed in v1.0.0. Map the two functions
to their new locations:
- `_retention_value_to_seconds` → engines/checks/create_checks.py
- `to_sodacl_threshold`         → export/sodacl_check_builder.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants