Skip to main content

Connect Power BI as an external knowledge source

Beta

This feature is in Beta. To use it, an account admin must turn on External knowledge from the account console Previews page. See Manage account-level previews.

Databricks can pull in metadata from Power BI semantic models so that Genie can use your Power BI measure definitions when it answers questions. Power BI is an external knowledge source.

Before you begin​

Setting up Power BI as an external knowledge source involves Power BI and Databricks. Each part of the setup needs different permissions.

important

While the External knowledge preview is on, Databricks pulls in metadata through every Power BI connection in Unity Catalog that uses OAuth Machine to Machine and is used by a Power BI task, including existing connections and tasks. Ontology snippets created from that metadata are available to all users in your Databricks account, regardless of their access in Power BI. To limit what Databricks pulls in, add each connection's service principal only to the Power BI workspaces that you want to include.

Power BI requirements​

The Power BI connection's service principal must be added directly to each Power BI workspace that you want to pull in metadata from, with at least the Contributor role. You don't need to add it to other workspaces. See Give users access to workspaces.

Databricks requirements​

To create the Power BI connection and pull in metadata, you need the following:

Create the connection and run the Power BI task​

If you already have a Power BI task that uses a Power BI connection with OAuth Machine to Machine, you don't need to create a new connection or task. Databricks starts pulling in metadata the next time the task runs after the External knowledge preview is turned on. Make sure that the connection's service principal meets the Power BI requirements.

Otherwise, create a Power BI connection in Unity Catalog that uses OAuth Machine to Machine, and then run a Power BI task that uses the connection:

  1. Create a Power BI connection in Unity Catalog that stores the service principal credentials from Microsoft Entra. Follow the steps in Create a Power BI connection in Unity Catalog for orchestration, and do the following:
    • For Auth type, select OAuth Machine to Machine.
    • For credentials, enter the client ID, client secret, and tenant ID from Microsoft Entra.
  2. Add a Power BI task to a job, select the connection for the task, and run the job. See Configure a Power BI task.

The first time the task runs, Databricks starts pulling in metadata through the connection. When Genie uses a snippet created from Power BI metadata to answer a question, the snippet appears in the response's citations.

How Databricks pulls in Power BI metadata​

Databricks reads metadata from Power BI through the Power BI connections in Unity Catalog. The following sections describe what metadata Databricks pulls in, which API and connections it uses, and how data access works for the ontology snippets created from it.

What metadata Databricks pulls in​

Databricks pulls in the following metadata from your Power BI workspaces:

  • Semantic models: Tables, columns, data types, and storage mode.
  • Measure and query logic: DAX measure formulas, calculated columns, and Power Query (M) expressions.
  • Model configuration: The semantic model diagram layout.

Ontology snippets don't include the following:

  • Row-level security (RLS) role definitions and members.
  • Power BI asset owner email addresses.

API, scope, and refresh​

Databricks uses the Power BI connection in Unity Catalog to read each semantic model's definition with the Fabric Get Semantic Model Definition REST API.

For each connection, Databricks pulls in metadata from the Power BI workspaces that the connection's service principal can access.

Databricks refreshes this metadata every 7 days. The metadata stays in your workspace's region and isn't visible as a Unity Catalog table.

Ontology snippets and data access​

Ontology snippets contain metadata, such as measure definitions and relationships, not the data in your tables. Unity Catalog permissions still govern access to that data. Users who don't have access to the Unity Catalog tables that a snippet references can't query those tables through Genie.

If a Power BI asset is removed, or the connection's service principal can no longer access it, Genie stops using the snippets created from that asset.

Limitations​

  • Databricks creates ontology snippets only for Power BI semantic models that read data from Unity Catalog objects.
  • Databricks doesn't capture usage activity, such as report views.
  • You can't limit ontology snippets to specific users or groups. To stop serving them, an account admin can turn off the External knowledge preview.

Additional resources​