SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power...

48

Transcript of SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power...

Page 1: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic
Page 2: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

SQL Server Analysis ServicesProtocol and Test Suite Intro

Max Wang

SQL OIPI Test Development Team

Page 3: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Agenda

Page 4: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Understand SSAS

Page 5: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

'Who' is SSAS?

SemanticData Models

I’m an Analytical Data Engine

Decision Support

Business Analytics

Business Report&

Data Visualization

Page 6: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Where is SSAS?

SQL Server DBMS

Microsoft Business Intelligence

SQL ServerIntegration

Services

Data

SQL ServerAnalysis Services

SQL ServerReporting Services

SQL Server Oracle MySQL JSON File Excel File

Power Pivot in Excel

SharePoint

Power BI

APPs & Services

Page 7: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

How does Semantic Model work?

Semantic Model Analysis Database

Data Warehouse

User

Reports

Deploy

AssignPermission

Get Data

Reporting Services

Page 8: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Why don’t just Query?

Page 9: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

SSAS Semantic Modeling

Multidimensional

MS-SSAS

MS-SSAS-T

Tabular

1/3

1/10

Page 10: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Data Access of Multidimensional Model

ReportMultidimensional

Model

RelationalData Source

RetrieveData

DataSource Cube

Page 11: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Data Access of Tabular Model (Cached Mode)

In-MemoryCache

TabularModel

Report

RetrieveData

Data SourceData Feed File

Analysis Database

Query

VertiPaq

Page 12: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Data Access of Tabular Model (DirectQuery Mode)

TabularModel

ReportDirectQuery

Single

SQL Server

Page 13: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

I heard there is an Azure Analysis Services...

Tabular 1200Tabular 1400

Tabular 1200Tabular 1400

Tabular 110xMultidimensional

Cloud

On-premises

Data MiningPowerPivot for SharePoint

Page 14: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

More Details

Page 15: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Typical Message Sequence

Client

Server

Authentication Request (TCP)

Authentication Response (TCP)

SSAS Operation Request (Discover, Execute)

SSAS Operation Response (Discover Execute)

Create Connection

New Session Request

New Session Response

End of Session Request

End of Session ResponseClose Connection

Page 16: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Operations

Client Server

Authenticate Request

Authenticate Response

Discover Request

Discover Response

Execute Request

Execute Response

Page 17: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Generating a message

Encryp

tion

?

SOAP Message

SSAS Request

SSAS Response

DIME Bin

ary XM

L?

Co

mp

ressio

n?HTTP

DIME RecordTYPE Field

HTTP HeaderContent-Type

TCP IP

TCP

HTTP

HTTPS

GSS-API(RFC4178)

Page 18: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Parsing a message

Deco

de B

inary X

ML?

Deco

mp

ress?

Decryp

t?

CombineDIME

Records

SOAP Message

SSAS Request

SSAS Response

TCPIP

TCP

HTTP

Page 19: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Structure of SSAS message

Scripting Language

SOAPXMLA

Page 20: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Scripting Language Support

Version Multi-dimensional

Tabular 110x

Tabular 1200

Tabular 1400

SQL Server2019

ASSL ASSL TMSL TMSL

SQL Server 2017

ASSL ASSL TMSL TMSL

SQL Server 2016

ASSL ASSL TMSL TMSL

SQL Server 2014

ASSL ASSL NA NA

SQL Server 2012

ASSL ASSL NA NA

Analysis

Services

Scripting

Language

Tabular

Model

Scripting

Language

Page 21: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

ASSL Sample

<Delete xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"><Object>

<DatabaseID>AdventureWorksDW2008_Create</DatabaseID></Object>

</Delete>

MultidimensionalTabular XMLA (for Compatibility Level 110x)

Page 22: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

ASSL in XMLA

ASSL

Page 23: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

TMSL Sample

"refresh": {"type": "automatic","objects": [{

"database": "Adventure Works "}

]}

Tabular JSON (for Compatibility Level 1200+)

Page 24: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

TMSL in XMLA

TMSL

Page 25: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

SSAS Objects - Multidimensional

Database

Assembly

Role

Trace

Cube

DataSource

DataSourceView

Dimension

Assembly

DatabasePermission

Role

Action

MeasureGroup

KPI

Measure

AggregationDesign

MDXScript

CubeDimensionPermission

CellPermission

MeasureGroupDimension

Partition

Server

Account

Perspective

CubePermission

Aggregation

CubeDimension

MDXScript

Page 26: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Query Language of Multidimensional

Page 27: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Cube

Car Sales

Jan. Feb. Mar. Apr. May.Time

Dimension

Beijing

Shanghai

Shenzhen

Chongqing

Wuhan

LocationDimension

BlackBlue

SilverRedColor

Dimension

Haidian

Fengtai

Chaoyang

DrillDown

China

RollUp

Black

Slice

1st Quarter

Dice

SwitchLocation &Time Dimension

Pivot

Page 28: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Miraculous Dimension

Page 29: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

SSAS Objects - Tabular

Model

DataSource

Table

Relationship

Perspective

Culture

Role

Column

Partition

Measure

Hierarchy

PerspectiveTable

ObjectTranslation

DatabaseServerPerspective

Column

PerspectiveMeasure

PerspectiveHierarchy

LinguisticMetadata

RoleMembership

TablePermission

ExpressionExpression

Page 30: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Query Language of Tabular

MDX Query

Page 31: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

New Calculation Group in SSAS 2019

Sales MTD

Sales QTD

Sales YTDSales Measure

Sales Table

Order Table

Sales ColumnInternetTotalSales

Order MTD

Order QTD

Order YTDOrders Measure

Orders Column

Page 32: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Calculation Groups sample

MTD QTD YTD

Calculation Items

Calculation Group

Sales Table

Order Table

Table

Page 33: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Calculation Groups sample

Page 34: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Simpler the better

Model Structure

Query & Calculate

Table

Column

Partition

Measure

Hierarchy

DAXIn-memory Database

VertiPaq Engine

Self-Service BI

Better Performance

Page 35: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

AMO-TOM Assemblies

Page 36: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Test Suite

Page 37: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Open Specifications program

Page 38: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Interoperability Test Tools

• Microsoft Message Analyzer• Microsoft Protocol Test Suites• OData Validator• Plugfests and events• Interoperability labs• Microsoft Office Binary File Format Validator• Microsoft Exchange RPC Extractor

Page 39: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Why we need Test Suites?

Ensure the quality of Microsoft Open Specification

Help to evaluate partner implementations

Extend and integrate to customized product

Page 40: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Test Suites workflow

Open Specification

Requirement Specification

Test Suite

High Quality

Open Specification

Fix

Issue

Page 41: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Test Suite

SUTTestSuite

Page 42: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Demo

Page 43: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic
Page 44: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

Resources

Page 45: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

For Developers:AMO: https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models/analysis-management-objects/amo-classes-introduction?view=sql-server-2017TOM: https://docs.microsoft.com/en-us/sql/analysis-services/tabular-model-programming-compatibility-level-1200/tabular-model-programming-for-compatibility-level-1200?view=sql-server-2017SQL Server 2016 Feature Pack download page: https://www.microsoft.com/en-us/download/details.aspx?id=52676SQL Server 2017 Feature Pack download page: https://www.microsoft.com/en-us/download/details.aspx?id=55992TestSuite Git: https://github.com/Microsoft/ProtocolTestFramework

For Newest News:Analysis Services Team Blog: https://blogs.msdn.microsoft.com/analysisservices/Open Specifications Dev Center: https://msdn.microsoft.com/en-us/openspecifications/

Page 46: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic

For BI Users:SSDT: https://docs.microsoft.com/en-us/sql/ssdt/sql-server-data-tools?view=sql-server-2017SSRS: https://docs.microsoft.com/en-us/sql/reporting-services/tools/reporting-services-tools?view=sql-server-2017Power BI: https://powerbi.microsoft.com/en-us/Power BI Blog: https://powerbi.microsoft.com/en-us/blog/Microsoft BI: https://www.microsoft.com/en-us/sql-server/business-intelligence

Page 47: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic
Page 48: SQL Server Analysis Services - Microsoft · SQL Server Oracle MySQL JSON File Excel File Power Pivot in Excel SharePoint Power BI APPs & Services. How does Semantic Model work? Semantic