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 Concept | DataHub Entity (Subtype) | Notes |
|---|---|---|
| Tenant database | Platform Instance | Top-level scope; all URNs include the configured platform instance. |
| Schema | Container (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 View | Dataset (VIEW) | Standard SQL views; the view definition is captured for lineage. |
| Calculation View | Dataset (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 View | Dataset (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 / field | SchemaField | Native type, nullability, and (for calc views) comments are extracted. |
| Table- and column-level lineage | Lineage edges | Extracted from view definitions and calc-view XML; column-level lineage flows through the SqlParsingAggregator like Snowflake / Redshift. |
| Query history / usage | DatasetUsageStatistics + Operations + query-derived lineage | Opt-in via include_query_usage. Mines _SYS_STATISTICS.HOST_SQL_PLAN_CACHE (requires the statistics service and the MONITORING role). |
Module hana
Important Capabilities
| Capability | Status | Notes |
|---|---|---|
| Asset Containers | ✅ | Enabled by default. Supported for types - Database, Schema. |
| Classification | ✅ | Optionally enabled via classification.enabled. |
| Column-level Lineage | ✅ | Enabled by default to get lineage for views via include_view_column_lineage. Supported for types - View. |
| Data Profiling | ✅ | Optionally enabled via configuration. |
| Dataset Usage | ✅ | Optionally enabled via include_query_usage (queries) and include_usage_stats (rollup) — mines _SYS_STATISTICS.HOST_SQL_PLAN_CACHE. |
| Descriptions | ✅ | Enabled by default. |
| Detect Deleted Entities | ✅ | Enabled by default via stateful ingestion. |
| Domains | ✅ | Supported via the domain config field. |
| Operation Capture | ✅ | Derived from observed queries when include_operational_stats and include_query_usage are enabled. |
| Platform Instance | ✅ | Enabled by default. |
| Schema Metadata | ✅ | Enabled by default. |
| Table-Level Lineage | ✅ | Enabled by default to get lineage for views via include_view_lineage. Supported for types - View. |
| Test Connection | ✅ | Enabled 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: trueto pull activated calculation views from_SYS_REPO.ACTIVE_OBJECTand parse column-level lineage from their XML definitions. Filter the set withcalculation_view_pattern(matched against<package_id>.<view_name>); the inheritedview_patternfilters regular SQL views and does not apply here. - Stored Procedures — enabled by default via
include_stored_procedures: true. Each procedure becomes aDataJobgrouped under a per-schemaDataFlow; lineage is parsed from the procedure body. - Query Usage — set
include_query_usage: trueto mine_SYS_STATISTICS.HOST_SQL_PLAN_CACHEfor observed queries and feed them through the SQL parsing aggregator. Combine withinclude_usage_stats: trueforDatasetUsageStatisticsrollups andinclude_operational_stats: truefor read operations.
Deployment compatibility
Most features work on every supported HANA tenant, but calculation-view extraction is on-premise / self-managed only:
| Capability | SAP 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:
hdbcliships precompiled wheels forx86_64only. Onaarch64/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
| Capability | Required grants | Notes |
|---|---|---|
| Tables, regular views, schema reflection | SELECT on each ingested schema | Grant 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_PARAMETERS | Stored-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_BIC | On-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 privilege | Both 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 1 | Profiling 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
- Options
- Schema
Note that a . is used to denote nested fields in the YAML recipe.
| Field | Description |
|---|---|
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.allowarray | List of regex patterns to include in ingestion Default: ['.*'] |
domain. key.allow.stringstring | |
domain. key.ignoreCaseOne of boolean, null | Whether to ignore case sensitivity during pattern matching. Default: True |
domain. key.denyarray | List of regex patterns to exclude from ingestion. Default: [] |
domain. key.deny.stringstring | |
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 |
The JSONSchema for this configuration is inlined below.
{
"$defs": {
"AllowDenyPattern": {
"additionalProperties": false,
"description": "A class to store allow deny regexes",
"properties": {
"allow": {
"default": [
".*"
],
"description": "List of regex patterns to include in ingestion",
"items": {
"type": "string"
},
"title": "Allow",
"type": "array"
},
"deny": {
"default": [],
"description": "List of regex patterns to exclude from ingestion.",
"items": {
"type": "string"
},
"title": "Deny",
"type": "array"
},
"ignoreCase": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": true,
"description": "Whether to ignore case sensitivity during pattern matching.",
"title": "Ignorecase"
}
},
"title": "AllowDenyPattern",
"type": "object"
},
"BucketDuration": {
"enum": [
"DAY",
"HOUR"
],
"title": "BucketDuration",
"type": "string"
},
"ClassificationConfig": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": false,
"description": "Whether classification should be used to auto-detect glossary terms",
"title": "Enabled",
"type": "boolean"
},
"sample_size": {
"default": 100,
"description": "Number of sample values used for classification.",
"title": "Sample Size",
"type": "integer"
},
"max_workers": {
"default": 4,
"description": "Number of worker processes to use for classification. Set to 1 to disable.",
"title": "Max Workers",
"type": "integer"
},
"table_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns to filter tables for classification. This is used in combination with other patterns in parent config. Specify regex to match the entire table name in `database.schema.table` format. e.g. to match all tables starting with customer in Customer database and public schema, use the regex 'Customer.public.customer.*'"
},
"column_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns to filter columns for classification. This is used in combination with other patterns in parent config. Specify regex to match the column name in `database.schema.table.column` format."
},
"info_type_to_term": {
"additionalProperties": {
"type": "string"
},
"default": {},
"description": "Optional mapping to provide glossary term identifier for info type",
"title": "Info Type To Term",
"type": "object"
},
"classifiers": {
"default": [
{
"type": "datahub",
"config": null
}
],
"description": "Classifiers to use to auto-detect glossary terms. If more than one classifier, infotype predictions from the classifier defined later in sequence take precedance.",
"items": {
"$ref": "#/$defs/DynamicTypedClassifierConfig"
},
"title": "Classifiers",
"type": "array"
}
},
"title": "ClassificationConfig",
"type": "object"
},
"DynamicTypedClassifierConfig": {
"additionalProperties": false,
"properties": {
"type": {
"description": "The type of the classifier to use. For DataHub, use `datahub`",
"title": "Type",
"type": "string"
},
"config": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"description": "The configuration required for initializing the classifier. If not specified, uses defaults for classifer type.",
"title": "Config"
}
},
"required": [
"type"
],
"title": "DynamicTypedClassifierConfig",
"type": "object"
},
"GEProfilingConfig": {
"additionalProperties": false,
"properties": {
"method": {
"default": "sqlalchemy",
"description": "Profiling method to use. `sqlalchemy` (default) runs profiling queries directly against your source's existing SQLAlchemy connection. `ge` selects the legacy Great Expectations profiler, which is deprecated and requires `pip install 'acryl-datahub[profiling-ge]'`.",
"enum": [
"ge",
"sqlalchemy"
],
"title": "Method",
"type": "string"
},
"enabled": {
"default": false,
"description": "Whether profiling should be done.",
"title": "Enabled",
"type": "boolean"
},
"operation_config": {
"$ref": "#/$defs/OperationConfig",
"description": "Experimental feature. To specify operation configs."
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Max number of documents to profile. By default, profiles all documents.",
"title": "Limit"
},
"offset": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Offset in documents to profile. By default, uses no offset.",
"title": "Offset"
},
"profile_table_level_only": {
"default": false,
"description": "Whether to perform profiling at table-level only, or include column-level profiling as well.",
"title": "Profile Table Level Only",
"type": "boolean"
},
"include_field_null_count": {
"default": true,
"description": "Whether to profile for the number of nulls for each column.",
"title": "Include Field Null Count",
"type": "boolean"
},
"include_field_distinct_count": {
"default": true,
"description": "Whether to profile for the number of distinct values for each column.",
"title": "Include Field Distinct Count",
"type": "boolean"
},
"include_field_min_value": {
"default": true,
"description": "Whether to profile for the min value of numeric columns.",
"title": "Include Field Min Value",
"type": "boolean"
},
"include_field_max_value": {
"default": true,
"description": "Whether to profile for the max value of numeric columns.",
"title": "Include Field Max Value",
"type": "boolean"
},
"include_field_mean_value": {
"default": true,
"description": "Whether to profile for the mean value of numeric columns.",
"title": "Include Field Mean Value",
"type": "boolean"
},
"include_field_median_value": {
"default": true,
"description": "Whether to profile for the median value of numeric columns.",
"title": "Include Field Median Value",
"type": "boolean"
},
"include_field_stddev_value": {
"default": true,
"description": "Whether to profile for the standard deviation of numeric columns.",
"title": "Include Field Stddev Value",
"type": "boolean"
},
"include_field_quantiles": {
"default": false,
"description": "Whether to profile for the quantiles of numeric columns.",
"title": "Include Field Quantiles",
"type": "boolean"
},
"include_field_distinct_value_frequencies": {
"default": false,
"description": "Whether to profile for distinct value frequencies.",
"title": "Include Field Distinct Value Frequencies",
"type": "boolean"
},
"include_field_histogram": {
"default": false,
"description": "Whether to profile for the histogram for numeric fields.",
"title": "Include Field Histogram",
"type": "boolean"
},
"include_field_sample_values": {
"default": true,
"description": "Whether to profile for the sample values for all columns.",
"title": "Include Field Sample Values",
"type": "boolean"
},
"max_workers": {
"default": 20,
"description": "Number of worker threads to use for profiling. Set to 1 to disable.",
"title": "Max Workers",
"type": "integer"
},
"report_dropped_profiles": {
"default": false,
"description": "Whether to report datasets or dataset columns which were not profiled. Set to `True` for debugging purposes.",
"title": "Report Dropped Profiles",
"type": "boolean"
},
"turn_off_expensive_profiling_metrics": {
"default": false,
"description": "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.",
"title": "Turn Off Expensive Profiling Metrics",
"type": "boolean"
},
"field_sample_values_limit": {
"default": 20,
"description": "Upper limit for number of sample values to collect for all columns.",
"title": "Field Sample Values Limit",
"type": "integer"
},
"max_number_of_fields_to_profile": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "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.",
"title": "Max Number Of Fields To Profile"
},
"profile_if_updated_since_days": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "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`.",
"schema_extra": {
"supported_sources": [
"snowflake",
"bigquery"
]
},
"title": "Profile If Updated Since Days"
},
"profile_table_size_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 5,
"description": "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.",
"schema_extra": {
"supported_sources": [
"snowflake",
"bigquery",
"unity-catalog",
"oracle"
]
},
"title": "Profile Table Size Limit"
},
"profile_table_row_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 5000000,
"description": "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.",
"schema_extra": {
"supported_sources": [
"snowflake",
"bigquery",
"oracle"
]
},
"title": "Profile Table Row Limit"
},
"profile_table_row_count_estimate_only": {
"default": false,
"description": "Use an approximate query for row count. This will be much faster but slightly less accurate. Only supported for Postgres and MySQL. ",
"schema_extra": {
"supported_sources": [
"postgres",
"mysql"
]
},
"title": "Profile Table Row Count Estimate Only",
"type": "boolean"
},
"query_combiner_enabled": {
"default": true,
"description": "*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.",
"title": "Query Combiner Enabled",
"type": "boolean"
},
"catch_exceptions": {
"default": true,
"description": "",
"title": "Catch Exceptions",
"type": "boolean"
},
"partition_profiling_enabled": {
"default": true,
"description": "Whether to profile partitioned tables. Only BigQuery and Aws Athena supports this. If enabled, latest partition data is used for profiling.",
"schema_extra": {
"supported_sources": [
"athena",
"bigquery"
]
},
"title": "Partition Profiling Enabled",
"type": "boolean"
},
"partition_datetime": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If specified, profile only the partition which matches this datetime. If not specified, profile the latest partition. Only Bigquery supports this.",
"schema_extra": {
"supported_sources": [
"bigquery"
]
},
"title": "Partition Datetime"
},
"use_sampling": {
"default": true,
"description": "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. ",
"schema_extra": {
"supported_sources": [
"bigquery",
"snowflake"
]
},
"title": "Use Sampling",
"type": "boolean"
},
"sample_size": {
"default": 10000,
"description": "Number of rows to be sampled from table for column level profiling.Applicable only if `use_sampling` is set to True.",
"schema_extra": {
"supported_sources": [
"bigquery",
"snowflake"
]
},
"title": "Sample Size",
"type": "integer"
},
"profile_external_tables": {
"default": false,
"description": "Whether to profile external tables. Only Snowflake and Redshift supports this.",
"schema_extra": {
"supported_sources": [
"redshift",
"snowflake"
]
},
"title": "Profile External Tables",
"type": "boolean"
},
"tags_to_ignore_sampling": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Fixed list of tags to ignore sampling. If not specified, tables will be sampled based on `use_sampling`.",
"title": "Tags To Ignore Sampling"
},
"profile_nested_fields": {
"default": false,
"description": "Whether to profile complex types like structs, arrays and maps. ",
"title": "Profile Nested Fields",
"type": "boolean"
}
},
"title": "GEProfilingConfig",
"type": "object"
},
"OperationConfig": {
"additionalProperties": false,
"properties": {
"lower_freq_profile_enabled": {
"default": false,
"description": "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.",
"title": "Lower Freq Profile Enabled",
"type": "boolean"
},
"profile_day_of_week": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "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.",
"title": "Profile Day Of Week"
},
"profile_date_of_month": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number between 1 to 31 for date of month (both inclusive). If not specified, defaults to Nothing and this field does not take affect.",
"title": "Profile Date Of Month"
}
},
"title": "OperationConfig",
"type": "object"
},
"StatefulStaleMetadataRemovalConfig": {
"additionalProperties": false,
"description": "Base specialized config for Stateful Ingestion with stale metadata removal capability.",
"properties": {
"enabled": {
"default": false,
"description": "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",
"title": "Enabled",
"type": "boolean"
},
"remove_stale_metadata": {
"default": true,
"description": "Soft-deletes the entities present in the last successful run but missing in the current run with stateful_ingestion enabled.",
"title": "Remove Stale Metadata",
"type": "boolean"
},
"fail_safe_threshold": {
"default": 75.0,
"description": "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'.",
"maximum": 100.0,
"minimum": 0.0,
"title": "Fail Safe Threshold",
"type": "number"
}
},
"title": "StatefulStaleMetadataRemovalConfig",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"bucket_duration": {
"$ref": "#/$defs/BucketDuration",
"default": "DAY",
"description": "Size of the time window to aggregate usage stats."
},
"end_time": {
"description": "Latest date of lineage/usage to consider. Default: Current time in UTC",
"format": "date-time",
"title": "End Time",
"type": "string"
},
"start_time": {
"default": null,
"description": "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'.",
"format": "date-time",
"title": "Start Time",
"type": "string"
},
"top_n_queries": {
"default": 10,
"description": "Number of top queries to save to each table.",
"exclusiveMinimum": 0,
"title": "Top N Queries",
"type": "integer"
},
"user_email_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "regex patterns for user emails to filter in usage."
},
"include_operational_stats": {
"default": true,
"description": "Whether to display operational stats.",
"title": "Include Operational Stats",
"type": "boolean"
},
"include_read_operational_stats": {
"default": false,
"description": "Whether to report read operational stats. Experimental.",
"title": "Include Read Operational Stats",
"type": "boolean"
},
"format_sql_queries": {
"default": false,
"description": "Whether to format sql queries",
"title": "Format Sql Queries",
"type": "boolean"
},
"include_top_n_queries": {
"default": true,
"description": "Whether to ingest the top_n_queries.",
"title": "Include Top N Queries",
"type": "boolean"
},
"schema_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [
"^SYS$",
"^_SYS_AUDIT$",
"^_SYS_BI$",
"^_SYS_BIC_CDS$",
"^_SYS_DATA_ANONYMIZATION$",
"^_SYS_EPM$",
"^_SYS_PLAN_STABILITY$",
"^_SYS_REPO$",
"^_SYS_RT$",
"^_SYS_SECURITY$",
"^_SYS_SQL_ANALYZER$",
"^_SYS_STATISTICS$",
"^_SYS_TASK$",
"^_SYS_TELEMETRY$",
"^_SYS_WORKLOAD_REPLAY$",
"^_SYS_XS$",
"^HANA_XS_BASE$"
],
"ignoreCase": true
},
"description": "Regex patterns for schemas to filter in ingestion. SAP-managed `_SYS_*` schemas (except `_SYS_BIC`) are denied by default."
},
"table_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns for tables to filter in ingestion. Specify regex to match the entire table name in database.schema.table format. e.g. to match all tables starting with customer in Customer database and public schema, use the regex 'Customer.public.customer.*'"
},
"view_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns for views to filter in ingestion. Note: Defaults to table_pattern if not specified. Specify regex to match the entire view name in database.schema.view format. e.g. to match all views starting with customer in Customer database and public schema, use the regex 'Customer.public.customer.*'"
},
"classification": {
"$ref": "#/$defs/ClassificationConfig",
"default": {
"enabled": false,
"sample_size": 100,
"max_workers": 4,
"table_pattern": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"column_pattern": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"info_type_to_term": {},
"classifiers": [
{
"config": null,
"type": "datahub"
}
]
},
"description": "For details, refer to [Classification](../../../../metadata-ingestion/docs/dev_guides/classification.md)."
},
"incremental_lineage": {
"default": false,
"description": "When enabled, emits lineage as incremental to existing lineage already in DataHub. When disabled, re-states lineage on each run.",
"title": "Incremental Lineage",
"type": "boolean"
},
"convert_urns_to_lowercase": {
"default": false,
"description": "Whether to convert dataset urns to lowercase.",
"title": "Convert Urns To Lowercase",
"type": "boolean"
},
"env": {
"default": "PROD",
"description": "The environment that all assets produced by this connector belong to",
"title": "Env",
"type": "string"
},
"platform_instance": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "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.",
"title": "Platform Instance"
},
"stateful_ingestion": {
"anyOf": [
{
"$ref": "#/$defs/StatefulStaleMetadataRemovalConfig"
},
{
"type": "null"
}
],
"default": null
},
"options": {
"additionalProperties": true,
"description": "Any options specified here will be passed to [SQLAlchemy.create_engine](https://docs.sqlalchemy.org/en/14/core/engines.html#sqlalchemy.create_engine) as kwargs. To set connection arguments in the URL, specify them under `connect_args`.",
"title": "Options",
"type": "object"
},
"profile_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns to filter tables (or specific columns) for profiling during ingestion. Note that only tables allowed by the `table_pattern` will be considered."
},
"domain": {
"additionalProperties": {
"$ref": "#/$defs/AllowDenyPattern"
},
"default": {},
"description": "Attach domains to databases, schemas or tables during ingestion using regex patterns. Domain key can be a guid like *urn:li:domain:ec428203-ce86-4db3-985d-5a8ee6df32ba* or a string like \"Marketing\".) If you provide strings, then datahub will attempt to resolve this name to a guid, and will error out if this fails. There can be multiple domain keys specified.",
"title": "Domain",
"type": "object"
},
"include_views": {
"default": true,
"description": "Whether views should be ingested.",
"title": "Include Views",
"type": "boolean"
},
"include_tables": {
"default": true,
"description": "Whether tables should be ingested.",
"title": "Include Tables",
"type": "boolean"
},
"include_table_location_lineage": {
"default": true,
"description": "If the source supports it, include table lineage to the underlying storage location.",
"title": "Include Table Location Lineage",
"type": "boolean"
},
"include_view_lineage": {
"default": true,
"description": "Populates view->view and table->view lineage using DataHub's sql parser.",
"title": "Include View Lineage",
"type": "boolean"
},
"include_view_column_lineage": {
"default": true,
"description": "Populates column-level lineage for view->view and table->view lineage using DataHub's sql parser. Requires `include_view_lineage` to be enabled.",
"title": "Include View Column Lineage",
"type": "boolean"
},
"use_file_backed_cache": {
"default": true,
"description": "Whether to use a file backed cache for the view definitions.",
"title": "Use File Backed Cache",
"type": "boolean"
},
"profiling": {
"$ref": "#/$defs/GEProfilingConfig",
"default": {
"method": "sqlalchemy",
"enabled": false,
"operation_config": {
"lower_freq_profile_enabled": false,
"profile_date_of_month": null,
"profile_day_of_week": null
},
"limit": null,
"offset": null,
"profile_table_level_only": false,
"include_field_null_count": true,
"include_field_distinct_count": true,
"include_field_min_value": true,
"include_field_max_value": true,
"include_field_mean_value": true,
"include_field_median_value": true,
"include_field_stddev_value": true,
"include_field_quantiles": false,
"include_field_distinct_value_frequencies": false,
"include_field_histogram": false,
"include_field_sample_values": true,
"max_workers": 20,
"report_dropped_profiles": false,
"turn_off_expensive_profiling_metrics": false,
"field_sample_values_limit": 20,
"max_number_of_fields_to_profile": null,
"profile_if_updated_since_days": null,
"profile_table_size_limit": 5,
"profile_table_row_limit": 5000000,
"profile_table_row_count_estimate_only": false,
"query_combiner_enabled": true,
"catch_exceptions": true,
"partition_profiling_enabled": true,
"partition_datetime": null,
"use_sampling": true,
"sample_size": 10000,
"profile_external_tables": false,
"tags_to_ignore_sampling": null,
"profile_nested_fields": false
}
},
"username": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "username",
"title": "Username"
},
"password": {
"anyOf": [
{
"format": "password",
"type": "string",
"writeOnly": true
},
{
"type": "null"
}
],
"default": null,
"description": "password",
"title": "Password"
},
"host_port": {
"default": "localhost:39041",
"description": "SAP HANA host and port, e.g. `myhost.example.com:30015`. HANA Cloud requires TLS \u2014 pass `encrypt=true` via `options.connect_args` if the driver does not enable it.",
"title": "Host Port",
"type": "string"
},
"database": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "database (catalog)",
"title": "Database"
},
"sqlalchemy_uri": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "URI of database to connect to. See https://docs.sqlalchemy.org/en/14/core/engines.html#database-urls. Takes precedence over other connection parameters.",
"title": "Sqlalchemy Uri"
},
"include_calculation_views": {
"default": false,
"description": "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.",
"title": "Include Calculation Views",
"type": "boolean"
},
"calculation_view_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns matched against `<package_id>.<view_name>` (e.g. `acme.analytics.SalesOverview`) to filter calculation views. Use this instead of `view_pattern` for calculation views."
},
"include_stored_procedures": {
"default": true,
"description": "If true, ingest stored procedures as `DataJob` entities with table-level lineage parsed from their bodies.",
"title": "Include Stored Procedures",
"type": "boolean"
},
"procedure_pattern": {
"$ref": "#/$defs/AllowDenyPattern",
"default": {
"allow": [
".*"
],
"deny": [],
"ignoreCase": true
},
"description": "Regex patterns matched against `<schema>.<procedure_name>` to filter stored procedures."
},
"include_query_usage": {
"default": false,
"description": "If true, mine query history from `_SYS_STATISTICS.HOST_SQL_PLAN_CACHE`. Requires the `MONITORING` role or `CATALOG READ` system privilege.",
"title": "Include Query Usage",
"type": "boolean"
},
"include_usage_stats": {
"default": false,
"description": "If true, emit `DatasetUsageStatistics` aspects. Requires `include_query_usage` and the same `MONITORING` / `CATALOG READ` privilege.",
"title": "Include Usage Stats",
"type": "boolean"
},
"usage_max_queries": {
"default": 10000,
"description": "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.",
"exclusiveMinimum": 0,
"title": "Usage Max Queries",
"type": "integer"
}
},
"title": "HanaConfig",
"type": "object"
}
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 VIEWdefinition via theSqlParsingAggregatorand thepostgressqlglot 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 handlesProjectionView,JoinView,AggregationView,UnionView,RankView, andSqlScriptViewnodes. ForSqlScriptView(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'sDataJobas input/output datasets. - Observed queries (
include_query_usage: true) — query history from_SYS_STATISTICS.HOST_SQL_PLAN_CACHEis fed to the aggregator asObservedQueryentries. 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 (withinclude_usage_stats: true)DatasetUsageStatisticsrollups bucketed bybucket_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 (
SYSand any_SYS_*user) and monitoring traffic againstSYS/_SYS_*schemas are filtered out at the SQL layer. usage_max_queriescaps the number of distinct observations returned per ingestion run.bucket_duration,start_time, andend_timecome fromBaseUsageConfigand 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
hdbclidriver onaarch64/arm64— SAP does not shipaarch64wheels forhdbcli. Run ingestion under anx86_64interpreter on Apple Silicon and Graviton hosts.- Calculation views are on-premise / self-managed only —
include_calculation_views: truerequires 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
SqlScriptViewwhose body onlyCALLs another procedure has no parsableFROM/JOINreferences, so no table lineage is emitted for that view. The called procedure itself is still ingested (ifinclude_stored_proceduresis on) and reachable through procedure lineage. - SQLScript column-level lineage — column-level lineage from SQLScript bodies (calc-view
SqlScriptViewnodes 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_CACHEsnapshots 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_STRINGis truncated at the HANA-sidesql_text_lengthparameter (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
- Verify the view is activated (visible in
_SYS_BIC). Unactivated design-time objects are skipped. - 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 aSqlScriptViewwhere column-level lineage is unsupported). - For
SqlScriptViewviews, 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
- Confirm the statistics service is running (
SELECT * FROM SYS.M_SERVICES WHERE SERVICE_NAME = 'statisticsserver'). SAP note 2147247 has full diagnostics. - Confirm that
_SYS_STATISTICS.HOST_SQL_PLAN_CACHEis populated (SELECT COUNT(*) FROM _SYS_STATISTICS.HOST_SQL_PLAN_CACHE). Newly-provisioned tenants take a few minutes to seed the first snapshot. - 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
If you've got any questions on configuring ingestion for SAP HANA, feel free to ping us on our Slack.
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.