Analytic Views: Einsatzgebiete im Data Warehouse. Dani Schnider, Trivadis AG DOAG Konferenz, 21. November 2017

Similar documents
Analytic Views: Use Cases in Data Warehouse. Dani Schnider, Trivadis AG DOAG Conference, 21 November 2017

Partitionierungsstrategien für Data Vault. Dani Schnider, Trivadis AG DOAG Konferenz, 23. November 2017

Data Vault Partitioning Strategies. Dani Schnider, Trivadis AG DOAG Conference, 23 November 2017

1 25/07/2017 Big-Data- and Data-Science-Day 2017

Exadata with In-Memory Option the best of all?!?

Welcome. Oracle SOA Suite meets Java The best of both worlds. Guido Schmutz DOAG Konferenz 2013 Nürnberg,

Exadata Resource Management. teile und herrsche!

Oracle In-Memory & Data Warehouse: The Perfect Combination?

WebLogic JMS System Best Practices

Sonnenstrahlen am Wolkenhimmel Oracle in der Infrastruktur Cloud

Die Wundertüte DBMS_STATS: Überraschungen in der Praxis

Pitfalls & Surprises with DBMS_STATS: How to Solve Them

GoldenGate. How to start such a project? Mathias Zarick Nuremberg, Nov. 17 th 2015

Continuous Integration im Umfeld der Oracle SOA Suite 11g

Empfehlungen vom BigData Admin

REALTIME WEB APPLICATIONS WITH ORACLE APEX

Query Optimizer MySQL vs. PostgreSQL

Oracle Database New Performance Features

Bloom Filters DOAG Webinar, 12 August 2016 Christian Antognini Senior Principal Consultant

Service discovery in Kubernetes with Fabric8

Best Practices for Testing SOA Suite 11g based systems

Query Optimizer MySQL vs. PostgreSQL

Upload, Model, Analyze, and Report

Exploring Oracle Database 11g/12c Partitioning New Features and Best Practices. Ami Aharonovich Oracle ACE & OCP

Scripting OBIEE Is UDML and XML all you need?

Oracle 12.2 Analytic Views:

Cognos also provides you an option to export the report in XML or PDF format or you can view the reports in XML format.

Appendix B: Table Descriptions

Business Analytics in the Oracle 12.2 Database: Analytic Views. Event: BIWA 2017 Presenter: Dan Vlamis and Cathye Pendley Date: January 31, 2017

Exadata Database Machine Resource Management teile und herrsche!

Cloud Acceleration. Performance comparison of Cloud vendors. Tobias Deml DOAG2017

Call: SAS BI Course Content:35-40hours

How Autonomous is the Oracle Autonomous Data Warehouse?

Create Cube From Star Schema Grouping Framework Manager

Designing for Performance: Database Related Worst Practices ITOUG Tech Day, 11 November 2016, Milano (I) Christian Antognini

Edition-Based Redefinition

Oracle Database 11g: Data Warehousing Fundamentals

Aggregating Knowledge in a Data Warehouse and Multidimensional Analysis

CRI Event-Driven BI. Peter Welkenbach Principal Consultant Trivadis GmbH. Düsseldorf,

Analytic views in Oracle 12.2

WELCOME. Unterstützung von Tuning- Maßnahmen mit Hilfe von Capacity Management. DOAG SIG Database

SSAS 2008 Tutorial: Understanding Analysis Services

Microservices with Kafka Ecosystem. Guido Schmutz

Integration of Oracle BI EE and Oracle Analytic Workspaces

Top 24 Obiee Interview Questions & Answers

Identifying Performance Problems in a Multitenant Environment

ETL TESTING TRAINING

Decision Guidance. Data Vault in Data Warehousing

Application Containers an Introduction

Integration of Oracle VM 3 in Enterprise Manager 12c

Apache Tamaya Configuring your Containers...

SAP CERTIFIED APPLICATION ASSOCIATE - SAP HANA 2.0 (SPS01)

CON Apache Kafka

Key Data Warehousing Features in Oracle10g: A Comparative Performance Analysis. An Oracle White Paper April 2005

Oracle Audit in a Nutshell - Database Audit but how?

Proceedings of the IE 2014 International Conference AGILE DATA MODELS

Data Warehouse and Data Mining

Adaptive

PrepAwayExam. High-efficient Exam Materials are the best high pass-rate Exam Dumps

Techno Expert Solutions An institute for specialized studies!

Database Sharding with Oracle RDBMS

Oracle Database Failover Cluster with Grid Infrastructure 11g Release 2

CHERRY GSP TEAM

Backup Methods from Practice

Oracle Database 18c New Performance Features

Oracle BI 11g R1: Build Repositories

Big Data Infrastructure The Oracle Way. Daniel Steiger

InfoSphere Warehouse V9.5 Exam.

Fast Complex BI Analysis with Oracle OLAP. Oracle OpenWorld 2011

DEEP DIVE. Leave IT Alone: The Vast Value of Self-Service. #DMRadio

Analytic Workspace Manager and Oracle OLAP 10g. An Oracle White Paper November 2004

Teradata Aggregate Designer

IBM KM423G - IBM INFOSPHERE DATASTAGE V ADVANCED DATA PROCESSING

ITdumpsFree. Get free valid exam dumps and pass your exam test with confidence

Oracle Hyperion Financial Management Instructor-led Live Online Training Program

Hyperion Interactive Reporting Reports & Dashboards Essentials

Database Rolling Upgrade with Transient Logical Standby Database DOAG Day High Availability Robert Bialek Principal Consultant

SAS Data Integration Studio 3.3. User s Guide

Domain Services Clusters Centralized Management & Storage for an Oracle Cluster Environment Markus Flechtner

DSS Performance in Oracle Database 10g Release 2. An Oracle White Paper July 2005

A Road Map for Advancing Your Career

Fast Complex BI Analysis with Oracle OLAP. NEOOUG September 16, 2011

Big Data Big Mess? Ein Versuch einer Positionierung

Data Warehouse and Data Mining

COGNOS DYNAMIC CUBES: SET TO RETIRE TRANSFORMER? Update: Pros & Cons

Dallas Marks - Session 5010

Oracle BI 12c: Build Repositories

Oracle 1Z0-515 Exam Questions & Answers

Oracle Access Management

MICROSOFT BUSINESS INTELLIGENCE (MSBI: SSIS, SSRS and SSAS)

Instant Data Warehousing with SAP data

Application Containers an Introduction

Course Contents: 1 Datastage Online Training

Guide to Managing Common Metadata

Safe Harbor Statement

Data Warehouses. Yanlei Diao. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Page 1. Oracle9i OLAP. Agenda. Mary Rehus Sales Consultant Patrick Larkin Vice President, Oracle Consulting. Oracle Corporation. Business Intelligence

Logical Design A logical design is conceptual and abstract. It is not necessary to deal with the physical implementation details at this stage.

Recovery without Backup. All Data Lost?

Pimping up Industry Devices with Rasperry Pi, Vert.x und Java 8

Transcription:

Analytic Views: Einsatzgebiete im Data Warehouse Dani Schnider, Trivadis AG DOAG Konferenz, 21. November 2017 @dani_schnider DOAG2017

Unser Unternehmen. Trivadis ist führend bei der IT-Beratung, der Systemintegration, dem Solution Engineering und der Erbringung von IT-Services mit Fokussierung auf - und -Technologien in der Schweiz, Deutschland, Österreich und Dänemark. Trivadis erbringt ihre Leistungen aus den strategischen Geschäftsfeldern: B E T R I E B Trivadis Services übernimmt den korrespondierenden Betrieb Ihrer IT Systeme. 2 21.11.2017

Mit über 600 IT- und Fachexperten bei Ihnen vor Ort. KOPENHAGEN HAMBURG 14 Trivadis Niederlassungen mit über 600 Mitarbeitenden. Über 200 Service Level Agreements. Mehr als 4'000 Trainingsteilnehmer. DÜSSELDORF Forschungs- und Entwicklungsbudget: CHF 5.0 Mio. / EUR 4.0 Mio. FRANKFURT Finanziell unabhängig und nachhaltig profitabel. BASEL FREIBURG BRUGG ZÜRICH STUTTGART MÜNCHEN WIEN Erfahrung aus mehr als 1'900 Projekten pro Jahr bei über 800 Kunden. GENF BERN LAUSANNE 3 21.11.2017

Dani Schnider Working for Trivadis in Glattbrugg/Zurich Senior Principal Consultant Data Warehouse Lead Architect Trainer of several Courses Co-Author of the books Data Warehousing mit Oracle Data Warehouse Blueprints Certified Data Vault Data Modeler @dani_schnider danischnider.wordpress.com 4 21.11.2017

What are Analytic Views? 5 21.11.2017

Overview Attribute Dimensions Hierarchies Dim Dim Analytic View Facts Dim Dim 6 21.11.2017

Dimensions and Hierarchies 7 21.11.2017

Attribute Dimension Data source: Dimension table (for star schemas) View on multiple dimension tables (for snowflake schemas) Member Attributes (columns of a dimension table or view) Caption and Description Hierarchy levels (incl. implicit level ALL ) Level Key Sort Order within hierarchy level Caption and Description Dimension type (STANDARD or TIME) 8 21.11.2017

Attribute Dimension Example CREATE OR REPLACE ATTRIBUTE DIMENSION sh_products_attr_dim USING sh.products ATTRIBUTES ( prod_id CLASSIFICATION caption VALUE 'Product' CLASSIFICATION description VALUE 'Product', prod_name CLASSIFICATION caption VALUE 'Product' CLASSIFICATION description VALUE 'Product', prod_subcategory CLASSIFICATION caption VALUE 'Subcategory' CLASSIFICATION description VALUE 'Subcategory', prod_category CLASSIFICATION caption VALUE 'Category' CLASSIFICATION description VALUE 'Category' ) LEVEL PRODUCT CLASSIFICATION caption VALUE 'Product' CLASSIFICATION description VALUE 'Product' KEY prod_id MEMBER NAME prod_name MEMBER CAPTION prod_name MEMBER DESCRIPTION prod_name ORDER BY prod_name DETERMINES (prod_subcategory)... 9 21.11.2017

Hierarchy Data source: Attribute Dimension Hierarchical Ordering of Levels Parent-child relationships between levels of an Attribute Dimension Aggregation Rows A row for each member of each level of the hierarchy Can be used in SELECT statements Multiple Hierarchies can be defined for one Attribute Dimension { } { } { } { } { } { } { } 10 21.11.2017

Hierarchy Example CREATE OR REPLACE HIERARCHY sh_products_hier CLASSIFICATION caption VALUE 'Products' CLASSIFICATION description VALUE 'Products' USING sh_products_attr_dim (product CHILD OF subcategory CHILD OF category) CREATE OR REPLACE HIERARCHY sh_times_calendar_hier CLASSIFICATION caption VALUE 'Calendar Year' CLASSIFICATION description VALUE 'Calendar Year' USING sh_times_attr_dim (day CHILD OF calendar_month CHILD OF calendar_quarter CHILD OF calendar_year) CREATE OR REPLACE HIERARCHY sh_times_fiscal_hier CLASSIFICATION caption VALUE 'Fiscal Year' CLASSIFICATION description VALUE 'Fiscal Year' USING sh_times_attr_dim (day CHILD OF fiscal_month CHILD OF fiscal_quarter CHILD OF fiscal_year) 11 21.11.2017

Analytic View Data source: Fact table of a star or snowflake schema References to Attribute Dimensions Key of fact table that references the dimension Hierarchies used in the dimension Base Measures Columns of the fact table Calculated Measures Expressions on base measures 12 21.11.2017

Analytic View Example (1) CREATE OR REPLACE ANALYTIC VIEW sh_sales_history_av USING sh.sales DIMENSION BY ( sh_times_attr_dim KEY time_id REFERENCES time_id HIERARCHIES (sh_times_calendar_hier DEFAULT, sh_times_fiscal_hier), sh_products_attr_dim KEY prod_id REFERENCES prod_id HIERARCHIES (sh_products_hier DEFAULT), sh_customers_attr_dim KEY cust_id REFERENCES cust_id HIERARCHIES (sh_customers_hier DEFAULT), sh_channels_attr_dim KEY channel_id REFERENCES channel_id HIERARCHIES (sh_channels_hier DEFAULT), sh_promotions_attr_dim KEY promo_id REFERENCES promo_id HIERARCHIES (sh_promotions_hier DEFAULT) ) MEASURES ( amount_sold FACT amount_sold, quantity_sold FACT quantity_sold ) 13 21.11.2017

Analytic View Example (2) CREATE OR REPLACE ANALYTIC VIEW sh_sales_history_av USING sh.sales DIMENSION BY (...) MEASURES ( -- Base Measures amount_sold FACT amount_sold, quantity_sold FACT quantity_sold, -- Calculated Measures amt_sold_shr_parent_prod AS (SHARE_OF(amount_sold HIERARCHY sh_products_hier PARENT)), sales_cal_ytd AS (SUM(amount_sold) OVER (HIERARCHY sh_times_calendar_hier BETWEEN UNBOUNDED PRECEDING AND CURRENT MEMBER WITHIN ANCESTOR AT LEVEL calendar_year)), sales_cal_year_ago AS (LAG(amount_sold) OVER (HIERARCHY sh_times_calendar_hier OFFSET 1 ACROSS ANCESTOR AT LEVEL calendar_year)) ) DEFAULT MEASURE amount_sold 14 21.11.2017

Demo 1 a) Creating Attribute Dimensions b) Creating Hierarchies c) Creating Analytic Views 15 21.11.2017

Typical Use Cases 16 21.11.2017

SQL Queries in Star Schema Dim Dim SQL Query Facts SQL Query Dim Dim 17 21.11.2017

SQL Queries in Star Schema Classical: Joins on Star Schema With Analytic View: SELECT d1,d2,d3, SUM(f1), SUM(f2) FROM fact f JOIN dim1 d1 ON ( ) JOIN dim2 d2 ON ( ) JOIN dim3 d3 ON ( ) WHERE (filter on dim1) AND (filter on dim2) GROUP BY d1,d2,d3 ORDER BY d1,d2,d3 SELECT h1,h2,h3, f1, f2 FROM analytic_view HIERARCHIES (h1,h2,h3) WHERE (filter on hierarchy1) AND (filter on hierarchy2) ORDER BY h1,h2,h3 18 21.11.2017

Query on Analytic View Example SELECT sh_times_calendar_hier.member_name AS calendar_hier, RPAD(' ', sh_products_hier.depth * 2) sh_products_hier.member_name AS products_hier, amount_sold, quantity_sold FROM sh_sales_history_av HIERARCHIES ( sh_times_calendar_hier, sh_products_hier) WHERE sh_times_calendar_hier.level_name = 'CALENDAR_YEAR' AND sh_products_hier.prod_category = 'Electronics' ORDER BY sh_times_calendar_hier.hier_order, sh_products_hier.hier_order, sh_customers_hier.hier_order 19 21.11.2017

Query on Analytic View Result CALENDAR_HIER PRODUCTS_HIER AMOUNT_SOLD QUANTITY_SOLD ------------- ------------------------------------------------------ ----------- ------------- 1998 Electronics 1775688.87 9853 1998 Game Consoles 11.99 1 1998 Y Box 11.99 1 1998 Home Audio 1568900.57 2688 1998 8.3 Minitower Speaker 578374.62 1043 1998 Home Theatre Package with DVD-Audio/Video Play 990525.95 1645 1998 Y Box Accessories 73744.81 2684 1998 Extension Cable 1685.89 211 1998 Xtend Memory 72058.92 2473 1998 Y Box Games 133031.5 4480 1998 Adventures with Numbers 35771.66 2147 1998 Endurance Racing 97259.84 2333 1999 Electronics 2916369.92 24105 1999 Game Consoles 272901.18 884 1999 Y Box 272901.18 884... 2001 Fly Fishing 16726.41 2102 2001 Martial Arts Champions 53100.3 2506 2001 Smash up Boxing 100546.16 3121 66 rows selected. 20 21.11.2017

Analytic Views and BI Tools Example OBIEE Metadata Layer is part of BI Tool: OBIEE Business Model and Mapping SAP BusinessObjects Universe IBM Cognos Framework Manager 21 21.11.2017

Analytic Views and BI Tools Example Tableau 22 21.11.2017

Analytic Views and BI Tools For BI tools with metadata layer (e.g. OBIEE): No benefits with Analytic Views Import functionality would be useful For BI tools without metadata layer (e.g. Tableau, QlikView): Metadata definition in database Simplification of user queries ev. Views on top of Analytic Views required 23 21.11.2017

Analytic Views and ETL Analytic View can be Source for ETL Job Source should be Star Schema Physical (tables) or Virtual (views) Useful for Complex Calculations of Derived Measures Exports to Flat Structures (e.g. Standard Reports) 24 21.11.2017

Analytic Views and ETL Dim Dim Facts Analytic View Report Table Dim Dim 25 21.11.2017

Demo 2 a) Queries on Hierarchies b) Queries on Analytic Views c) A View behind the Scenes 26 21.11.2017

Conclusion 27 21.11.2017

Conclusion: Analytic Views are A Powerful Extension of Oracle SQL Very flexible for Analytic Queries on Star Schemas Useful for Ad-hoc Queries in SQL Not (yet) supported by any BI Tools Not a Replacement of a Star Schema 28 21.11.2017

Oracle Documentation Oracle Database 12c Release 2, Data Warehousing Guide 24 Overview of Analytic Views 25 Attribute Dimension and Hierarchy Objects 26 Analytic View Objects Oracle Database 12c Release 2, SQL Language Reference CREATE ANALYTIC VIEW Calculated Measures Expressions Oracle Live SQL Creating an Analytic View for the Sales History (SH) Sample Schema Querying Analytic Views 29 21.11.2017

Additional Information Attribute Dimensions and Hierarchies in Oracle 12.2 Analytic Views: Powerful Oracle 12.2 Feature for Business Intelligence Analytic Views: A Performance Deep Dive Analysis danischnider.wordpress.com 30 21.11.2017

Trivadis @ DOAG 2017 #opencompany Stand: 3. Stock, direkt an der Rolltreppe Wir teilen unser Knowhow! Einfach vorbei kommen, Live-Präsentationen und Dokumentenarchiv T-Shirts, Gewinnspiel und mehr Wir freuen uns wenn Sie vorbei schauen 31 21.11.2017