Outlining Objects in SAP Datasphere

Objective

After completing this lesson, you will be able to describe the use of objects in SAP Datasphere.

Objects in SAP Datasphere

SAP Datasphere offers various object types. Let's start with a high level overview of them and explore concepts like naming convention, impact and lineage analysis, versioning, release state and sharing of objects across spaces.

Object Types

The figure shows all objects in SAP Datasphere in a logical flow from source to consumption.

Using the Data Builder, you can define the following objects:

  • Local Table: Table for data persistence.

  • Remote Table: Table for virtual access of data.

  • Graphical view: Intuitive GUI for powerful and easy-to-use modeling for master data and transactional data artifacts.

  • SQL view: Powerful SQL editor for models based on SQL or SQL Script.

  • Entity relationship model: Import, visualize, edit, and deploy multiple data entities to better manage your modeling concept.

  • Analytic model: Define multi-dimensional models to provide the data foundation for analytical purposes (including predefined measures, hierarchies, filters, variables and associations).

  • Data flow: Load data from sources to SAP Datasphere with transformation logic.

  • Replication flow: Replicate data from sources in a fast and easy way when complex projections are not required.

  • Transformation flow: Load data from an SAP Datasphere object, apply transformations and output the result in a local table.

  • Intelligent lookup: Tool to support look ups to merge data from different entities when manual joins are not sufficient.

  • Task chain: Group multiple tasks and run them manually once, or periodically through a schedule.

  • Data access control: Set up row level security authorization.

Naming Objects

The figure shows examples of naming conventions, using source system, layer, version, artifact and semantics. Some examples are 1RF_T41_SALES_01 and 3DI_CIA_PRODATTR_01.

A naming convention can help to identify and separate the objects in SAP Datasphere or describe their purpose. The technical names are technically unique per space. In case it is required to have a harmonized naming across spaces, this will require some governance next to the system capabilities.

Another main aspect of naming conventions is an evolution of the model over time. People and responsibilities may change over time. Having a naming convention and adhering to that convention helps developers and users in the system, through having a purpose, an area, an origin or even the priority of a model as part of a naming convention. Anyone would as such be able to quickly understand an object and its purpose, if it can be reused or if it is allowed to be altered.

Note

Avoid the Prefix "SAP" for any object, as SAP delivered business content is using this prefix. SAP Datasphere does not provide the functionality to define name spaces.

General recommendations for naming rules in an organization:

  1. Unambiguous: Use clear, well defined descriptions. If in doubt, talk to your project’s information developer and check SAP terminology. The goal is that users understand immediately what the entity is used for.
  2. For descriptions and business names use blanks. Do not use underscores or camel case words.
  3. Avoid abbreviations as much as possible.

Impact and Lineage Analysis

The figure shows a screenshot of Impact and Lineage Analysis. In this case Dependency Analysis with Lineage starting from an Analytic Model.

Impact and Lineage Analysis is the go-to tool whenever you need to understand how data objects in SAP Datasphere relate to each other, either to trace where data comes from, or to see what would be affected by a change.

Lineage looks backward (upstream) and shows all the objects that feed the analysed object. This means source tables, remote tables, flows, intermediate views, and source systems.

Impact looks forward (downstream) and shows all the objects that depend on the analysed object. This means views that read from it, analytic models that use it, and SAP Analytics Cloud stories built on top of it.

Data Analysis is the default mode when you open the Impact and Lineage Analysis diagram. It focuses exclusively on the physical flow of data. It shows how data moves and is transformed from its source to its final consumer. By clicking on an object node, you can activate column-level lineage. The diagram then filters to show only the paths for those specific columns.

Dependency Analysis extends Data Analysis by adding two additional categories of relationship that are invisible in Data Analysis mode: associations and data access controls.

Versioning

Each time you deploy your object, a new version is created in the repository. You can review previous versions of an object at any time and choose to restore a previous version.

The figure shows a screeenshot of an object with different verions.

Object versioning allows you to review the history of changes to your objects and, for certain types of objects, to restore a previous version.

Note

No validation rules are applied and certain features, such as impact and lineage analysis and data preview are not supported.

Release State

The figure shows a screenshot of the release state of an object.

To encourage confidence in the stability of your views and to guarantee backward compatibility when they are updated, you can set their Release State to Released. Once a view is released, it must continue to provide the same output columns until it is replaced by a successor, at which point it can be deprecated and, eventually, decommissioned.

There are currently 4 states that an object in SAP Datasphere can be in:

Not released: The default state that a view is in. You can edit the object freely and consumers can you use the object without any guarantee of the object changing in the future.

Released: When a view is in the status "Released" it can only be edited in such a way that it will not break backwards compatibility. In practice, this means that the column output of a view is static, and only columns can be added, not removed.

Deprecated: A view can be set in the state "Deprecated" once a successor of that view is available in SAP Datasphere. While setting this state, the view asks for its successor view, which should be in a released state as well (otherwise you cannot select it).

Decommissioned: A view that is set to the state "Decommissioned" can be deleted from the system. Before you can set the state "Decommissioned", a view needs to be in the deprecated state for at least 1 year (and at least 2 years after it was released).

Note

Release states are an optional feature. By default, all views are set to "Not Released" and there is no obligation to release any view. Test thoughtfully if the entity is in its final state before releasing it.

You can only switch from "Released" to "Deprecated" and then to "Decommissioned". Only an administrator can reset an entity to "Not Released".

Sharing Objects Across Spaces

The figure shows the pop up in the Data Builder when you share an object.

To see models or data, users must be assigned to a space that contains these models. Therefore a suitable role must exist. By default, all business users, which are assigned to a given space, are able to consume all of its data. Your space is a secure area and its entities and other objects cannot be seen in other spaces unless you choose to share them. When you share an entity to another space, users in that space can use it as a source for their views and other objects.

In SAP Datasphere the following object types can be shared from one space to another:

  • Local table
  • Graphical view
  • SQL view
  • Analytic model
  • Task chain
  • Data access control

You only need access to the source space in order to start sharing. Sharing is a one-way reference. You cannot change the shared object from the target space, but you can create a view on top of it and remove, rename, or join fields in the view.

As a tricky alternative, you can export an object as a CSN (this is based on JSON) file and import it in another space, but then you must export and import all required objects with the same name.

When access to the model or data should no longer be available, you can unshare the object from selected target spaces. To share or unshare, you must work in the Data Builder in the source space. If you try to unshare an object that is used in the target space, you will get an error message with a list of objects that use it directly. For a full overview of dependencies, check the lineage and impact analysis. Only after a manual re-design of the upper-level objects, you then can unshare.

Impact and Lineage Analysis

In this demonstration, Impact and Lineage Analysis is used.

Semantics in SAP Datasphere

Semantics in SAP Datasphere refer to the enrichment of data models with meaningful, business-friendly information that goes beyond raw data. Rather than storing data without context, semantic enrichment allows the data model itself to describe what kind of information it provides. Let's explain semantic usage and semantic types in SAP Datasphere.

Semantic Usage for Tables and Views

The figure shows a screenshot of a remote table showing the options for semantic usage.

Semantic usage is an entity-level classification. When defining tables and views, you can use the following Semantic Usage :

  • Relational dataset: Contains columns with no specific analytical purpose.

  • Fact: To indicate that your entity contains one or more measures that can be analyzed.

  • Dimension (standard): To indicate that your entity contains attributes that are used to analyze and categorize measures defined in other entities.

  • Dimension (fiscal time): To model your fiscal time periods with dedicated semantics, validations and settings.

  • Text: To indicate that your entity contains strings with language identifiers to translate text attributes.

  • Hierarchy: Contains attributes defining a parent-child hierarchy.

  • Hierarchy with directory: Contains one or more parent-child hierarchies.

  • Analytical dataset (deprecated): Is deprecated and it's recommended that you use the semantic usage fact instead.

Semantic Types for Columns

The figure shows a screenshot of a remote table showing semantic types for columns.

Semantic type is a column level classification.

Semantic types identify the specific meaning of each column, such as whether it contains a monetary amount, a unit of measure, a currency code, a date, or geo data. This ensures that data is correctly interpreted and processed, for example, preventing the incorrect aggregation of amounts across different currencies.

Semantic types enable consuming clients and analytic tools to display and process columns in the appropriate format. For instance, defining a column as a date semantic type allows a front-end application to format the value with separators rather than displaying it as a plain string. Similarly, associating a measure with a currency code or unit of measure attribute ensures that reports show the correct unit or currency alongside the value.

For objects with semantic usage fact, dimension, or text, you can use the following semantic types:

  • Amount and quantity measures:
    • Amount with Currency: Specifies that the measure contains a monetary amount. You should additionally select an attribute with the semantic type Currency Code in the Unit Column

    • Quantity with Unit: Specifies that the measure contains a quantity of some kind. You should additionally select an attribute with the semantic type Unit of Measure in the Unit Column.

  • Currency code and unit of measure attributes:
    • Currency Code: A currency code: either an ISO code or an SAP currency code (data type CUKY).

    • Unit of Measure: A unit of measure.

  • Language and text attributes:
    • Language: A language code.

    • Text: A human-readable text that is not necessarily language-dependent.

  • Business date attributes:
    • Business Date - At: A key date.

    • Business Date - From: The date that marks the beginning of the period.

    • Business Date - To: The date that marks the end of the period.

  • Calendar and system date attributes:
    • Calendar - Day of Month: A day number relative to a calendar month. The number must be in the range 1 - 31.

    • Calendar - Day of Year: A day number relative to a calendar year. The number must be in the range 1 - 366.

    • Calendar - Halfyear: A calendar halfyear number as a string following the logical pattern H (single digit).

    • Calendar - Month: A calendar month number as a string following the logical pattern MM (two digits).

    • Calendar - Quarter: A calendar quarter number as a string following the logical pattern Q (single digit).

    • Calendar - Week: A calendar week number as a string following the logical pattern WW (two digits).

    • Calendar - Year: A year number as a string following the logical pattern (-?)YYYY(Y*).

    • Calendar - Year Halfyear: A calendar halfyear number as a string following the logical pattern (-?)YYYY(Y*)H.

    • Calendar - Year Month: A calendar year and month as a string.

    • System Date - Created at: A timestamp for when the database record was created.

    • System Date - Last changed at: A timestamp for when the database record was last changed.

  • Fiscal time attributes:
    • Fiscal - Year: A fiscal year number as a string consisting of four digits in the form YYYY.

    • Fiscal - Period: A fiscal period as a string consisting of three digits in the form PPP. The fiscal period can represent a quarter, a month, a week, a day, or any other portion of a fiscal year.

    • Fiscal - Year Period: A fiscal year and period as a string consisting of seven digits in the form YYYYPPP.

    • Fiscal - Year Variant: A fiscal year variant identifier, used to identify all periods in the given variant, typically consisting of two characters in the form VV.

    • Fiscal - Quarter: A fiscal quarter number as a string consisting of one digit in the form Q.

    • Fiscal - Year Quarter: A fiscal year quarter number as a string consisting of five digits in the form YYYYQ.

    • Fiscal - Year Week: A fiscal year week number as a string consisting of six digits in the form YYYYWW.

    Note

    These fiscal semantic types are only applicable to entities with a semantic usage of dimension (fiscal time).
  • Geolocation attributes:
    • Geolocation - Cartoid: A geographical point.

    • Geolocation - Latitude: A latitude value for a city or other geographical point.

    • Geolocation - Longitude: A longitude value for a city or other geographical point.

    • Geolocation - Normalized Name: A readable name for a city or other geographical point.

  • Image URL: A URL pointing to an image file. It's only available for attributes within objects with semantic usage dimension.