diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index 8ec8038c31fb54..dfba574cc27512 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -201,7 +201,11 @@ def get_long_description(): "feast": {"feast==0.18.0", "flask-openid>=1.3.0"}, "glue": aws_common, # hdbcli is supported officially by SAP, sqlalchemy-hana is built on top but not officially supported - "hana": sql_common | {"sqlalchemy-hana>=0.5.0", "hdbcli>=2.11.20"}, + "hana": sql_common + | { + "sqlalchemy-hana>=0.5.0; platform_machine != 'aarch64'", + "hdbcli>=2.11.20; platform_machine != 'aarch64'", + }, "hive": sql_common | { # Acryl Data maintains a fork of PyHive diff --git a/metadata-ingestion/tests/integration/hana/test_hana.py b/metadata-ingestion/tests/integration/hana/test_hana.py index 35efd4b38bc4e3..8982c86ddc2bad 100644 --- a/metadata-ingestion/tests/integration/hana/test_hana.py +++ b/metadata-ingestion/tests/integration/hana/test_hana.py @@ -1,3 +1,5 @@ +import platform + import pytest from freezegun import freeze_time @@ -10,6 +12,10 @@ @freeze_time(FROZEN_TIME) @pytest.mark.slow_integration +@pytest.mark.skipif( + platform.machine().lower() == "aarch64", + reason="The hdbcli dependency is not available for aarch64", +) def test_hana_ingest(docker_compose_runner, pytestconfig, tmp_path, mock_time): test_resources_dir = pytestconfig.rootpath / "tests/integration/hana" diff --git a/metadata-ingestion/tests/unit/test_hana_source.py b/metadata-ingestion/tests/unit/test_hana_source.py index f096512e573eec..aa9d37069092e3 100644 --- a/metadata-ingestion/tests/unit/test_hana_source.py +++ b/metadata-ingestion/tests/unit/test_hana_source.py @@ -1,7 +1,15 @@ +import platform + +import pytest + from datahub.ingestion.api.common import PipelineContext from datahub.ingestion.source.sql.hana import HanaConfig, HanaSource +@pytest.mark.skipif( + platform.machine().lower() == "aarch64", + reason="The hdbcli dependency is not available for aarch64", +) def test_platform_correctly_set_hana(): source = HanaSource( ctx=PipelineContext(run_id="hana-source-test"), @@ -10,6 +18,10 @@ def test_platform_correctly_set_hana(): assert source.platform == "hana" +@pytest.mark.skipif( + platform.machine().lower() == "aarch64", + reason="The hdbcli dependency is not available for aarch64", +) def test_hana_uri_native(): config = HanaConfig.parse_obj( { @@ -22,6 +34,10 @@ def test_hana_uri_native(): assert config.get_sql_alchemy_url() == "hana+hdbcli://user:password@host:39041" +@pytest.mark.skipif( + platform.machine().lower() == "aarch64", + reason="The hdbcli dependency is not available for aarch64", +) def test_hana_uri_native_db(): config = HanaConfig.parse_obj( {