Skip to main content

SAP HANA

Overview

SAP HANA is an in-memory, column-oriented relational database that powers SAP Business Suite, SAP S/4HANA, and bespoke analytics built on the HANA Cloud / HANA on-premise platform. Learn more in the official SAP HANA documentation.

The DataHub integration for SAP HANA covers core metadata entities such as datasets (tables, regular views, and calculation views), schema fields, and containers. It also captures table- and column-level lineage from calculation views, table-level and procedure-to-procedure lineage from stored procedures, data profiling, and stateful deletion detection.

Concept Mapping

SAP HANA ConceptDataHub Entity (Subtype)Notes
Tenant databasePlatform InstanceTop-level scope; all URNs include the configured platform instance.
SchemaContainer (SCHEMA)Top-level namespace inside the tenant database.
Table (row / column / virtual)Dataset (TABLE)Includes column-store, row-store, and virtual tables. Schema, descriptions, and tags (where available) are extracted.
Regular ViewDataset (VIEW)Standard SQL views; the view definition is captured for lineage.
Calculation ViewDataset (Calculation View)Opt-in via include_calculation_views: true. Activated calc views are pulled from _SYS_REPO.ACTIVE_OBJECT; column-level lineage is parsed from the XML.
SqlScriptView Calculation ViewDataset (Calculation View)Calc views whose body is HANA SQLScript. Table-level lineage is extracted from the procedure body; column-level lineage from SQLScript is out of scope.
Stored Procedure (SQLScript)DataFlow (Procedures Container) + DataJob (Stored Procedure)Opt-in via include_stored_procedures (on by default). One DataFlow per schema; each procedure becomes a DataJob. Table-level lineage is parsed from the body.
Column / fieldSchemaFieldNative type, nullability, and (for calc views) comments are extracted.
Table- and column-level lineageLineage edgesExtracted from view definitions and calc-view XML; column-level lineage flows through the SqlParsingAggregator like Snowflake / Redshift.
Query history / usageDatasetUsageStatistics + Operations + query-derived lineageOpt-in via include_query_usage. Mines _SYS_STATISTICS.HOST_SQL_PLAN_CACHE (requires the statistics service and the MONITORING role).

Module hana

Incubating

Important Capabilities

CapabilityStatusNotes
Asset ContainersEnabled by default. Supported for types - Database, Schema.
ClassificationOptionally enabled via classification.enabled.
Column-level LineageEnabled by default to get lineage for views via include_view_column_lineage. Supported for types - View.
Data ProfilingOptionally enabled via configuration.
Dataset UsageOptionally enabled via include_query_usage (queries) and include_usage_stats (rollup) — mines _SYS_STATISTICS.HOST_SQL_PLAN_CACHE.
DescriptionsEnabled by default.
Detect Deleted EntitiesEnabled by default via stateful ingestion.
DomainsSupported via the domain config field.
Operation CaptureDerived from observed queries when include_operational_stats and include_query_usage are enabled.
Platform InstanceEnabled by default.
Schema MetadataEnabled by default.
Table-Level LineageEnabled by default to get lineage for views via include_view_lineage. Supported for types - View.
Test ConnectionEnabled by default.

Overview

The hana module ingests metadata from SAP HANA into DataHub. It targets both SAP HANA Cloud and on-premise HANA tenants and is intended for production ingestion workflows.

The connector extends DataHub's SQLAlchemySource, so the standard SQL extraction path (tables, regular views, schema reflection, profiling, classification, stateful deletion detection, container hierarchy, test-connection) is the same as for other SQLAlchemy-backed sources. On top of that, three HANA-specific paths can be enabled:

  • Calculation Views — set include_calculation_views: true to pull activated calculation views from _SYS_REPO.ACTIVE_OBJECT and parse column-level lineage from their XML definitions. Filter the set with calculation_view_pattern (matched against <package_id>.<view_name>); the inherited view_pattern filters regular SQL views and does not apply here.
  • Stored Procedures — enabled by default via include_stored_procedures: true. Each procedure becomes a DataJob grouped under a per-schema DataFlow; lineage is parsed from the procedure body.
  • Query Usage — set include_query_usage: true to mine _SYS_STATISTICS.HOST_SQL_PLAN_CACHE for observed queries and feed them through the SQL parsing aggregator. Combine with include_usage_stats: true for DatasetUsageStatistics rollups and include_operational_stats: true for read operations.

Deployment compatibility

Most features work on every supported HANA tenant, but calculation-view extraction is on-premise / self-managed only:

CapabilitySAP HANA on-premise / self-managed (HANA 1.0 SPS12+, HANA 2.0, HANA Express)SAP HANA Cloud / HDI-only deployments
Tables, regular views, schema reflection
Stored procedures (include_stored_procedures)
Query usage (include_query_usage)
Profiling
Calculation views (include_calculation_views)❌ — HANA Cloud does not ship the XS-classic repository (_SYS_REPO); calc views are deployed via HDI containers and are not exposed as parseable XML payloads.

If you run include_calculation_views: true against HANA Cloud, the calc-view extractor logs a warning and falls back to a no-op rather than failing the run, so the rest of metadata ingestion completes normally.

Prerequisites

Database driver

The connector uses SAP's official hdbcli driver via sqlalchemy-hana. Both are installed automatically when you install the hana extra.

Architecture note: hdbcli ships precompiled wheels for x86_64 only. On aarch64 / arm64 (Apple Silicon, AWS Graviton) you must run the ingestion process under an x86_64 Python interpreter (e.g. via Rosetta or an x86_64 container).

Network connectivity

The default port for the SAP hdbcli driver is 30015 (single-container instances) or the tenant port surfaced in HANA Cockpit (multitenant database container deployments). Ensure the ingestion process can reach the tenant on that port.

Permissions

Run the following as a HANA administrator (a user with ROLE ADMIN and USER ADMIN) to create a DataHub-specific role and user. Grants are layered by capability — comment out the sections for features you don't intend to enable.

-- 1. Role + user
CREATE ROLE DATAHUB_ROLE;

CREATE USER DATAHUB_USER PASSWORD "<your-strong-password>" NO FORCE_FIRST_PASSWORD_CHANGE;
GRANT DATAHUB_ROLE TO DATAHUB_USER;

-- 2. Baseline metadata: tables, regular views, schema reflection.
-- Repeat for every schema you want to ingest.
GRANT SELECT ON SCHEMA "<YOUR_SCHEMA>" TO DATAHUB_ROLE;

-- 3. Stored procedures (required when `include_stored_procedures: true`,
-- which is the default).
GRANT SELECT ON SYS.PROCEDURES TO DATAHUB_ROLE;
GRANT SELECT ON SYS.PROCEDURE_PARAMETERS TO DATAHUB_ROLE;

-- 4. Calculation views — ON-PREMISE / SELF-MANAGED ONLY.
-- Requires the SAP HANA XS-classic repository (`_SYS_REPO`). Skip this
-- block entirely on SAP HANA Cloud / HDI-only deployments.
GRANT SELECT ON _SYS_REPO.ACTIVE_OBJECT TO DATAHUB_ROLE;
GRANT SELECT ON SYS.VIEW_COLUMNS TO DATAHUB_ROLE;
GRANT SELECT ON SCHEMA _SYS_BIC TO DATAHUB_ROLE;

-- 5. Query usage from `_SYS_STATISTICS.HOST_SQL_PLAN_CACHE`
-- (required when `include_query_usage: true`).
-- `MONITORING` is the lowest-privilege role that covers it; alternatively
-- use the broader `CATALOG READ` system privilege.
GRANT MONITORING TO DATAHUB_ROLE;
-- or, equivalently:
-- GRANT CATALOG READ TO DATAHUB_ROLE;

-- 6. Profiling (only required when `profiling.enabled: true`).
-- Profiling reads sample data from the tables it inspects, so it inherits
-- the SELECT grants from step 2 — no extra privileges needed beyond that.

Capability-to-grant matrix

CapabilityRequired grantsNotes
Tables, regular views, schema reflectionSELECT on each ingested schemaGrant per schema you want to ingest. Without this the schema is invisible to SQLAlchemy reflection.
Stored procedures (include_stored_procedures: true, default on)SELECT on SYS.PROCEDURES, SYS.PROCEDURE_PARAMETERSStored-procedure bodies and signatures are read from SYS.PROCEDURES; argument signatures use SYS.PROCEDURE_PARAMETERS.
Calculation views (include_calculation_views: true)SELECT on _SYS_REPO.ACTIVE_OBJECT, SYS.VIEW_COLUMNS, SCHEMA _SYS_BICOn-premise / self-managed HANA only. _SYS_BIC is the runtime schema activated calc views materialise into.
Query usage (include_query_usage: true)MONITORING role or CATALOG READ system privilegeBoth grant read access to _SYS_STATISTICS.HOST_SQL_PLAN_CACHE. The statistics service must also be running (it is by default).
Profiling (profiling.enabled: true)Inherits per-schema SELECT from row 1Profiling queries the same tables visible to metadata extraction; no additional grants required.

The MONITORING role is included with HANA's standard role catalog (see SAP note 2147247 for diagnostics if _SYS_STATISTICS looks empty after granting it).

Install the Plugin

pip install 'acryl-datahub[hana]'

Starter Recipe

Check out the following recipe to get started with ingestion! See below for full configuration options.

For general pointers on writing and running a recipe, see our main recipe guide.

source:
type: hana
config:
# Coordinates
host_port: "hana.example.com:30015"
# Optional: set to query a specific HANA tenant database
# database: "TENANT_DB"

# Credentials
username: "${HANA_USER}"
password: "${HANA_PASS}"

# (Optional) Uncomment and update to filter ingested schemas
# schema_pattern:
# allow:
# - "^REPORTING$"
# - "^SAPABAP1$"

# Enable to ingest activated calculation views (requires
# _SYS_REPO.ACTIVE_OBJECT, i.e. XS-classic repository content).
include_calculation_views: true

# (Optional) Filter calculation views by `<package_id>.<view_name>`.
# The inherited `view_pattern` filters regular SQL views and does not
# apply here.
# calculation_view_pattern:
# allow:
# - "^acme\\.analytics\\..*"

# Stored procedures are on by default — disable if you don't want them
# as DataJob entities.
# include_stored_procedures: false

# (Optional) Query usage from _SYS_STATISTICS.HOST_SQL_PLAN_CACHE.
# Requires MONITORING (or CATALOG READ) on the ingestion user and the
# statistics service running on the tenant. Off by default.
# include_query_usage: true
# include_usage_stats: true
# include_operational_stats: true
# usage_max_queries: 10000
# bucket_duration: DAY
# start_time: "-7 days"

profiling:
enabled: true
turn_off_expensive_profiling_metrics: true

# Default sink is datahub-rest and doesn't need to be configured
# See https://docs.datahub.com/docs/metadata-ingestion/sink_docs/datahub for customization options

Config Details

Note that a . is used to denote nested fields in the YAML recipe.

FieldDescription
bucket_duration
Enum
One of: "DAY", "HOUR"
convert_urns_to_lowercase
boolean
Whether to convert dataset urns to lowercase.
Default: False
database
One of string, null
database (catalog)
Default: None
end_time
string(date-time)
Latest date of lineage/usage to consider. Default: Current time in UTC
format_sql_queries
boolean
Whether to format sql queries
Default: False
host_port
string
SAP HANA host and port, e.g. myhost.example.com:30015. HANA Cloud requires TLS — pass encrypt=true via options.connect_args if the driver does not enable it.
Default: localhost:39041
include_calculation_views
boolean
If true, ingest SAP HANA calculation views from _SYS_REPO.ACTIVE_OBJECT with column-level lineage parsed from their XML. On-premise / self-managed HANA only.
Default: False
include_operational_stats
boolean
Whether to display operational stats.
Default: True
include_query_usage
boolean
If true, mine query history from _SYS_STATISTICS.HOST_SQL_PLAN_CACHE. Requires the MONITORING role or CATALOG READ system privilege.
Default: False
include_read_operational_stats
boolean
Whether to report read operational stats. Experimental.
Default: False
include_stored_procedures
boolean
If true, ingest stored procedures as DataJob entities with table-level lineage parsed from their bodies.
Default: True
include_table_location_lineage
boolean
If the source supports it, include table lineage to the underlying storage location.
Default: True
include_tables
boolean
Whether tables should be ingested.
Default: True
include_top_n_queries
boolean
Whether to ingest the top_n_queries.
Default: True
include_usage_stats
boolean
If true, emit DatasetUsageStatistics aspects. Requires include_query_usage and the same MONITORING / CATALOG READ privilege.
Default: False
include_view_column_lineage
boolean
Populates column-level lineage for view->view and table->view lineage using DataHub's sql parser. Requires include_view_lineage to be enabled.
Default: True
include_view_lineage
boolean
Populates view->view and table->view lineage using DataHub's sql parser.
Default: True
include_views
boolean
Whether views should be ingested.
Default: True
incremental_lineage
boolean
When enabled, emits lineage as incremental to existing lineage already in DataHub. When disabled, re-states lineage on each run.
Default: False
options
object
Any options specified here will be passed to SQLAlchemy.create_engine as kwargs. To set connection arguments in the URL, specify them under connect_args.
password
One of string(password), null
password
Default: None
platform_instance
One of string, null
The instance of the platform that all assets produced by this recipe belong to. This should be unique within the platform. See https://docs.datahub.com/docs/platform-instances/ for more details.
Default: None
sqlalchemy_uri
One of string, null
URI of database to connect to. See https://docs.sqlalchemy.org/en/14/core/engines.html#database-urls. Takes precedence over other connection parameters.
Default: None
start_time
string(date-time)
Earliest date of lineage/usage to consider. Default: Last full day in UTC (or hour, depending on bucket_duration). You can also specify relative time with respect to end_time such as '-7 days' Or '-7d'.
Default: None
top_n_queries
integer
Number of top queries to save to each table.
Default: 10
usage_max_queries
integer
Maximum number of distinct (statement_hash, last_execution_timestamp) rows pulled from HOST_SQL_PLAN_CACHE per ingestion run. Distinct from top_n_queries, which caps the per-bucket rollup.
Default: 10000
use_file_backed_cache
boolean
Whether to use a file backed cache for the view definitions.
Default: True
username
One of string, null
username
Default: None
env
string
The environment that all assets produced by this connector belong to
Default: PROD
calculation_view_pattern
AllowDenyPattern
A class to store allow deny regexes
calculation_view_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
domain
map(str,AllowDenyPattern)
A class to store allow deny regexes
domain.key.allow
array
List of regex patterns to include in ingestion
Default: ['.*']
domain.key.allow.string
string
domain.key.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
domain.key.deny
array
List of regex patterns to exclude from ingestion.
Default: []
domain.key.deny.string
string
procedure_pattern
AllowDenyPattern
A class to store allow deny regexes
procedure_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
profile_pattern
AllowDenyPattern
A class to store allow deny regexes
profile_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
schema_pattern
AllowDenyPattern
A class to store allow deny regexes
schema_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
table_pattern
AllowDenyPattern
A class to store allow deny regexes
table_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
user_email_pattern
AllowDenyPattern
A class to store allow deny regexes
user_email_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
view_pattern
AllowDenyPattern
A class to store allow deny regexes
view_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
classification
ClassificationConfig
classification.enabled
boolean
Whether classification should be used to auto-detect glossary terms
Default: False
classification.info_type_to_term
map(str,string)
classification.max_workers
integer
Number of worker processes to use for classification. Set to 1 to disable.
Default: 4
classification.sample_size
integer
Number of sample values used for classification.
Default: 100
classification.classifiers
array
Classifiers to use to auto-detect glossary terms. If more than one classifier, infotype predictions from the classifier defined later in sequence take precedance.
Default: [{'type': 'datahub', 'config': None}]
classification.classifiers.DynamicTypedClassifierConfig
DynamicTypedClassifierConfig
classification.classifiers.DynamicTypedClassifierConfig.type 
string
The type of the classifier to use. For DataHub, use datahub
classification.classifiers.DynamicTypedClassifierConfig.config
One of object, null
The configuration required for initializing the classifier. If not specified, uses defaults for classifer type.
Default: None
classification.column_pattern
AllowDenyPattern
A class to store allow deny regexes
classification.column_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
classification.table_pattern
AllowDenyPattern
A class to store allow deny regexes
classification.table_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
profiling
GEProfilingConfig
profiling.catch_exceptions
boolean
Default: True
profiling.enabled
boolean
Whether profiling should be done.
Default: False
profiling.field_sample_values_limit
integer
Upper limit for number of sample values to collect for all columns.
Default: 20
profiling.include_field_distinct_count
boolean
Whether to profile for the number of distinct values for each column.
Default: True
profiling.include_field_distinct_value_frequencies
boolean
Whether to profile for distinct value frequencies.
Default: False
profiling.include_field_histogram
boolean
Whether to profile for the histogram for numeric fields.
Default: False
profiling.include_field_max_value
boolean
Whether to profile for the max value of numeric columns.
Default: True
profiling.include_field_mean_value
boolean
Whether to profile for the mean value of numeric columns.
Default: True
profiling.include_field_median_value
boolean
Whether to profile for the median value of numeric columns.
Default: True
profiling.include_field_min_value
boolean
Whether to profile for the min value of numeric columns.
Default: True
profiling.include_field_null_count
boolean
Whether to profile for the number of nulls for each column.
Default: True
profiling.include_field_quantiles
boolean
Whether to profile for the quantiles of numeric columns.
Default: False
profiling.include_field_sample_values
boolean
Whether to profile for the sample values for all columns.
Default: True
profiling.include_field_stddev_value
boolean
Whether to profile for the standard deviation of numeric columns.
Default: True
profiling.limit
One of integer, null
Max number of documents to profile. By default, profiles all documents.
Default: None
profiling.max_number_of_fields_to_profile
One of integer, null
A positive integer that specifies the maximum number of columns to profile for any table. None implies all columns. The cost of profiling goes up significantly as the number of columns to profile goes up.
Default: None
profiling.max_workers
integer
Number of worker threads to use for profiling. Set to 1 to disable.
Default: 20
profiling.method
Enum
One of: "ge", "sqlalchemy"
Default: sqlalchemy
profiling.offset
One of integer, null
Offset in documents to profile. By default, uses no offset.
Default: None
profiling.partition_datetime
One of string(date-time), null
If specified, profile only the partition which matches this datetime. If not specified, profile the latest partition. Only Bigquery supports this.
Default: None
profiling.partition_profiling_enabled
boolean
Whether to profile partitioned tables. Only BigQuery and Aws Athena supports this. If enabled, latest partition data is used for profiling.
Default: True
profiling.profile_external_tables
boolean
Whether to profile external tables. Only Snowflake and Redshift supports this.
Default: False
profiling.profile_if_updated_since_days
One of number, null
Profile table only if it has been updated since these many number of days. If set to null, no constraint of last modified time for tables to profile. Supported only in snowflake and BigQuery.
Default: None
profiling.profile_nested_fields
boolean
Whether to profile complex types like structs, arrays and maps.
Default: False
profiling.profile_table_level_only
boolean
Whether to perform profiling at table-level only, or include column-level profiling as well.
Default: False
profiling.profile_table_row_count_estimate_only
boolean
Use an approximate query for row count. This will be much faster but slightly less accurate. Only supported for Postgres and MySQL.
Default: False
profiling.profile_table_row_limit
One of integer, null
Profile tables only if their row count is less than specified count. If set to null, no limit on the row count of tables to profile. Supported only in Snowflake, BigQuery. Supported for Oracle based on gathered stats.
Default: 5000000
profiling.profile_table_size_limit
One of integer, null
Profile tables only if their size is less than specified GBs. If set to null, no limit on the size of tables to profile. Supported only in Snowflake, BigQuery and Databricks. Supported for Oracle based on calculated size from gathered stats.
Default: 5
profiling.query_combiner_enabled
boolean
This feature is still experimental and can be disabled if it causes issues. Reduces the total number of queries issued and speeds up profiling by dynamically combining SQL queries where possible.
Default: True
profiling.report_dropped_profiles
boolean
Whether to report datasets or dataset columns which were not profiled. Set to True for debugging purposes.
Default: False
profiling.sample_size
integer
Number of rows to be sampled from table for column level profiling.Applicable only if use_sampling is set to True.
Default: 10000
profiling.turn_off_expensive_profiling_metrics
boolean
Whether to turn off expensive profiling or not. This turns off profiling for quantiles, distinct_value_frequencies, histogram & sample_values. This also limits maximum number of fields being profiled to 10.
Default: False
profiling.use_sampling
boolean
Whether to profile column level stats on sample of table. Only BigQuery and Snowflake support this. If enabled, profiling is done on rows sampled from table. Sampling is not done for smaller tables.
Default: True
profiling.operation_config
OperationConfig
profiling.operation_config.lower_freq_profile_enabled
boolean
Whether to do profiling at lower freq or not. This does not do any scheduling just adds additional checks to when not to run profiling.
Default: False
profiling.operation_config.profile_date_of_month
One of integer, null
Number between 1 to 31 for date of month (both inclusive). If not specified, defaults to Nothing and this field does not take affect.
Default: None
profiling.operation_config.profile_day_of_week
One of integer, null
Number between 0 to 6 for day of week (both inclusive). 0 is Monday and 6 is Sunday. If not specified, defaults to Nothing and this field does not take affect.
Default: None
profiling.tags_to_ignore_sampling
One of array, null
Fixed list of tags to ignore sampling. If not specified, tables will be sampled based on use_sampling.
Default: None
profiling.tags_to_ignore_sampling.string
string
stateful_ingestion
One of StatefulStaleMetadataRemovalConfig, null
Default: None
stateful_ingestion.enabled
boolean
Whether or not to enable stateful ingest. Default: True if a pipeline_name is set and either a datahub-rest sink or datahub_api is specified, otherwise False
Default: False
stateful_ingestion.fail_safe_threshold
number
Prevents large amount of soft deletes & the state from committing from accidental changes to the source configuration if the relative change percent in entities compared to the previous state is above the 'fail_safe_threshold'.
Default: 75.0
stateful_ingestion.remove_stale_metadata
boolean
Soft-deletes the entities present in the last successful run but missing in the current run with stateful_ingestion enabled.
Default: True

Capabilities

Use the Important Capabilities table above as the source of truth for supported features.

Lineage Computation Details

  • Regular views — lineage is extracted from each view's CREATE VIEW definition via the SqlParsingAggregator and the postgres sqlglot dialect (HANA SQL is close enough to ANSI for view definitions).
  • Calculation views (include_calculation_views: true) — column-level lineage is parsed from the calc view's XML in _SYS_REPO.ACTIVE_OBJECT. The parser handles ProjectionView, JoinView, AggregationView, UnionView, RankView, and SqlScriptView nodes. For SqlScriptView (calculationScenarioType="SCRIPT_BASED") views the parser also extracts table-level upstreams from the embedded HANA SQLScript body — column-level lineage from SQLScript is out of scope.
  • Stored procedures (include_stored_procedures: true) — each procedure's body is parsed for table-level reads/writes and procedure-to-procedure lineage; the result is attached to the procedure's DataJob as input/output datasets.
  • Observed queries (include_query_usage: true) — query history from _SYS_STATISTICS.HOST_SQL_PLAN_CACHE is fed to the aggregator as ObservedQuery entries. Each row represents one (statement_hash, last_execution_timestamp) observation — i.e. one distinct moment a cached plan was executed within [start_time, end_time]. The aggregator derives both query-driven lineage and (with include_usage_stats: true) DatasetUsageStatistics rollups bucketed by bucket_duration.

Usage Computation Details

When include_query_usage: true:

  • The connector dedupes plan-cache snapshots by (statement_hash, last_execution_timestamp) so a steady-state query that has been observed by many statistics-service snapshots does not double-count. As a consequence, multiple executions that fall inside one snapshot window are observed as a single event; absolute execution counts are therefore a floor, not an exact count.
  • System users (SYS and any _SYS_* user) and monitoring traffic against SYS / _SYS_* schemas are filtered out at the SQL layer.
  • usage_max_queries caps the number of distinct observations returned per ingestion run.
  • bucket_duration, start_time, and end_time come from BaseUsageConfig and behave the same as in Snowflake / Redshift.

Profiling Details

Profiling is implemented via SQLAlchemySource's standard profiler and is opt-in (profiling.enabled: true). HANA's column-store makes most profiling queries cheap, but you can still cap the per-table sample size via profile_table_level_only or profile.sample_size for very wide / large tables.

Limitations

  • hdbcli driver on aarch64/arm64 — SAP does not ship aarch64 wheels for hdbcli. Run ingestion under an x86_64 interpreter on Apple Silicon and Graviton hosts.
  • Calculation views are on-premise / self-managed onlyinclude_calculation_views: true requires the SAP HANA XS-classic repository (_SYS_REPO), which is not present on SAP HANA Cloud or HDI-only deployments. See the deployment-compatibility table in the prerequisites section for the full feature matrix; calc-view extraction warns and skips rather than failing on incompatible tenants.
  • Calc views that wrap stored procedures — a SqlScriptView whose body only CALLs another procedure has no parsable FROM/JOIN references, so no table lineage is emitted for that view. The called procedure itself is still ingested (if include_stored_procedures is on) and reachable through procedure lineage.
  • SQLScript column-level lineage — column-level lineage from SQLScript bodies (calc-view SqlScriptView nodes and stored procedures) is intentionally out of scope; sqlglot's HANA support is too partial for reliable column tracing.
  • Usage execution counts are a lower bound_SYS_STATISTICS.HOST_SQL_PLAN_CACHE snapshots the plan cache every few minutes, and multiple executions within one snapshot window collapse to one observation. Frequency rankings (top tables, top users) remain accurate; absolute totals are conservative. Also, STATEMENT_STRING is truncated at the HANA-side sql_text_length parameter (default 5000 chars), so extremely long statements may parse partially.

Troubleshooting

[89018] _SYS_REPO.ACTIVE_OBJECT not found

The tenant does not have SAP HANA XS-classic repository content. Either disable calc-view extraction (include_calculation_views: false) or migrate to a tenant that has the repository deployed.

[258] insufficient privilege on SYS.PROCEDURES or _SYS_REPO.ACTIVE_OBJECT

Grant SELECT on the relevant system view to the ingestion user. The connector logs a warning and continues with the rest of the extraction path; failures here never abort ingestion.

Calc view column lineage missing

  1. Verify the view is activated (visible in _SYS_BIC). Unactivated design-time objects are skipped.
  2. Check the ingestion logs for Failed to parse calculation view — that points at a parse failure (the source XML may be malformed, or it may be a SqlScriptView where column-level lineage is unsupported).
  3. For SqlScriptView views, confirm the body uses fully-qualified, double-quoted references (FROM "SCHEMA"."TABLE"); HANA SQLScript table variables (T_FREQ = SELECT …) are intentionally skipped.

hdbcli import error

ImportError: dlopen(...) ... incompatible architecture

You are running an aarch64 Python interpreter. Switch to an x86_64 interpreter (Rosetta or an x86_64 container).

[258] insufficient privilege against _SYS_STATISTICS.HOST_SQL_PLAN_CACHE

Grant the MONITORING role (or CATALOG READ system privilege) to the ingestion user. The connector logs a warning and continues — usage extraction degrades to a no-op while the rest of metadata ingestion completes normally.

Usage extraction returns zero queries

  1. Confirm the statistics service is running (SELECT * FROM SYS.M_SERVICES WHERE SERVICE_NAME = 'statisticsserver'). SAP note 2147247 has full diagnostics.
  2. Confirm that _SYS_STATISTICS.HOST_SQL_PLAN_CACHE is populated (SELECT COUNT(*) FROM _SYS_STATISTICS.HOST_SQL_PLAN_CACHE). Newly-provisioned tenants take a few minutes to seed the first snapshot.
  3. Widen the time window — the default is the last full day in UTC. Set start_time: "-7 days" for a longer lookback.

Code Coordinates

  • Class Name: datahub.ingestion.source.sql.hana.hana.HanaSource
  • Browse on GitHub
Questions?

If you've got any questions on configuring ingestion for SAP HANA, feel free to ping us on our Slack.

💡 Contributing to this documentation

This page is auto-generated from the underlying source code. To make changes, please edit the relevant source files in the metadata-ingestion directory.

Tip: For quick typo fixes or documentation updates, you can click the ✏️ Edit icon directly in the GitHub UI to open a Pull Request. For larger changes and PR naming conventions, please refer to our Contributing Guide.