Skip to main content

SAP Analytics Cloud

Overview

SAP Analytics Cloud is a business intelligence and analytics platform. Learn more in the official SAP Analytics Cloud documentation.

The DataHub integration for SAP Analytics Cloud covers BI entities such as dashboards, charts, datasets, and related ownership context. It also captures table-level lineage and stateful deletion detection.

Concept Mapping

SAP Analytics CloudDataHub
StoryDashboard
ApplicationDashboard
Live Data ModelDataset
Import Data ModelDataset
ModelDataset

Module sac

Beta

Important Capabilities

CapabilityStatusNotes
DescriptionsEnabled by default.
Detect Deleted EntitiesEnabled by default via stateful ingestion.
Platform InstanceEnabled by default.
Schema MetadataEnabled by default for Import Data Models; acquired Data Models are opt-in via ingest_acquired_data_model_schema_metadata.
Table-Level LineageEnabled by default (only for Live Data Models).

Overview

The sac module ingests metadata from SAP Analytics Cloud (SAC) into DataHub. It is intended for production ingestion workflows and module-specific capabilities are documented below.

Prerequisites

Before running ingestion, ensure network connectivity to the source, valid authentication credentials, and read permissions for metadata APIs required by this module.

  1. Refer to Manage OAuth Clients to create an OAuth client in SAP Analytics Cloud. The OAuth client is required to have the following properties:

    • Purpose: API Access
    • Access:
      • Story Listing
      • Data Import Service
      • Data Export Service (only required when the opt-in ingest_acquired_data_model_schema_metadata is enabled - the schema of acquired Data Models is then read via the Data Export Service)
    • Authorization Grant: Client Credentials
  2. Maintain connection mappings (optional):

To map individual connections in SAP Analytics Cloud to platforms, platform instances and environments, the connection_mapping configuration can be used within the recipe:

connection_mapping:
MY_BW_CONNECTION:
platform: bw
platform_instance: PROD_BW
env: PROD
MY_HANA_CONNECTION:
platform: hana
platform_instance: PROD_HANA
env: PROD

The key in the connection mapping dictionary represents the name of the connection created in SAP Analytics Cloud.

Install the Plugin

pip install 'acryl-datahub[sac]'

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: sac
config:
stateful_ingestion:
enabled: true

tenant_url: # Your SAP Analytics Cloud tenant URL, e.g. https://company.eu10.sapanalytics.cloud or https://company.eu10.hcs.cloud.sap
token_url: # The Token URL of your SAP Analytics Cloud tenant, e.g. https://company.eu10.hana.ondemand.com/oauth/token.

# Add secret in Secrets Tab with relevant names for each variable
client_id: "${SAC_CLIENT_ID}" # Your SAP Analytics Cloud client id
client_secret: "${SAC_CLIENT_SECRET}" # Your SAP Analytics Cloud client secret

# ingest stories
ingest_stories: true

# ingest applications
ingest_applications: true

resource_id_pattern:
allow:
- .*

resource_name_pattern:
allow:
- .*

folder_pattern:
allow:
- .*

connection_mapping:
MY_BW_CONNECTION:
platform: bw
platform_instance: PROD_BW
env: PROD
MY_HANA_CONNECTION:
platform: hana
platform_instance: PROD_HANA
env: PROD
# SAP Datasphere (DWC) connection: SAC does not expose the Datasphere space,
# so set it here to build the upstream sap-datasphere lineage (<space>.<model_name>).
MY_DATASPHERE_CONNECTION:
datasphere_space: my_space
# platform_instance / env / convert_urns_to_lowercase must match how the
# SAP Datasphere connector ingested the assets so the urns stitch.
env: PROD
convert_urns_to_lowercase: true

Config Details

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

FieldDescription
client_id 
string
Client ID for the OAuth authentication
client_secret 
string(password)
Client secret for the OAuth authentication
tenant_url 
string
URL of the SAP Analytics Cloud tenant
token_url 
string
URL of the OAuth token endpoint of the SAP Analytics Cloud tenant
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
ingest_acquired_data_model_schema_metadata
boolean
Controls whether schema metadata of acquired (non-import) Data Models is ingested via the Data Export Service. Live Data Models keep their schema in the source system and are skipped. Ingesting this schema adds one metadata request per acquired model. Requires the 'Data Export Service' access grant on the SAC OAuth client (see Prerequisites).
Default: False
ingest_applications
boolean
Controls whether Analytic Applications should be ingested
Default: True
ingest_import_data_model_schema_metadata
boolean
Controls whether schema metadata of Import Data Models should be ingested (ingesting schema metadata of Import Data Models significantly increases overall ingestion time)
Default: True
ingest_stories
boolean
Controls whether Stories should be ingested
Default: True
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
query_name_template
One of string, null
Template for generating dataset urns of consumed queries, the placeholder {query} can be used within the template for inserting the name of the query
Default: QUERY/{name}
resolve_datasphere_lineage
boolean
For SAC Live Data Models backed by SAP Datasphere (Data Warehouse Cloud / 'DWC' connections), emit upstream lineage to the backing SAP Datasphere dataset. The Datasphere object's technical name is derived from the SAC model name; the Datasphere space is not exposed by SAC and must be supplied via connection_mapping.<connection_id>.datasphere_space. The upstream urn is built deterministically (<space>.<model_name>) with no DataHub graph lookup. Models on connections without a configured datasphere_space are skipped with a warning.
Default: True
env
string
The environment that all assets produced by this connector belong to
Default: PROD
connection_mapping
map(str,ConnectionMappingConfig)
connection_mapping.key.env
string
The environment that this connection mapping belongs to
Default: PROD
connection_mapping.key.convert_urns_to_lowercase
boolean
Whether to lower-case identifiers when constructing the upstream dataset urn for this connection. Must match the convert_urns_to_lowercase setting used by the corresponding upstream connector recipe so the urns stitch. Currently applied to SAP Datasphere ('DWC') upstreams only; BW/HANA upstreams preserve case as before. Defaults to True (matching the SAP Datasphere connector default).
Default: True
connection_mapping.key.datasphere_space
One of string, null
For SAP Datasphere ('DWC') connections only: the Datasphere space id that backs this connection (e.g. bdap_sac). SAC does not expose the space for Datasphere-backed live models, so it must be supplied here to build the upstream sap-datasphere dataset urn (<space>.<model_name>). Leave unset for non-Datasphere connections.
Default: None
connection_mapping.key.platform
One of string, null
The platform that this connection mapping belongs to
Default: None
connection_mapping.key.platform_instance
One of string, null
The instance of the platform that this connection mapping belongs to
Default: None
folder_pattern
AllowDenyPattern
A class to store allow deny regexes.

Patterns are matched against the start of the string only, not the entire
string - a pattern does not need to match to the end to be considered a match.
For example, the pattern "prod" matches "prod", "prod_east", and "production".
To require an exact match, anchor your pattern explicitly, e.g. "^prod$".
folder_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
resource_id_pattern
AllowDenyPattern
A class to store allow deny regexes.

Patterns are matched against the start of the string only, not the entire
string - a pattern does not need to match to the end to be considered a match.
For example, the pattern "prod" matches "prod", "prod_east", and "production".
To require an exact match, anchor your pattern explicitly, e.g. "^prod$".
resource_id_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
resource_name_pattern
AllowDenyPattern
A class to store allow deny regexes.

Patterns are matched against the start of the string only, not the entire
string - a pattern does not need to match to the end to be considered a match.
For example, the pattern "prod" matches "prod", "prod_east", and "production".
To require an exact match, anchor your pattern explicitly, e.g. "^prod$".
resource_name_pattern.ignoreCase
One of boolean, null
Whether to ignore case sensitivity during pattern matching.
Default: True
stateful_ingestion
One of StatefulStaleMetadataRemovalConfig, null
Stateful ingestion related configs
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 and whether additional configuration is required.

Limitations

  • Only models which are used in a Story or an Application will be ingested because there is no dedicated API to retrieve models (only for Stories and Applications).
  • Browse Paths for models cannot be created because the folder where the models are saved is not returned by the API.
  • Schema metadata is ingested for Import Data Models by default. For acquired (SAC-stored) models it can additionally be ingested via the Data Export Service $metadata document by enabling the opt-in ingest_acquired_data_model_schema_metadata flag (off by default; requires the "Data Export Service" OAuth grant). Live Data Models (e.g. BW/HANA/DWC) keep their schema in the source system, so it cannot be retrieved from SAC.
  • Lineages for Import Data Models cannot be ingested because the API is not providing any information about it.
  • SAP BW, SAP HANA, and SAP Datasphere (Data Warehouse Cloud / DWC connections) are supported for ingesting the upstream lineages of Live Data Models - a warning is logged for all other connection types, please feel free to open an issue on GitHub with the warning message to have this fixed.
  • For SAP Datasphere-backed Live Data Models, SAC exposes the underlying object's name but not its Datasphere space. Configure the space per connection via connection_mapping.<connection_id>.datasphere_space so the upstream sap-datasphere dataset urn (<space>.<model_name>) can be built. Set connection_mapping.<connection_id>.convert_urns_to_lowercase (default true) to match the casing used by your SAP Datasphere connector recipe. Models on connections without a configured datasphere_space are skipped with a warning (or set resolve_datasphere_lineage: false to disable this entirely).
  • For some models (e.g., builtin models) it cannot be detected whether the models are Live Data or Import Data Models. Therefore, these models will be ingested only with the Story subtype.

Limitations

Module behavior is constrained by source APIs, permissions, and metadata exposed by the platform. Refer to capability notes for unsupported or conditional features.

Troubleshooting

If ingestion fails, validate credentials, permissions, connectivity, and scope filters first. Then review ingestion logs for source-specific errors and adjust configuration accordingly.

Compatibility across tenant generations

The connector reads stories, applications, and models from the Resources OData data endpoints (for example api/v1/Resources) directly, rather than discovering them from the tenant's $metadata document. This keeps ingestion working across SAP Analytics Cloud tenant generations: newer (CAP-based) tenants no longer describe the Resources entity set in $metadata (it is replaced there by a non-queryable RESOURCES_INDEX catalog), but the Resources data endpoints remain available and are what the connector uses.

Code Coordinates

  • Class Name: datahub.ingestion.source.sac.sac.SACSource
  • Browse on GitHub
Questions?

If you've got any questions on configuring ingestion for SAP Analytics Cloud, 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.