Sub topic 1
Import, DirectQuery, and Live Connection: What Gets Refreshed
Prerequisites
You should know Power BI datasets, now called semantic models, reports, and workspaces. You should also know basic Power Query and common data sources such as SQL Server or Excel.
Storage modes and refresh
A semantic model can use one of three common storage modes:
| Mode | Where queries run | What scheduled refresh does |
|---|---|---|
| Import | Power BI stores a copy of the data | Loads updated data into the model |
| DirectQuery | The source database runs queries | Usually does not copy data on a schedule |
| Live connection | Another semantic model or Analysis Services model runs queries | The connected model controls refresh |
Import data becomes a cached copy in Power BI. Scheduled refresh reruns the model's queries, retrieves current source data, and replaces or updates the stored copy.
DirectQuery sends queries to the source when users interact with a report. It may still support limited metadata or cache operations, but it does not refresh imported table data in the usual sense.
A live connection points to an existing semantic model or Analysis Services model. Refresh the underlying model instead of the connected report.
When a gateway is required
An on-premises data gateway is a Windows service that lets the Power BI service reach data sources inside a private network. A gateway is usually required when an Import or DirectQuery model uses an on-premises SQL Server, file share, or other private source.
Cloud sources that Power BI can reach directly generally do not need a gateway. The decision depends on the source location and network path, not only on the storage mode.
Gateway modes and connection behavior
Standard mode is the normal choice for teams. It supports multiple users, data sources, and datasets, and it can participate in a gateway cluster for high availability.
Personal mode is intended for one user running personal Import refreshes. It has fewer management and sharing capabilities, so it is not suitable for a shared production gateway.
The gateway makes outbound encrypted connections to the Power BI service. The service sends refresh or query instructions through that connection. The gateway then connects to the private source using its configured credentials. You normally do not open inbound firewall ports, but outbound access and required service endpoints must be allowed.
Exercise
A DirectQuery model uses a SQL Server that is reachable only inside the company network. Does the model need a gateway?
Show answer
Yes. DirectQuery still needs the gateway to relay user queries from the Power BI service to the private SQL Server.