SAP Datasphere Lineage Connector

The SAP Datasphere Lineage Connector adds Datasphere's spaces, flows and analytic models to Bigeye lineage, from source-system tables through Datasphere views to analytic-model measures.

The SAP Datasphere Lineage Connector reads each space's design-time model through the Datasphere REST API and lays it over the SAP HANA source Bigeye already catalogs for the tenant. The SAP HANA source only sees the views a space exposes for consumption. This connector adds what lives in Datasphere's design-time repository:

  • Column lineage through SQL and graphical views, replication flows, transformation flows, data flows and analytic models.
  • Source systems. Remote tables and replication flows connect to the tables they read in other Bigeye sources, such as SQL Server.
  • Business context. Business names, semantic usage and measure details appear as catalog attributes on the SAP HANA tables and columns.
  • Analytic models, with their measures and dimensions traced back to source columns.

Tables and views stay SAP HANA catalog entries, so monitors and issues keep attaching to them. Spaces, connections, flows, task chains and analytic models appear in a SAP Datasphere custom repository.

The connector only reads from Datasphere. It runs with the Lineage Plus agent of the Agent CLI, on Docker deployments.


Prerequisites

In Bigeye

  • An SAP HANA source for the tenant. Connect the tenant's database as an SAP HANA source (see Connect SAP HANA), with a Datasphere database user that can read the spaces. Datasphere names each space's schema after the space ID, and the connector finds tables and views there. You can use one SAP HANA source per space, or one database user that reads several spaces. Without an SAP HANA source, every table and view appears as an Unexposed Object in the custom repository instead of linking to the catalog.
  • Sources for the systems behind remote tables (optional). To link remote tables and replication flows to the tables they read, catalog those systems in Bigeye too, for example SQL Server or Oracle.
  • An admin API key. The first run creates the SAP Datasphere integration and its node types, which needs a Bigeye admin. Later runs need Manage permission on connections in each workspace. The connector uses the API key the Agent CLI is configured with.
  • Catalog attributes. Business names and semantics are written as catalog attributes. The setting is on by default; if an admin turned it off, the connector skips them and logs a warning.

In SAP Datasphere

An administrator creates an OAuth client for the connector:

  1. In Datasphere, open System → Administration → App Integration.
  2. Under Configured Clients, select Add a New OAuth Client.
  3. Set Purpose to Technical User, and enter a User ID for it.
  4. Under Roles, assign a scoped role that includes every space to read. DW Scoped Viewer, or a copy of it, is enough: the connector only reads.
  5. Choose an Expiry Date. The default is 3 months.
  6. Click Add, then copy the OAuth Client ID, the Secret and the Token URL. The secret can't be shown again once you close the dialog.
🚧

Client expiry

When the OAuth client expires, runs fail at sign-in. Extending the expiry date in Datasphere generates a new secret; update the connection with ./bigeye-agent edit-connector -c sapdatasphere.

For more about these clients, see SAP's Create an OAuth2.0 Client with a Technical User Purpose.

Network access

The host running the Lineage Plus agent needs outbound HTTPS to:

  • The tenant, for example https://mytenant.eu10.hcs.cloud.sap
  • Its token URL, for example https://mytenant.authentication.eu10.hana.ondemand.com/oauth/token

Set up the connector

Add the connection with the Agent CLI:

./bigeye-agent add-connector -c sapdatasphere

add-connector asks for:

PromptWhat to enter
Datasphere tenant URLThe tenant's address without a path, such as https://mytenant.eu10.hcs.cloud.sap
OAuth client IDThe client ID from App Integration
OAuth client secretThe secret from App Integration. It can come from your secrets manager, like other connection passwords

The advanced settings are optional:

SettingWhat it does
OAuth token URLNeeded only for a custom domain. Left blank, it's built from the tenant URL as https://<tenant>.authentication.<region>.hana.ondemand.com/oauth/token
Spaces to include / excludeComma-separated space IDs. Blank reads every space the client can read
Datasphere connection to Bigeye source mapCONNECTION:SOURCE_ID pairs, such as MSSQL_PROD:12,MAXIMO:34, for remote tables the connector can't match on its own (see How remote tables are matched)
Bigeye SAP HANA source IDsThe SAP HANA sources that hold this tenant's spaces. Blank uses every SAP HANA source in the workspace

add-connector then signs in with the OAuth client and lists the spaces it can read.

📘

If the client can't list spaces

SAP doesn't list space listing among the commands a Technical User client can run. If add-connector reports that the client can't list spaces, run it again, choose the advanced settings and enter the spaces to read. The connector then checks and reads those spaces only.

Run the connector

The connector runs right after SAP HANA lineage, so the SAP HANA catalog it builds on is current:

# Runs SAP HANA lineage, then SAP Datasphere
./bigeye-agent lineage run -c saphana

# Runs SAP Datasphere on its own
./bigeye-agent lineage run -c sapdatasphere

A run whose result matches the last run sends nothing to Bigeye.

Each run keeps its output on the agent host, in lineage_config/output/sapdatasphere/sap_datasphere/<connection name>/:

  • snapshot/: the Datasphere definitions the run read. Attach it to support tickets.
  • coverage_report_ws<workspace ID>.json: objects, columns and measures that didn't get lineage, and why.

What appears in Bigeye

Custom repository

The SAP Datasphere repository holds:

Node typeWhat it is
Datasphere TenantThe tenant
SpaceA Datasphere space
ConnectionA Datasphere connection, such as SQL Server or S/4HANA
Source ObjectA table behind a remote table or replication flow that isn't cataloged in Bigeye
Replication Flow, Transformation Flow, Data FlowA flow, with Column children that carry its column lineage
Task ChainA task chain, with the tasks it runs listed as an attribute
Analytic ModelAn analytic model, with Measure and Dimension children
Unexposed ObjectA table or view with no SAP HANA catalog entry, with Column children

An Unexposed Object is replaced by the catalog entry once the SAP HANA source catalogs it.

Catalog attributes

On the SAP HANA tables and views:

AttributeExample
Datasphere Business NameSales Orders
Datasphere Semantic UsageFact, Dimension, Relational Dataset, Text
Datasphere Object TypeView (Graphical), View (SQL), Local Table, Remote Table
Datasphere Exposed for Consumptiontrue or false
Datasphere Data Access Controltrue when a data access control applies
Datasphere Remote Connection, Datasphere Remote EntityThe connection and source table of a remote table
Datasphere SpaceThe space ID

On their columns: Datasphere Business Name, Datasphere Semantics, Datasphere Measure (the aggregation) and Datasphere Key. The connector writes only these attributes and leaves every other attribute unchanged.

How remote tables are matched

A remote table or replication flow reads from a Datasphere connection. To link it to a Bigeye source, the connector looks for its schema and table on Bigeye sources of the connection's type:

Datasphere connection typeBigeye source type
Microsoft SQL Server, Azure SQLSQL Server, Synapse
OracleOracle
IBM DB2DB2
SAP HANASAP HANA
PostgreSQLPostgres
MySQLMySQL
Amazon RedshiftRedshift
Google BigQueryBigQuery
Amazon AthenaAthena

A table found on exactly one source is linked to it. When it's on several sources, or the connection is another type such as S/4HANA, the table appears as a Source Object under its Connection node. Map a connection to the right source with the connection map setting. The coverage report lists how each remote table was matched.


Limitations

  • Unreadable spaces. An object shared from a space the OAuth client can't read appears under that space with only the columns other objects use.
  • Task chains list the tasks they run, but aren't linked to them in lineage.
  • Data flows have column lineage only where a target has one input; other targets get table-level lineage.
  • Task-run status and replication health aren't read by this connector.
  • Edge ownership. Lineage this connector adds between two catalog entries replaces the same link from another lineage source, such as SAP HANA calculation-view lineage.
  • Kubernetes deployments of the Agent CLI aren't supported yet.

Troubleshooting

MessageWhat to do
token request failed with HTTP 401The client ID or secret is wrong, or the OAuth client expired. Check it under App Integration, then update the connection with edit-connector
This OAuth client can't list Datasphere spacesEnter the spaces to read in the advanced settings (see Set up the connector)
Skipped space <ID>The client's scoped role doesn't include the space. Add the space to the role
Could not read connections in space <ID>The client's role can't read the space's connections, so its remote tables aren't linked to Bigeye sources. Give the role read access to connections
Catalog attributes not writtenCatalog attributes are turned off in Bigeye, or the API key can't edit the SAP HANA source's catalog
Every table and view is an Unexposed ObjectNo SAP HANA source catalogs the spaces' schemas. Check the SAP HANA source and the SAP HANA source IDs setting

Did this page help you?