Connecting to data sources – Connecting to Data Sources
Connecting to data sources
You may want to include data from a variety of different sources, each of which has its own methods of connecting. We’ll look at a couple of types of data sources in this section.
On-premises data gateway
Since Power BI lives as both a desktop tool and an online SaaS that provides the hosting of reports and dashboards, it is important to connect to non-online-hosted data sources as well. This is accomplished with the on-premises data gateway (referred to as the data gateway). The data gateway is a free download from the Microsoft Download Center that works with the online Power BI service to enable this connectivity on local resources from the cloud.
It is important to understand how the on-premises data gateway is different from other gateway software that may have been used in the past. The data gateway software runs on a local Windows computer, and it needs to have an internet connection to connect to an intermediary Azure Service Bus. This encrypted connection to Azure Service Bus (provided by the Power BI service) allows the data gateway to work with the Power BI service, without needing any firewall ports to be opened. This allows a cloud service to connect to the local network. Most enterprise network security teams want to maintain or consistently improve the security posture of their organization and using the on-premises data gateway architecture will help those teams meet security goals as well.
Please note that the data gateway supports different data sources in different ways. Some sources are supported and some are not; it’s important to make note of the sources you intend to use and check for the needed support, either directly from the Power BI service or using the on-premises data gateway.

Figure 2.1 – Architecture of the on-premises data gateway
A data gateway can function in two modes: personal mode and standard mode. Standard mode is typically used in organizations on server hardware and provides DirectQuery and live connection to Analysis Services support. Standard mode, however, must run as a service on the computer and requires administrator privileges, while personal mode does not. When running in standard mode, this data gateway also works with Azure Analysis Services, Azure Logic Apps, Power Apps, Power Automate, and Power BI dataflows.
The data gateway is available for download from https://powerbi.microsoft.com/gateway/.
Anytime Power BI connects to a data source (directly or with the on-premises data gateway), it uses one of two types of queries. Next, we’ll look at query types.