What’s the difference between Live Connection and DirectQuery in Power BI, and where do they fit?

Hot on the heels of the question I was asked a few days ago, comes another closely related one: “What’s the difference between Connect live to a data source and DirectQuery a data source in Power BI?”

We had already established that there are two methods in which we could interact with data using Power BI: loading data into Power BI and accessing the data source directly.

Connecting live and DirectQuery both fall into the latter method, but there is a difference.

In DirectQuery mode, you access the data source, such as a relational database or data mart for data, but then you would create calculated columns or measures on top of it in Power BI generating a data model layer, something similar to a database view, if you may. The data still exists at the data source; but is pulled through the data model on Power BI onto the the visuals. The end users and report creators will see and interact with the data model on Power BI.

In the case of Connect live, the data model itself is at the source, you interact with it directly and no data model layer is created on Power BI. All measures, calculated columns and KPIs are provided by the data model at the source, along with the data. End users and report authors will see and interact with this data model through Power BI.

If you would compare these two methods on a conceptual level; DirectQuery mode is used in cases of self-service where you have data marts or a data warehouse on a relational database, and business users build their own data models off this for their business needs. The data marts or data warehouse will integrate data from various systems, and provide base measures with related dimensions.  Business user may create custom measures and calculated columns on top of this to suit their reporting and analytic requirements, and then explore data and build visual reports. Think of this as the data discovery phase of the self-service exercise.

Live connections would probably be used in scenarios where the analytic needs are better understood, and/or the type of analytics that were described above have matured and has become a mainstream in the organization. Here data models are built off the data warehouse using Analysis Services (multidimensional or tabular), with measures, calculations and KPIs that were earlier part of the self-service (and the data discovery exercise) incorporated in it. Business users now have established reports and dashboards that showcase organizational performance powered by established data models. Think of this phase where things have evolved into corporate BI that gives real value.

[SUBJECT TO CHANGE] Out of the whole bunch of supported data sources, Power BI currently supports the following in DirectQuery mode:

  • SQL Server
  • Azure SQL Database
  • Azure SQL Data Warehouse
  • SAP HANA
  • Oracle Database
  • Teradata Database
  • Amazon Redshift (Preview)
  • Impala (Preview)
  • Snowflake (Preview)

and the following using a Live connection:

  • Analysis Services Tabular
  • Analysis Services Multidimensional
  • Azure Analysis Services (Preview)

Azure Analysis Services

We’ve all seen how the world of data has been changing during the recent past. Many organizations have massive amounts of data. And many of them are running out of space to put them in. So naturally they turn to the cloud to store and process all of this data. The processed data can then be used for gaining insights in various ways. Apart from the popular forecasting and machine learning that is becoming a fad these days, there is a lot of traditional and “business” analytics that businesses still want to see. Business users want to dive into their data and perform self-service analytics and do data discovery.

However when you looked at the space on the Microsoft cloud, along with its data and analytics capabilities, you have the tools and services to store and process large amounts of data, but what you did not see was something that you could create a analytical model out of so that business users could easily consume as part of their business intelligence routine. Of course you had Power BI, but that was more of a next step, plus Power BI is lightweight and cannot handle more than 10GB.

The closest we had, on the cloud, was to build an Azure VM with SQL Server installed on it, and build the analytic model using Analysis Services. But then there was licensing, and the maintenance overhead among other things that did not make it a feasible option in a lot of cases.

And then Microsoft announced Azure Analysis Services a few months ago, a fully managed Platform-as-a-Service for analytic modeling. And suddenly there was hope. You no longer needed to write complex SQL against a SQL Data Warehouse, nor did you have to import processed data in its hundreds of thousands into Power BI to create your own analytic model.

Azure Analysis Services is currently in its preview phase, and hence Microsoft has given it only Tabular capability for the time being, with Multidimensional hopefully coming some time later. In my opinion that is just fine. One more thing though, if you would remember, the on-prem version of Analysis Services uses Windows Authentication only, in other words you needed to be on a Active Directory domain. So on Azure, in order to access Azure Analysis Services you need to be on Azure AD.

Let’s take a look at quickly setting up your first Azure Analysis Services database.

Creating a service instance is the usual process: Type in “Analysis Service”, and you would see it showing up in the Marketplace list:

Marketplace List Analysis Services
Analysis Services on the Marketplace

Once you select Analysis Services, you would see the Analysis Services information screen:

Analysis Services information screen
Analysis Services information blade

And then all you need to do this supply the configurations/settings and you are done:

Analysis Services Create blade
Settings/Configurations blade

When in Preview

At the time of writing, Analysis Services (preview) is only available in the South Central US and West Europe regions, so make sure that your resource group is created on one of those regions. The preview currently offers three standard pricing tiers, and one developer pricing tier (at an estimated cost of ~50 USD per month). The developer tier with 20 query processing units or QPUs (the unit of measure in Azure Analysis Services) and 3GB  of memory cache, is ideal to get started. More info on QPUs and pricing here.

Identity Not Found error

Another problem that I ran across was the “Identity not found” error that comes up a few moments after I click on the “Create” button, and Azure starts provisioning my service. It claimed that the user specified under “Administrator” cannot be found in Azure Active Directory, even though I did create such a user in AAD. The reason for this and how to resolve it is documented nicely here by @sqlchick. If you need further details on how to get your Office 365 tenant linked with your Azure subscription while integrating your Azure AD, you should definitely look at this.

Once provisioned, you can pause Analysis Services when it is not being used so that you could save dollars, while switching among pricing tiers is expected in the future.

Azure Analysis Services running
Analysis Services running

Cortana Intelligence Suite – Not just an intelligent personal assistant

Everyone knows Siri. Well, at least those who own an iPhone do. Then again that amounts to almost everyone. So I guess everyone does know Siri. A couple years ago however, we were introduced to Cortana (named after Microsoft’s Halo game character) on Windows Phone. She soon found her way onto Windows 10 devices, and is now even made available for iOS and Android devices. Think of her as something of a primitive version of Scarlett Johansson’s character in Her, if I may. She is Microsoft’s own intelligent personal assistant, and I use her almost everyday.

But what I am going to introduce you to in this post is something bigger. Much much bigger. It’s called Cortana Intelligence Suite; Microsoft’s Azure-based analytics and intelligence platform. Don’t panic just yet! D-Day hasn’t begun, nor have the machines risen, but I bet you can well imagine what Microsoft must be aspiring when they named it that.

Cortana Intelligence Suite (CIS) is a platform and process for building end-to-end advanced analytical solutions. The platform is made up of various tools and services, mainly running on top of Azure. It is not necessary that all the tools that make up CIS be used for your solution, but it is important that you follow a certain process to get it done. This way you know what you are going to do in a methodical manner, and it would be easy to choose the right tools and services from the suite to get things done.

The process that CIS solutions follow is known as Cross Industry Standard Process for Data Mining (CRISP-DM), which is a long-used time-tested means of performing data mining (which is very closely related to analytics, and is often employed to perform analytics).

CRISP-DM
CRISP-DM

For a complete overview of CIS and how it can be used, this easy-to-understand video by Buck Woody would be the ideal choice. It also details the tools and services that are part of the CIS platform. Once you are done with the video, you would probably get the gist of how Cortana fits into the business intelligence and analytics vision of Microsoft. Enjoy!

[VIDEO: Cortana Intelligence Suite – Overview by Buck Woody]

 

The BI and Analytics Magic Quadrant in 2016 – Power BI rules!

The Magic Quadrant for Business Intelligence and Analytics Platforms was released a few days ago by Gartner. This report, released on an annual basis analyses the vendors of business intelligence and analytics, and places them on a quadrant to indicate their capabilities. This year, well, things are different. Many of the key players from previous years have fallen away from the Leaders quadrant with only 3 remaining — Oracle is not seen anywhere in the four quadrants (they did not qualify to be included based on criteria)

Gartner2016
Source: Gartner (February 2016)

The criteria for this latest assessment is based on 5 use cases and 14 critical capabilities of a BI and analytics platform, which mostly focuses on agility and self-service.  Gartner explains that the trend of BI and analytics switching from an enterprise reporting model to a self-service model has now reached a tipping point, and now for the first time Microsoft is seen as a visionary leader in this space. And for Gartner to base Microsoft’s assessment solely on Power BI goes to show the potential of the product. The second iteration of Power BI with it’s desktop module and the online portal, offers an intuitive and simple to use interface for users to build data discovery and visualization solutions. With support for a plethora of cloud-based and on-premise data sources, along with up-coming features such as Cortana-integration, I think Microsoft is on a good path towards what Gartner predicts how the BI and analytics landscape will look like by 2018. Polish up a few cautions indicated by Gartner such as low advanced analytics capabilities on Power BI, and they’d look even better.

Microsoft also had been in the Leaders quadrant for the last 9 years, during the time when enterprise BI was at it’s peak. Couple that with the latest assessment and you could safely say that the collective Microsoft BI stack is a force to reckon.

For reference:

Gartner2015 Gartner2014

[Presentation] Business Intelligence and Data Analytics on the Microsoft Platform

This is a presentation that I delivered to the Microsoft Student Champs community in Sri Lanka on the 13th of March, 2015. The presentation provides an overview of what business intelligence and data analytics are and what Microsoft offers as tools. The presentation is meant to serve as a starting point for those interested in the subject, and who would like to learn more.

So, if there is anyone interested, please comment in the comment section about what you would like to know, and I might just write a post to explain… 🙂