View
5.689
Download
2
Category
Tags:
Preview:
DESCRIPTION
deck from SQLLive 360 - Orlando,
Citation preview
Real-World SQL Server 2012 Analysis Services BISM models
Lynn LangitLynn LangitData Wrangler
Level: Intermediate
Agenda – About the BI Semantic ModelAgenda – About the BI Semantic Model
Better BI => Better ReportingBetter BI => Better Reporting
Better BI => New Storage/Query/DisplayBetter BI => New Storage/Query/Display
What is the BISM?What is the BISM?
SQL Server Analysis Services ModesSQL Server Analysis Services Modes
• UDM (Multidimensional / Data Mining)– Also called OLAP cubes
• BISM (Tabular)– Business Intelligence Semantic Model
• PowerPivot for SharePoint
Why Use BISM?Why Use BISM?
• Quick and simple to set up (flexible model)– Fast – in memory by default w/Vertipaq
– Connects to many types of data - flexible
– Overcomes the limits of PowerPivot
– Granular (role-based) security model
• Integrates with PowerView (data source in SPS)
How to get started with xVelocityHow to get started with xVelocity
Data Sources for BISMData Sources for BISM
External Data - MarketsExternal Data - Markets
• Windows Azure Marketplace• DataMarket.com• Factual.com• Freebase.com
When to use the BISM?When to use the BISM?
How to Create / View models for BISM?How to Create / View models for BISM?
• Design in SSDT (or import from PowerPivot)• Open in Excel, SharePoint or PowerView• Can be used as data sources for SSRS in
SharePoint….
Demo Demo Creating a Model
in Power Pivot
Parts of BISM Parts of BISM
• Tabular Model Project in SSDT• New or Import• BISM – new or from PowerPivot via Excel
• Workspace Database (in memory by default)• Views in BISM
• Data & Calculation• Diagram• Toolbars—create KPI, etc…• Perspectives are supported as well
Demo Demo Enhancing the model
Enhancing ModelsEnhancing Models
• Sort or Filter Table data• Add Relationships
(diagram view)• Add Hierarchies (diagram
view)• Adding Calculated
Columns via DAX• Adding Measures and
KPIs via DAX• Improving Usability for
clients
Diagram View of BISM in SSDTDiagram View of BISM in SSDT
• Manage Relationships• Create Hierarchies
What is DAX - Data Analysis ExpressionsWhat is DAX - Data Analysis Expressions
• Data-expression Query Language (Excel-like simplified version of MDX
• Over 170 functions (64 functions for aggregation)• Ability to reference data in other tables in the model
(sumx, averagex, related [many-to-one], relatedtable [one-to-many] etc…)
When to Use DAX with BISM modelingWhen to Use DAX with BISM modeling
How to use DAX with BISM modelingHow to use DAX with BISM modeling
• Define formula & Add to model• DAX query language & query plans in 2012
– Uses ‘Evaluate’
• Samples– = SalesTable [SalesTotalColumn] – SalesTable [SalesCostColumn]
– = FORMAT (SalesTable [SalesDate], “MMM”)
– = RELATED (DimCustomerSales[SalesAmount]) – RELATED (DimCustomerCosts[SalesCost])
Relationship must be defined between tables when using RELATED
Enhancing the Model – Advanced ViewEnhancing the Model – Advanced View
Enhancing the Model – Advanced View 2Enhancing the Model – Advanced View 2
• Set the Table Behavior– Row ID
– Uniqueness
– Default Label
– Default Image
Tips for creating usable modelsTips for creating usable models
• Create Hierarchies• Hide unneeded columns from client tools• Rename columns to natural language• Add relations or Add perspectives• Format data in the model, i.e. percentages…• Use DAX to remove nulls / errors• Use a TimeTable
– Can use ‘mark as date table’
– Cam create a separate date table
Complex DAX exampleComplex DAX example
Understanding DAX in ProfilerUnderstanding DAX in Profiler
Demo Demo Adding DAX
to a BISM model
Creating BI projects using SSDTCreating BI projects using SSDT
BISM Models and ExcelBISM Models and Excel
• Can be created in Excel (and imported into SSDT)• Can be viewed in Excel (PivotTables) while modeling
in SSDT
Demo Demo Creating a BISM Model for
SSAS using
SQL Server Data Tools
(SSDT)
BISM Normalizer = DiffTool for BISMBISM Normalizer = DiffTool for BISM
3rd party tool, from CodePlex - here
Adding Security RolesAdding Security Roles
• Map groups to BISM roles
Understanding BISM structuresUnderstanding BISM structures
Deployment of BISM in SSDT to SSASDeployment of BISM in SSDT to SSAS
• Query Mode default is ‘In-Memory’• Default Cube Name is Model.bim
About Query ModesAbout Query Modes
• InMemory is the default• Query Mode (SSDT) / Direct Query Mode (SSMS)• Direct Query mode can use Columnstore indexes• Direct Query mode supports only a single data source• Not all DAX functions work in Direct Query mode
SSAS Server Settings for Tabular ModeSSAS Server Settings for Tabular Mode
Demo Demo Deploying a BISM
Model to SSAS
using SSDT
Connecting to a deployed BISM modelConnecting to a deployed BISM model
• Administration in SSMS
• View in Client– Excel / PowerPivot
– SharePoint PowerView
– Other clients
Connect in SSMSConnect in SSMS
DAX or MDX?DAX or MDX?
• MDX issuing clients (Excel) can – talk to both multidimensional models and tabular models running in
VertiPaq (in-memory) mode
• MDX cannot – be used to talk to DirectQuery models
• DAX issuing clients (Power View) can – talk to tabular models (both kinds - VertiPaq and DirectQuery)
• DAX cannot – be used to talk to multidimensional models. This functionality is on the
roadmap, but will not be present at RTM
Updating the dataUpdating the data
• Can update subsets using partitions• Can monitor update process via Profiler
Monitoring Resource UsageMonitoring Resource Usage
• Can use Profiler• Extended Events for monitoring• Can use DMVs• SSAS Operations Guide
Tips, Tricks & GotchasTips, Tricks & Gotchas
• Installation• SSAS in either Tabular –or- UDM mode
• Needs prerequisites
• Development• One BISM model per project
• Prefer DAX, not MDX
• Try it out in Excel while developing in SSDT
• Deployment• Use partitions for granular updating
• Monitor via Profiler – plan for up to ½ data size in server memory
Other ToolsOther Tools
• Cmdlets on CodePlex – here• Klout case study whitepaper - here• DAX studio/ intellisense - here
What about the UDM?What about the UDM?
• UDM / Data Mining is fully supported in SSAS• Must be installed in this mode
– Mutually exclusive to Tabular mode
• But, should you use it anymore?
ResourcesResources
• SSAS Team Blog – here• About DAX – MVP blog – here• SQL 2012 tutorial - here• Codeplex samples – here • Klout case study whitepaper - here
www.TeachingKidsProgramming.orwww.TeachingKidsProgramming.orgg
• Free Courseware ( • Do a Recipe Teach a Kid (Ages 10 ++)• Java or Microsoft SmallBasic
• recipes)
Toward Data Craftsmanship…Toward Data Craftsmanship…
Recommended