From SSAS to Azure Analysis Services - Lessons learned Niels Skytte From SSAS to Azure Analysis Services - Lessons learned
BIG Thanks to SQLSat Denmark sponsors
Agenda: Deployment Processing Security Monitoring Debugging Stability Works, not quite done with CI/CD Processing Lots of options, have tried most, using ssms, ssis, azure runbook Security Eventually got it working, AD/AAD, internal vs external Monitoring Azure Portal okay, still waiting for full access Debugging xEvents, limited need so far Stability One issue in 4 months Performance Just seem to work Capacity No issues with our current setup Questions, any time
My professional background’ish Geologist by education Data geek by choice Process expert by necessity Entrepreneur because it had to be tried
Human ‘analysis’ Using S4 and/or waiting for something bigger Have heard/read about it Have tested with my own data Using it in production now Running all our Analysis Service in Azure Using S4 and/or waiting for something bigger
What do you have running Size poll What do you have running D1… B1.. B2… S0… S1… S2… S4…
Okay, so then…………….. Introduction Lets move on What we’ve learned What is different Feature differences Lets move on Features explained Scenarios What we’ve learned Security Performance Debugging Interactive session What works and what does not ? I’m screwed You know more than me Who will take over? Why did you go to an intermediate session? Let’s just go for beers
Our short Analysis Server history Some issues with performance Licensing was good fit (BI SPLA) 1100 missing vital features (bi-directional etc.) SQL 2012 (1100,1103) No significant changes We ran 2012 SP1 SQL 2012 SP1, 2014 (1103) Licensing changed, not a good option in our setup Performance (super DAX) Feature set good Ran 2016 in development SQL 2016,2017 (1200) Azure pay as you go B2B support Performance (super DAX) Features latest and greatest AAS/SQL 2017 (1400)
Azure Analysis Services 11/8/2018 11:25 AM Azure Analysis Services Architecture Cloud visualization tools Cloud data sources Azure Analysis Services Other data sources SQL Database Power BI Direct Query SQL Data Warehouse Cached Model Power BI Embedded Gateway On-premises data sources Authoring and development tools On-premises visualization tools This is a high-level architecture view. Analysis Services is now part of the cloud solution. If your data sources are all in the cloud such as Azure SQL DW and SQL Database, no on-premises infrastructure is required. Client such as Power BI Desktop, Excel, and 3rd party tools connect directly to the cloud. For Azure Analysis Services to access on-premises data sources, the On-premises data gateway is required. One per Analysis Services server is required to support the volume and performance requirements of the Azure Analysis Services workload. Other data sources SQL Server Visual Studio Excel Direct Query Analytics Platform System Teradata Oracle Cached Model Power BI Desktop Third party BI tools Note: not all capabilities available at public preview © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Our history Started with SSAS 2012 on VMs Wanted/needed to move to 2016 features bi-directional performance Was part of AAS preview program Price was the main hurdle, so it was all or nothing
Deployment Deploy via VS Via VSTS No issues besides the usual (use BISM normalizer) Have experienced the analysis instance to crash when deploying models in development So do use separate dev/test when testing (for dev use integrated ws) Via VSTS Working on CI workflow (not quite done)
Processing Gateways If you are running the old version upgrade (see monitoring later)
Processing – in production (dev is easy) Options SSIS 2012 – Webhook to runbook 2014 – Webhook to runbook 2016 – Direct via process task Direct via PS Azure Automation PS based runbook
Processing – Create runbook See: https://jorgklein.com/2017/02/02/process-azure-analysis-services-databases-from-azure-automation/ $AzureCred = Get-AutomationPSCredential -Name "aas-refresh" Add-AzureRmAccount -Credential $AzureCred | Out-Null Invoke-ProcessASDatabase -databasename “adventureworks" -server "asazure://northeurope.asazure.windows.net/demo" -RefreshType "Full" -Credential $AzureCred
Process in SQL 2012-14 via webhook Run powershell command via sql agent: $request ='https://s9events.azure-automation.net/webhooks?token=<your token id>' Invoke-RestMethod -Method Post -Uri $request
Processing – SSIS 2016 Make note of your target version Then it works
Processing – SSIS 2016 If you get Then get the right libraries https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-data-providers
Security Service Principals Firewall now supported https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal https://azure.microsoft.com/en-us/blog/automation-of-azure-analysis-services-with-service-principals-and-powershell/ Firewall now supported
Security We’re a small company providing services to many larger ones AAD B2B was a major reason for moving to AAS Initial we had issues with using ‘groups’ but now it works
Security - Firewall
Security Invite users – with or without email $cred = Get-Credential Connect-AzureAD -Credential $cred $invitations = import-csv -Delimiter ";" C:\temp\inviteusers.csv $messageInfo = New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo $messageInfo.customizedMessageBody = “Welcome! You are now a member of our tenant” foreach ($email in $invitations) {New-AzureADMSInvitation -InvitedUserEmailAddress $email.InvitedUserEmailAddress -InvitedUserDisplayName $email.Name -InviteRedirectUrl https:// myapps.Microsoft.com -InvitedUserMessageInfo $messageInfo -SendInvitationMessage $true} $cred = Get-Credential Connect-AzureAD -Credential $cred $invitations = import-csv -Delimiter ";" C:\temp\inviteusers.csv foreach ($email in $invitations) {New-AzureADMSInvitation -InvitedUserEmailAddress $email.InvitedUserEmailAddress -InvitedUserDisplayName $email.Name -InviteRedirectUrl https://myapps.Microsoft.com -SendInvitationMessage $false} https://docs.microsoft.com/en-us/azure/active-directory/active-directory-b2b-what-is-azure-ad-b2b http://prologika.com/power-bi-group-security/
Monitoring Watch for memory and QPU in the portal for now, no support for https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-monitor https://azure.microsoft.com/en-us/blog/using-xevents-with-azure-analysis-services/
Monitoring In the portal for now, running B1
Monitoring
Monitoring ‘Old’ Gateway memory leak
Monitoring – new gateway With mashup a total of 620 MB
Monitoring – new gateway
Debugging Haven’t had too much need (luckily ), but check out: https://github.com/Microsoft/Analysis-Services/tree/master/AsXEventSample Or just use XEvents in SSMS for live tracing
Stability Only real stability issue experienced has been with deploying ‘untested’ models to production.
Performance Just works, no issue For checking real-time processing check out: https://github.com/Microsoft/Analysis-Services/tree/master/AsPerfMon
Capacity Really choose what you need in terms of features
What we learned Stabil and good performance Feature set keeps improving B2B works and has improved
BIG Thanks to SQLSat Denmark sponsors
?