You are on page 1of 19

Week 1: Data Modeling

Unit 1: Modeling Fundamentals


Introduction
openSAP course overview

Weeks 1 through 5
Video 1 Self-test 1
▪ 7 video units and self-tests after each unit
Week 1 Video 2 Self-test 2
▪ 1 weekly assignment
Data Modeling Video n Self-test n
▪ Online discussion forum (collaborate, ask questions)
Weekly assignment
▪ ~4-5 hours of effort each week
▪ Optional: hands-on exercises Week 2 Story Creation

Week 6 Week 3 Story Creation and Analysis


▪ Final exam
Week 4 Augmented Analytics
Record of achievement
▪ Collect at least 50% of the total points available in all online Week 5 SAP Analytics Cloud, Analytics Designer

tests during the course


Week 6 Final exam

PUBLIC

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Modeling fundamentals
Overview

A model is a structured representation of any


given quantifiable dataset.

Models are made of:


▪ Ordinal data (dimensions)
▪ Cardinal data (measures and accounts)
▪ Data transformations

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Modeling fundamentals
Dimensions

Groups of related ordinal data values are called dimensions.

Individual values are called dimension members.

In a data table, dimensions are often grouped together in a column with the dimension name as the
column name and the individual row values as members.

Dimensions may contain additional information (such as text/key pairs).

Activity Date
Dimension: Activity Dimension: Date
Walk 2020.6.15
Members: Members: Individual Dates
Walk ▪ Walk 2020.5.7
Bike ▪ Bike 2020.5.21

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Modeling fundamentals
Dimension types

SAP Analytics Cloud has four categories of dimensions:


Date
Accounts
2020.6.15
▪ Special dimension for handling cardinal data in some planning Date Dimension
models 2020.5.7
2020.5.21
Dates
▪ Very common in business-related data
▪ Require quite a bit of special logic and handling Activity
Walk
Geographic Generic Dimension
Walk
▪ Very common in business-related data
Bike
▪ Require quite a bit of special logic and handling

Generic
▪ Anything else
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5
Modeling fundamentals
Public and private dimensions
Manager Region Headcount
Bob North 10
In SAP Analytics Cloud, dimensions can be public Sally South 20
or private. Jane East 15
Public Dimensions
▪ Reusable in many data models Region
▪ Used for very complex dimensions or widely used North
dimensions Private South
▪ For example: East
− Product hierarchies West
− Sales regions
▪ Maintained as separate artifacts
Product Region Sold
Private Dimensions Hats North 500
▪ Unique to a given model Coats North 200
▪ Maintained within the context of that model Coats South 400
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6
Modeling fundamentals
Measures and accounts
Date Cones Sold
2001.5 50
Cardinal values are values where mathematical 2001.6 200
operations give meaningful results. 2001.7 500
These operations can be performed on aggregates. 2001.8 600
▪ For example, the daily sales of ice cream can be 2001.9 250
averaged or summed over a 2001.10 40
– Week
– Month Date Cones Sold
– Quarter
2001.Q2 250
– Year
2001.Q3 1350
2001.Q4 40

Date Cones Sold


2001 1640
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7
Modeling fundamentals
Measures and accounts

Groups of related cardinal data values can be Count Distance


lumped into measures or accounts. 10 50
Measures
▪ A measure groups these values into a single, 8 47
cohesive group, normally into its own column in a
5 134
table
▪ An account uses a dimension to group the values
Account Value
Count 10
Distance 50
Accounts
Count 8
Distance 47
Count 5
Distance 134

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Modeling fundamentals
Example: measures and accounts

Measure
model
Month Activity Count Distance
2020.6 Walk 10 50
Measure
2020.5 Walk 8 47 values
2020.5 Bike 5 134
Account

Dimensions Measures Month Activity Account Value


2020.6 Walk Count 10
2020.6 Walk Distance 50
2020.5 Walk Count 8
Same Data 2020.5 Walk Distance 47
Account 2020.5 Bike Count 5
model 2020.5 Bike Distance 134
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9
Modeling fundamentals
Model structure

Many data models use a so-called star


schema structure.

There is a central fact table, called a data


foundation in SAP Analytics Cloud.
▪ Measures are stored in the fact table
▪ Data in the fact table is not normal, in SQL
speak

Dimensions are stored in their own tables


▪ Dimension data is normalized

There is a primary-key, foreign-key


relationship between fact table dimension
columns and the dimension tables.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Modeling fundamentals
Data transformations

Unstructured data needs to have structure added Day Month Year


in order to use it in a model. Fifth January 21
7th 1 Twenty Twenty-One
Structured data may be compatible as is, or may
21 01 2021
need to be tweaked or modified.

The process of transforming raw data into the


desired structure is called data wrangling.
Date
In SAP Analytics Cloud, any given combination of 2021.1.5
a raw data source and a wrangled transformation
2021.1.7
is known as an import job.
2021.1.21

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Modeling fundamentals
Data transformations

There are two strategies in SAP Analytics Cloud for loading and consuming raw data:

Extract, Transform, Load (ETL)


▪ Raw data is transformed and then stored in the transformed format
▪ Used where repeatable, consistent data structures are needed (such as in planning, operational analytics)
▪ Star schema-based models use ETL for acquiring data
▪ Data from disparate sources can be transformed and loaded into the same data model with ease
▪ Data is transformed once, when initially loaded

Extract, Load, Transform (ELT)


▪ Data is stored in its raw format
▪ Transformed with each use
▪ Fixed to a single data source
▪ Used where analytic and design flexibility is prized over enterprise

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Modeling fundamentals
ETL vs ELT

Data transformed before


being stored in model
Data SAC Runtime
Source Storage View

ETL

ELT

Data stored raw and


transformed when consumed
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13
Modeling fundamentals
Model creation strategies

There are two broad approaches to creating data models:


Structure First
▪ Star schema is built first
▪ Data loaded later
▪ Uses an ETL transformation strategy
▪ The structure of the model can be custom built for its use case
▪ Used in planning and operational analytics

Data First
▪ Model is built to work with specific data
▪ Model structure is created via wrangling
▪ Can use either ETL or ELT transformation strategies
▪ Used for quick, ad-hoc analytics
▪ Can sometimes be used for planning and operational analytics
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14
Modeling fundamentals
Model types in SAP Analytics Cloud

There are three types of models in SAP Analytics Cloud:

New Model Classic Account Model


▪ Structure first or data first ▪ Structure first or data first
▪ Uses ETL import workflow ▪ Uses ETL import workflow
▪ Supports both accounts and measures ▪ Accounts only
▪ Primarily planning-centric

Dataset SAP Analytics Cloud can also


▪ Data first only delegate model management:
▪ Uses ELT import workflow ▪ SAP HANA
▪ Measures only ▪ SAP Business Warehouse
▪ Primarily used for ad-hoc analytics ▪ SAP Data Warehouse Cloud

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Modeling fundamentals
Demo

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


Modeling fundamentals
Resources

▪ Help Documentation: Models

▪ Videos: Modeling Playlist

▪ User Community: Data Modeling and Wrangling

▪ User Community: Ask Questions on Data Modeling

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2021 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/trademark for additional trademark information and notices.

You might also like