SlideShare a Scribd company logo
1 of 41
Download to read offline
[Accessing SAP HANA with the
semantic layer
Pierpaolo Vezzosi
Session 5001
Real Experience. Real Advantage.
[
2
Learning Points
Learn how to build a universe on top of SAP In-Memory
Appliance (SAP HANA™). Understand the benefits of
connecting to SAP HANA for your business intelligence (BI)
needs. Discover dos and dont's when building a universe on
HANA.
 Benefits of using SAP HANA for BI
 Best practices of universe definition on SAP HANA
 Step-by-step workflow for creating a universe on SAP HANA
Real Experience. Real Advantage.
[ Agenda
 What is SAP HANA
 Benefits of SAP HANA as a reporting data source
 SAP HANA basics for universe designers
 Building a universe on top of SAP HANA
 Best practices
 Q&A
3
Real Experience. Real Advantage.
[
SAP HANA:DEFINITION AND
BENEFITS
4
Real Experience. Real Advantage.
[ SAP HANA stands for?
SAP High-Performance Analytic Appliance
5
Real Experience. Real Advantage.
[ What is SAP HANA?
 SAP HANA is a flexible, multi-purpose, in-memory appliance
that combines SAP software components optimized on
hardware provided and delivered by SAP leading hardware
partners.
 In release 1.0, the appliance contains multiple integrated SAP
software components including:
 SAP In-Memory Computation Engine
 Real-time replication services
 Data modeling services
 Data services
6
Real Experience. Real Advantage.
[ Benefits of SAP HANA as a reporting data source
SAP HANA improves a BI project experience with:
 In-Memory storage and computations
 Columnar data storage
 Optimized calculation engines and languages
 Reporting on real-time data
7
Real Experience. Real Advantage.
[
SAP HANA BASICS FOR
UNIVERSE DESIGNERS
8
Real Experience. Real Advantage.
[ SAP HANA is a relational database
 Data in SAP HANA is stored in tables
 Row storage tables
 Column storage tables
 SAP HANA provides the usual relational
concepts
 Keys
 Indexes
 Etc.
 SAP HANA has a database management
tool called HANA Studio
9
Real Experience. Real Advantage.
[ SAP HANA tables: row store
10
Name City Revenue Cust_Type
John Orlando 100 12
Tim LasVegas 0 12
Ted Orlando 20
Dan Toronto 50 14
John Orlando 100 12
Tim LasVegas 0 12
Dan Orlando 20
Dan Toronto 50 14
Real Experience. Real Advantage.
[ SAP HANA tables: row store
11
Name City Revenue Cust_Type
John Orlando 100 12
Tim LasVegas 0 12
Ted Orlando 20
Dan Toronto 50 14
John
Tim
Ted
Dan
Orlando
LasVegas
Toronto
100
20
50
12
14
Real Experience. Real Advantage.
[ SAP HANA is more than a relational database
 On top of the columnar tables you can
build INFORMATION MODELS
Aka Column Views, Aka HANA Cubes
 Information models are business models
which describe a part of your business
 Three types of information models:
 Attribute views
 Analytical views
 Calculation views
 The models are developed with the
same HANA Studio tool
12
Real Experience. Real Advantage.
[ Attribute views – the dimensions
 Attribute views are a representation of a dimension
 Defined by joining all the tables of the dimension
 It can contain hierarchical information
 It can define calculated attributes
 Constraints as of SAP HANA 1.0 SP02
 Only equi-joins
13
Real Experience. Real Advantage.
[ Attribute view: example in HANA Studio
14
Real Experience. Real Advantage.
[ Analytical views – the single fact cubes
 Analytical views are a dimensional model made of
 Attributes (dimensions defined out of attribute views)
 Measures (facts defined out of a fact table)
 Calculated Attributes, calculated measures, restricted measures
 Analytical views can be consumed by
 SQL, MDX, SQL Script
 Constraints as of SAP HANA 1.0 SP02
 Single fact table
 Only equi-joins
 Any query on an Analytical view must contain a Group By or a
Select Distinct if no measures are used
15
Real Experience. Real Advantage.
[ Analytical views: example in HANA Studio
16
Real Experience. Real Advantage.
[ Calculation views – the complex cubes
 Calculation views are a dimensional model
 Putting together multiple fact tables or multiple Analytical views
 Defined either graphically or using SQL script
 SQL Script is a language which can contain:
 SQL functions
 CE functions – work in progress
 L/R scripts – work in progress
 Calculation views can be consumed by
 SQL, MDX, SQL Script
17
Real Experience. Real Advantage.
[ Calculation view: example (SQL Script) in HANA Studio
18
Real Experience. Real Advantage.
[ Calculation view: example (graphical output)
19
Real Experience. Real Advantage.
[ Summary
 The following consumption objects are available from SAP
HANA:
 Database catalog objects:
 Row tables
 Column tables
 Information models:
 Attribute views
 Analytical views
 Calculation views
 * plus other objects which are not relevant at this time for universe
designers such as stored procedures
20
Real Experience. Real Advantage.
[
BUILDING A UNIVERSE ON
SAP HANA
21
Real Experience. Real Advantage.
[ What maps to what
22
In SAP HANA In a universe
Relational objects Row table Table
Column table Table
Information models Attribute view Table
Analytical view Table
Calculation view Table
As simple as that!
Real Experience. Real Advantage.
[ Step by step procedure
 In the information design tool
 Create a new project or reuse an existing project
 Create a new connectivity to SAP HANA
 JDBC or ODBC
 Use JDBC if you want to access information models
 Create a new data foundation
 Drag and drop your tables
 Join tables to build your schema
 Caveats and tips on using information models as tables in the next
section!
 Create a new business layer
 Publish your universe
As simple as that!
23
Real Experience. Real Advantage.
[ Attribute views appearance
24
In HANA Studio
In IDT
Real Experience. Real Advantage.
[ Analitycal views appearance
25
In HANA Studio
In IDT
Real Experience. Real Advantage.
[ Calculation views appearance
26
In HANA Studio
In IDT
Real Experience. Real Advantage.
[
BEST PRACTICES, TIPS,
DONTS
27
Real Experience. Real Advantage.
[ Two questions to ask yourself
 Should I build my universe on
information models or on
tables?
28
 How to make sure my
universe on HANA has a good
performance?
Real Experience. Real Advantage.
[ Should I use HANA information models in my universe?
Some facts
 Information models are a business representation of your
data
 Information models are business models, they don’t
influence the performance of queries
 Analytical views have SQL constraints (i.e. always need a
GROUP BY or a SELECT DISTINCT to retrieve data)
 Calculation views might improve the performance of data
calculation and data retrieval when using SQL Script functions
making use of HANA specific low level calls
29
Real Experience. Real Advantage.
[ Should I use HANA information models in my universe?
Best practices
 You can, but you do not need to use information models
in universes: universes on tables and SQL views have an equal
performance (*exception with Calculation views using low level
calls in the SQL Script)
 If you use information models, they should not be joined to
anything else in the Data Foundation (joining different
constructs reduces the performance of the query as multiple
query engines are used)
 Use information models in universes if you want to make sure
the query syntax follows the constraints which guarantee an
execution of the SQL defined in HANA Studio
30
Real Experience. Real Advantage.
[ Should I use HANA information models in my universe?
Bottom line:
 Choosing to build universes on information models rather than
on tables is mainly a modeling decision, not a
performance decision.
31
Real Experience. Real Advantage.
[ Should I use HANA information models in my universe?
Bottom line:
32
Universes on top of a
single AnalyticalView
Universe on top of a
single Calculation view
Universe on top of
tables
Most modeling is done in
HANA Studio
Most modeling is done in
HANA studio
Modeling is done in the
information design tool
I want to reuse an existing
Analytical view
I want to reuse an existing
Calculation view
I want to build my universe
from scratch
The model definition is
more guided and
constrained in order to
guarantee performance
The model definition is
flexible with a programming
language approach.
The model definition is less
guided and constrained in
order to provide flexibility
Queries are guaranteed to
be optimized and
performing
Queries might trigger low
level function calls to the
HANA system for fast
processing
Queries are performing if
the SQL is well formed
(same performance than
information models on the
same SQL)
Real Experience. Real Advantage.
[ How to write a performing universe on SAP HANA
 Always prefer column store tables to row store tables for
retrieving data
 Do not mix column store tables with row store tables in a
query
 Avoid calculations in joins or filters or GROUP BY
 E.g. T1.“user_ID”+T1.”user_code”= T2.”user_global_id”
 E.g. group by T1.“user_ID”+T1.”user_code”
 E.g. where a*b=10
 Prefer defining table columns which already contain the
calculated values
33
Real Experience. Real Advantage.
[ How to write a performing universe on SAP HANA
 Avoid implicit type casting e.g.:
 (slow) where date_string < SYSDATE
 (fast) where date_string < TO_CHAR(SYSDATE, 'YYYYMMDD')
 Avoid, whenever possible, non-equi-joins
 Avoid using Exists and OR in the same filter
 Use Not Exists instead of Not In predicates
 Avoid Union, Intersect, Except predicates
 Usually those predicates are found in derived tables
 Prefer Coalesce rather than Union
 Except and Intersect can sometimes be substituted by
better filters
34
Real Experience. Real Advantage.
[ How to write a performing universe on SAP HANA?
 Fine tune the connection options for best performance
 Adapt the connection “Array fetch size” to the network and the
expected quantity of data to be retrieved (higher values provide a
faster data transfer, but increases the server memory
consumption)
 Add compulsory filters in the universe to decrease the quantity
of retrieved data
35
Real Experience. Real Advantage.
[ How to write a performing query on SAP HANA
REMEMBER: HANA’s value is to manipulate, aggregate,
filter large amount of data, not to transfer a large
amount of data to client tools
 Always retrieve the least possible quantity of data
 Retrieve aggregates, not details when possible
 Retrieve only the columns you need
 If you don’t ask for a column, HANA doesn’t fetch it at all
36
Real Experience. Real Advantage.
[ Summary
 Information models provide a more constrained query
experience but guarantee performance
 Universes provide a more versatile query experience but have
to be defined carefully to take into account all possible
optimizations
37
Real Experience. Real Advantage.
[
KEY LEARNINGS AND Q&A
38
Real Experience. Real Advantage.
[
39
Key Learnings
In this session we discussed about
 What is SAP HANA and what are its benefits for BI projects
 What are the main query objects available in SAP HANA
 How to build a universe on top of SAP HANA
 How to fine tune a universe on top of SAP HANA
Real Experience. Real Advantage.
[ Q&A
 My contact information
Pierpaolo Vezzosi
pierpaolo.vezzosi@sap.com
40
Real Experience. Real Advantage.
[
41
[
] Thank you for participating.
SESSION CODE: 5001
Please remember to complete and return your
evaluation form following this session.
For ongoing education on this area of focus, visit theYear-Round
Community page at www.asug.com/yrc

More Related Content

What's hot

8077811e 7637-2e10-7c9f-dcb81d630b5c
8077811e 7637-2e10-7c9f-dcb81d630b5c8077811e 7637-2e10-7c9f-dcb81d630b5c
8077811e 7637-2e10-7c9f-dcb81d630b5c
Yogeeswar Reddy
 
Sap business objects bobi training
Sap business objects bobi trainingSap business objects bobi training
Sap business objects bobi training
FuturePoint Technologies
 
Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1
Amit Sharma
 
XMPro PivotGrid
XMPro PivotGridXMPro PivotGrid
XMPro PivotGrid
XMPRO
 

What's hot (20)

Dax en
Dax enDax en
Dax en
 
Tableau - Learning Objectives for Data, Graphs, Filters, Dashboards and Advan...
Tableau - Learning Objectives for Data, Graphs, Filters, Dashboards and Advan...Tableau - Learning Objectives for Data, Graphs, Filters, Dashboards and Advan...
Tableau - Learning Objectives for Data, Graphs, Filters, Dashboards and Advan...
 
Sas visual-analytics-startup-guide
Sas visual-analytics-startup-guideSas visual-analytics-startup-guide
Sas visual-analytics-startup-guide
 
8077811e 7637-2e10-7c9f-dcb81d630b5c
8077811e 7637-2e10-7c9f-dcb81d630b5c8077811e 7637-2e10-7c9f-dcb81d630b5c
8077811e 7637-2e10-7c9f-dcb81d630b5c
 
SAP Crystal Reports & SAP HANA - Integration and Roadmap
SAP Crystal Reports & SAP HANA - Integration and RoadmapSAP Crystal Reports & SAP HANA - Integration and Roadmap
SAP Crystal Reports & SAP HANA - Integration and Roadmap
 
Tableau Customer Presentation
Tableau Customer PresentationTableau Customer Presentation
Tableau Customer Presentation
 
Explain the explain_plan
Explain the explain_planExplain the explain_plan
Explain the explain_plan
 
Data Visualization Tips for Oracle BICS and DVCS
Data Visualization Tips for Oracle BICS and DVCSData Visualization Tips for Oracle BICS and DVCS
Data Visualization Tips for Oracle BICS and DVCS
 
SAP HANA SPS10- SAP HANA Modeling
SAP HANA SPS10- SAP HANA ModelingSAP HANA SPS10- SAP HANA Modeling
SAP HANA SPS10- SAP HANA Modeling
 
HANA SPS07 Modeling Enhancements
HANA SPS07 Modeling EnhancementsHANA SPS07 Modeling Enhancements
HANA SPS07 Modeling Enhancements
 
Tableau Desktop Material
Tableau Desktop MaterialTableau Desktop Material
Tableau Desktop Material
 
Empowering Business Users: OBIEE 12c Visual Analyzer and Data Mashup
Empowering Business Users: OBIEE 12c Visual Analyzer and Data MashupEmpowering Business Users: OBIEE 12c Visual Analyzer and Data Mashup
Empowering Business Users: OBIEE 12c Visual Analyzer and Data Mashup
 
Introduction to oracle bi 12c
Introduction to oracle bi 12cIntroduction to oracle bi 12c
Introduction to oracle bi 12c
 
Crystal Report
Crystal ReportCrystal Report
Crystal Report
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
 
Sap business objects bobi training
Sap business objects bobi trainingSap business objects bobi training
Sap business objects bobi training
 
Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1
 
Write back functionality from various dashboard tools to sap hana
Write back functionality from various dashboard tools to sap hanaWrite back functionality from various dashboard tools to sap hana
Write back functionality from various dashboard tools to sap hana
 
SAP HANA SPS08 Modeling
SAP HANA SPS08 ModelingSAP HANA SPS08 Modeling
SAP HANA SPS08 Modeling
 
XMPro PivotGrid
XMPro PivotGridXMPro PivotGrid
XMPro PivotGrid
 

Viewers also liked (7)

Bassett/HGTV Decor Signage and Displays
Bassett/HGTV Decor Signage and DisplaysBassett/HGTV Decor Signage and Displays
Bassett/HGTV Decor Signage and Displays
 
Rastelli Market by Off The Wall
Rastelli Market by Off The WallRastelli Market by Off The Wall
Rastelli Market by Off The Wall
 
What a Georgia DUI Can Cost You
What a Georgia DUI Can Cost YouWhat a Georgia DUI Can Cost You
What a Georgia DUI Can Cost You
 
η πόλη των ιωαννίνων
η πόλη των ιωαννίνωνη πόλη των ιωαννίνων
η πόλη των ιωαννίνων
 
h2o+ POP
h2o+ POPh2o+ POP
h2o+ POP
 
Qualprez
QualprezQualprez
Qualprez
 
Kevin Glass Doctoral Qualifying Exam
Kevin Glass Doctoral Qualifying ExamKevin Glass Doctoral Qualifying Exam
Kevin Glass Doctoral Qualifying Exam
 

Similar to 5001 accessing sap_hana_with_the_semantic_layer

SBOC_DEMO_SHORT_SB EDITS
SBOC_DEMO_SHORT_SB EDITSSBOC_DEMO_SHORT_SB EDITS
SBOC_DEMO_SHORT_SB EDITS
Craig Tanguay
 
1310 success stories_and_lessons_learned_implementing_sap_hana_solutions
1310 success stories_and_lessons_learned_implementing_sap_hana_solutions1310 success stories_and_lessons_learned_implementing_sap_hana_solutions
1310 success stories_and_lessons_learned_implementing_sap_hana_solutions
Bobby Shah
 

Similar to 5001 accessing sap_hana_with_the_semantic_layer (20)

Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016
 
Sap hana
Sap hanaSap hana
Sap hana
 
Dashboard Factory - most efficient way to develop with SAP Design Studio
Dashboard Factory - most efficient way to develop with SAP Design Studio Dashboard Factory - most efficient way to develop with SAP Design Studio
Dashboard Factory - most efficient way to develop with SAP Design Studio
 
Combining SAS Office Analytics, SAS Visual Analytics, and SAS Studio.
Combining SAS Office Analytics, SAS Visual Analytics, and SAS Studio.Combining SAS Office Analytics, SAS Visual Analytics, and SAS Studio.
Combining SAS Office Analytics, SAS Visual Analytics, and SAS Studio.
 
SAP Hana Overview
SAP Hana OverviewSAP Hana Overview
SAP Hana Overview
 
Hana
HanaHana
Hana
 
Project report
Project reportProject report
Project report
 
DMM161 HANA_MODELING_2015
DMM161 HANA_MODELING_2015DMM161 HANA_MODELING_2015
DMM161 HANA_MODELING_2015
 
SBOC_DEMO_SHORT_SB EDITS
SBOC_DEMO_SHORT_SB EDITSSBOC_DEMO_SHORT_SB EDITS
SBOC_DEMO_SHORT_SB EDITS
 
BusinessObjects Cloud and How to Take Advantage of it for Your Planning Purposes
BusinessObjects Cloud and How to Take Advantage of it for Your Planning PurposesBusinessObjects Cloud and How to Take Advantage of it for Your Planning Purposes
BusinessObjects Cloud and How to Take Advantage of it for Your Planning Purposes
 
SAP BusinessObjects Cloud Demo
SAP BusinessObjects Cloud DemoSAP BusinessObjects Cloud Demo
SAP BusinessObjects Cloud Demo
 
Sap HANA Training doc
Sap HANA Training doc Sap HANA Training doc
Sap HANA Training doc
 
1310 success stories_and_lessons_learned_implementing_sap_hana_solutions
1310 success stories_and_lessons_learned_implementing_sap_hana_solutions1310 success stories_and_lessons_learned_implementing_sap_hana_solutions
1310 success stories_and_lessons_learned_implementing_sap_hana_solutions
 
SAP Business Objects - Lopes Supermarket
SAP   Business Objects - Lopes SupermarketSAP   Business Objects - Lopes Supermarket
SAP Business Objects - Lopes Supermarket
 
Tableau Visual analytics complete deck 2
Tableau Visual analytics complete deck 2Tableau Visual analytics complete deck 2
Tableau Visual analytics complete deck 2
 
Analance Advanced Analytics Infosheet
Analance Advanced Analytics InfosheetAnalance Advanced Analytics Infosheet
Analance Advanced Analytics Infosheet
 
Beginner’s guide to_sap_abap
Beginner’s guide to_sap_abapBeginner’s guide to_sap_abap
Beginner’s guide to_sap_abap
 
SAP ABAP
SAP ABAP SAP ABAP
SAP ABAP
 
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User GroupSeatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
Seatug Presentation (Excel to Data Viz culture) Seattle Tableau User Group
 
Power bi slide share pdf it is a very important
Power bi slide share pdf it is a very importantPower bi slide share pdf it is a very important
Power bi slide share pdf it is a very important
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

5001 accessing sap_hana_with_the_semantic_layer

  • 1. [Accessing SAP HANA with the semantic layer Pierpaolo Vezzosi Session 5001
  • 2. Real Experience. Real Advantage. [ 2 Learning Points Learn how to build a universe on top of SAP In-Memory Appliance (SAP HANA™). Understand the benefits of connecting to SAP HANA for your business intelligence (BI) needs. Discover dos and dont's when building a universe on HANA.  Benefits of using SAP HANA for BI  Best practices of universe definition on SAP HANA  Step-by-step workflow for creating a universe on SAP HANA
  • 3. Real Experience. Real Advantage. [ Agenda  What is SAP HANA  Benefits of SAP HANA as a reporting data source  SAP HANA basics for universe designers  Building a universe on top of SAP HANA  Best practices  Q&A 3
  • 4. Real Experience. Real Advantage. [ SAP HANA:DEFINITION AND BENEFITS 4
  • 5. Real Experience. Real Advantage. [ SAP HANA stands for? SAP High-Performance Analytic Appliance 5
  • 6. Real Experience. Real Advantage. [ What is SAP HANA?  SAP HANA is a flexible, multi-purpose, in-memory appliance that combines SAP software components optimized on hardware provided and delivered by SAP leading hardware partners.  In release 1.0, the appliance contains multiple integrated SAP software components including:  SAP In-Memory Computation Engine  Real-time replication services  Data modeling services  Data services 6
  • 7. Real Experience. Real Advantage. [ Benefits of SAP HANA as a reporting data source SAP HANA improves a BI project experience with:  In-Memory storage and computations  Columnar data storage  Optimized calculation engines and languages  Reporting on real-time data 7
  • 8. Real Experience. Real Advantage. [ SAP HANA BASICS FOR UNIVERSE DESIGNERS 8
  • 9. Real Experience. Real Advantage. [ SAP HANA is a relational database  Data in SAP HANA is stored in tables  Row storage tables  Column storage tables  SAP HANA provides the usual relational concepts  Keys  Indexes  Etc.  SAP HANA has a database management tool called HANA Studio 9
  • 10. Real Experience. Real Advantage. [ SAP HANA tables: row store 10 Name City Revenue Cust_Type John Orlando 100 12 Tim LasVegas 0 12 Ted Orlando 20 Dan Toronto 50 14 John Orlando 100 12 Tim LasVegas 0 12 Dan Orlando 20 Dan Toronto 50 14
  • 11. Real Experience. Real Advantage. [ SAP HANA tables: row store 11 Name City Revenue Cust_Type John Orlando 100 12 Tim LasVegas 0 12 Ted Orlando 20 Dan Toronto 50 14 John Tim Ted Dan Orlando LasVegas Toronto 100 20 50 12 14
  • 12. Real Experience. Real Advantage. [ SAP HANA is more than a relational database  On top of the columnar tables you can build INFORMATION MODELS Aka Column Views, Aka HANA Cubes  Information models are business models which describe a part of your business  Three types of information models:  Attribute views  Analytical views  Calculation views  The models are developed with the same HANA Studio tool 12
  • 13. Real Experience. Real Advantage. [ Attribute views – the dimensions  Attribute views are a representation of a dimension  Defined by joining all the tables of the dimension  It can contain hierarchical information  It can define calculated attributes  Constraints as of SAP HANA 1.0 SP02  Only equi-joins 13
  • 14. Real Experience. Real Advantage. [ Attribute view: example in HANA Studio 14
  • 15. Real Experience. Real Advantage. [ Analytical views – the single fact cubes  Analytical views are a dimensional model made of  Attributes (dimensions defined out of attribute views)  Measures (facts defined out of a fact table)  Calculated Attributes, calculated measures, restricted measures  Analytical views can be consumed by  SQL, MDX, SQL Script  Constraints as of SAP HANA 1.0 SP02  Single fact table  Only equi-joins  Any query on an Analytical view must contain a Group By or a Select Distinct if no measures are used 15
  • 16. Real Experience. Real Advantage. [ Analytical views: example in HANA Studio 16
  • 17. Real Experience. Real Advantage. [ Calculation views – the complex cubes  Calculation views are a dimensional model  Putting together multiple fact tables or multiple Analytical views  Defined either graphically or using SQL script  SQL Script is a language which can contain:  SQL functions  CE functions – work in progress  L/R scripts – work in progress  Calculation views can be consumed by  SQL, MDX, SQL Script 17
  • 18. Real Experience. Real Advantage. [ Calculation view: example (SQL Script) in HANA Studio 18
  • 19. Real Experience. Real Advantage. [ Calculation view: example (graphical output) 19
  • 20. Real Experience. Real Advantage. [ Summary  The following consumption objects are available from SAP HANA:  Database catalog objects:  Row tables  Column tables  Information models:  Attribute views  Analytical views  Calculation views  * plus other objects which are not relevant at this time for universe designers such as stored procedures 20
  • 21. Real Experience. Real Advantage. [ BUILDING A UNIVERSE ON SAP HANA 21
  • 22. Real Experience. Real Advantage. [ What maps to what 22 In SAP HANA In a universe Relational objects Row table Table Column table Table Information models Attribute view Table Analytical view Table Calculation view Table As simple as that!
  • 23. Real Experience. Real Advantage. [ Step by step procedure  In the information design tool  Create a new project or reuse an existing project  Create a new connectivity to SAP HANA  JDBC or ODBC  Use JDBC if you want to access information models  Create a new data foundation  Drag and drop your tables  Join tables to build your schema  Caveats and tips on using information models as tables in the next section!  Create a new business layer  Publish your universe As simple as that! 23
  • 24. Real Experience. Real Advantage. [ Attribute views appearance 24 In HANA Studio In IDT
  • 25. Real Experience. Real Advantage. [ Analitycal views appearance 25 In HANA Studio In IDT
  • 26. Real Experience. Real Advantage. [ Calculation views appearance 26 In HANA Studio In IDT
  • 27. Real Experience. Real Advantage. [ BEST PRACTICES, TIPS, DONTS 27
  • 28. Real Experience. Real Advantage. [ Two questions to ask yourself  Should I build my universe on information models or on tables? 28  How to make sure my universe on HANA has a good performance?
  • 29. Real Experience. Real Advantage. [ Should I use HANA information models in my universe? Some facts  Information models are a business representation of your data  Information models are business models, they don’t influence the performance of queries  Analytical views have SQL constraints (i.e. always need a GROUP BY or a SELECT DISTINCT to retrieve data)  Calculation views might improve the performance of data calculation and data retrieval when using SQL Script functions making use of HANA specific low level calls 29
  • 30. Real Experience. Real Advantage. [ Should I use HANA information models in my universe? Best practices  You can, but you do not need to use information models in universes: universes on tables and SQL views have an equal performance (*exception with Calculation views using low level calls in the SQL Script)  If you use information models, they should not be joined to anything else in the Data Foundation (joining different constructs reduces the performance of the query as multiple query engines are used)  Use information models in universes if you want to make sure the query syntax follows the constraints which guarantee an execution of the SQL defined in HANA Studio 30
  • 31. Real Experience. Real Advantage. [ Should I use HANA information models in my universe? Bottom line:  Choosing to build universes on information models rather than on tables is mainly a modeling decision, not a performance decision. 31
  • 32. Real Experience. Real Advantage. [ Should I use HANA information models in my universe? Bottom line: 32 Universes on top of a single AnalyticalView Universe on top of a single Calculation view Universe on top of tables Most modeling is done in HANA Studio Most modeling is done in HANA studio Modeling is done in the information design tool I want to reuse an existing Analytical view I want to reuse an existing Calculation view I want to build my universe from scratch The model definition is more guided and constrained in order to guarantee performance The model definition is flexible with a programming language approach. The model definition is less guided and constrained in order to provide flexibility Queries are guaranteed to be optimized and performing Queries might trigger low level function calls to the HANA system for fast processing Queries are performing if the SQL is well formed (same performance than information models on the same SQL)
  • 33. Real Experience. Real Advantage. [ How to write a performing universe on SAP HANA  Always prefer column store tables to row store tables for retrieving data  Do not mix column store tables with row store tables in a query  Avoid calculations in joins or filters or GROUP BY  E.g. T1.“user_ID”+T1.”user_code”= T2.”user_global_id”  E.g. group by T1.“user_ID”+T1.”user_code”  E.g. where a*b=10  Prefer defining table columns which already contain the calculated values 33
  • 34. Real Experience. Real Advantage. [ How to write a performing universe on SAP HANA  Avoid implicit type casting e.g.:  (slow) where date_string < SYSDATE  (fast) where date_string < TO_CHAR(SYSDATE, 'YYYYMMDD')  Avoid, whenever possible, non-equi-joins  Avoid using Exists and OR in the same filter  Use Not Exists instead of Not In predicates  Avoid Union, Intersect, Except predicates  Usually those predicates are found in derived tables  Prefer Coalesce rather than Union  Except and Intersect can sometimes be substituted by better filters 34
  • 35. Real Experience. Real Advantage. [ How to write a performing universe on SAP HANA?  Fine tune the connection options for best performance  Adapt the connection “Array fetch size” to the network and the expected quantity of data to be retrieved (higher values provide a faster data transfer, but increases the server memory consumption)  Add compulsory filters in the universe to decrease the quantity of retrieved data 35
  • 36. Real Experience. Real Advantage. [ How to write a performing query on SAP HANA REMEMBER: HANA’s value is to manipulate, aggregate, filter large amount of data, not to transfer a large amount of data to client tools  Always retrieve the least possible quantity of data  Retrieve aggregates, not details when possible  Retrieve only the columns you need  If you don’t ask for a column, HANA doesn’t fetch it at all 36
  • 37. Real Experience. Real Advantage. [ Summary  Information models provide a more constrained query experience but guarantee performance  Universes provide a more versatile query experience but have to be defined carefully to take into account all possible optimizations 37
  • 38. Real Experience. Real Advantage. [ KEY LEARNINGS AND Q&A 38
  • 39. Real Experience. Real Advantage. [ 39 Key Learnings In this session we discussed about  What is SAP HANA and what are its benefits for BI projects  What are the main query objects available in SAP HANA  How to build a universe on top of SAP HANA  How to fine tune a universe on top of SAP HANA
  • 40. Real Experience. Real Advantage. [ Q&A  My contact information Pierpaolo Vezzosi pierpaolo.vezzosi@sap.com 40
  • 41. Real Experience. Real Advantage. [ 41 [ ] Thank you for participating. SESSION CODE: 5001 Please remember to complete and return your evaluation form following this session. For ongoing education on this area of focus, visit theYear-Round Community page at www.asug.com/yrc