Using DirectQuery with dataflows

Using DirectQuery with Power BI dataflows lets you connect directly to a dataflow without the need to import the data into a dataset. There are many reasons why using DirectQuery with dataflows, rather than importing data, is useful and helpful. The following are a few examples:

  • Working with large dataflows
  • Decreasing orchestration needs for dataflows
  • Serving data to customers in a managed and performance-minded way
  • Preventing the need to duplicate data in a dataflow and an imported dataset

Configuration

To use DirectQuery with dataflows, you must explicitly toggle the enhanced compute engine to On in dataflow settings. You must then refresh the dataflow before it can be consumed in DirectQuery mode.

If you're using the original version of Power BI Premium (rather than using Premium Gen2), there are four items you must validate:

  • The enhanced compute engine must be enabled for the Premium capacity and the specific dataflow.
  • You must be running the latest version of Power BI Desktop.
  • You must specifically connect to the data source using the Power BI dataflows connector.
  • You must also take the following steps to connect using Power BI Desktop:
    1. Sign out of Power BI Desktop
    2. Clear the dataflows connection, which requires you sign in
      • Select File > Options and settings > Data source settings > Delete Power BI dataflows
    3. Make your connection using the Power BI dataflows connector, ensuring that the enhanced compute engine is on, and the connection has been refreshed

If you're using Premium Gen2, the following ordered steps are much simpler:

  1. Navigate to the Premium dataflow, and set enhanced compute engine to On.
  2. Navigate to the dataflow settings section for the target dataflow, and turn on enhanced compute engine for the dataflow.
  3. Refresh the dataflow.

Once the steps are completed, the dataflow will be accessible in Power BI Desktop with DirectQuery mode.

Consumption

When DirectQuery is available for a dataflow, connecting to a dataflow using the Power BI dataflows connector prompts you to choose whether to connect to tables through DirectQuery or Import.

Dataflow entities that support DirectQuery display the View icon in Power BI Desktop, rather than the Table icon. The View icon appears as two boxes overlaid on each other, the Table icon is a single table with a grid.

The following image shows the View icon, indicating that the Orders table supports DirectQuery:

Image showing that direct query is supported.

This image shows the Table icon, indicating that the Query table only supports import:

Image showing that direct query is not supported.

In DirectQuery mode, you can quickly interrogate large-scale datasets locally. However, you cannot currently perform any other transformations.

Next steps

This article provided an overview of using DirectQuery with dataflows. The following articles may also be useful.

The following articles provide more information about dataflows and Power BI: