Skip to main content

Power BI task for jobs

Preview

The Power BI task feature is in Public Preview.

While you can publish to Microsoft Power BI online manually from your Databricks workspace, you can use a Power BI task to orchestrate your Power BI semantic models automatically.

To learn more about publishing to Power BI in the Databricks UI, see Publish to Power BI Online from Databricks.

Before you begin

Configure a Power BI task

After you have a Power BI connection configured, you can create a task to automate publishing using that connection.

note

The jobs UI displays options dynamically based on other configured settings.

To begin the flow to configure a Power BI task:

  1. Navigate to the Tasks tab in the Jobs UI, for the job to which you want to add a task.
  2. Click + Add task.
  3. Enter a Task name.
  4. In the Type drop-down menu, select Power BI.
  5. Configure the task properties (see the following table for the properties and their use).
  6. Click Save task.
note

Databricks recommends setting a Databricks service principal to be the Run as identity on the task. For the best practices, see Best practices for jobs governance. The service principal will require the necessary privileges to access the Databricks tables, schemas, Power BI connection, and SQL warehouse used by the task.

When editing a task, the credentials of the current user are used, but when the task is run, the Run as identity is used. The identity must have the correct privileges to run the task.

Power BI task property

Description

SQL Warehouse

The SQL warehouse that processes refreshes in Import mode, or queries in DirectQuery mode for the semantic model.

Power BI connection

The Power BI connection for this task. The task uses this connection to fetch Power BI workspaces and semantic models, and to publish to Power BI. See Create a Power BI connection in Unity Catalog for orchestration.

Power BI workspace

The Power BI workspace to which a semantic model is published.

Power BI semantic model

The Power BI semantic model to publish. Select an existing model, or type a new model name and click Publish new semantic model <name>.

Overwrite existing model

By default, metadata updates are only appended to an existing model. Checking this box ensures all metadata and data updates propagate to Power BI semantic models when the task is run.

Power BI query mode

The default query mode for the tables being published. When DirectQuery is selected, you can also set query modes on individual tables using the Configure table query modes property. One of the following values:

  • Import The data for the model is cached in Power BI. To update the data, users must refresh the model before using it, which queries the SQL warehouse and loads the data.
  • DirectQuery The data is not stored in Power BI. When the user creates or loads a dashboard, the SQL warehouse is queried for the most recent data.

Power BI query mode is also referred to as storage mode in Power BI. For more information about query modes, see Semantic model modes in the Power BI service.

Tables to update

The source tables and schemas for the semantic model. If you select a schema for this property, then when you run the task, all tables under the schema at that time are used for the update. The task updates any new tables, columns, comments, and primary key/foreign key relationships.

Authentication method

Defines how the semantic model authenticates back to the chosen SQL warehouse. When using OAuth, credentials may need to be configured on Power BI after the first task run. When using PAT, it will generate and embed a PAT for the Run as identity.

Configure table query modes

When DirectQuery is selected as the Power BI query mode, you can optionally set individual tables to use Dual storage mode. Tables set to Dual storage mode can act as either Import or DirectQuery modes depending on the context of the query.

For more information, see Semantic model modes in the Power BI service.

Refresh after update

This option is available if Import is selected as the query mode. By default, only the model metadata is updated, but if this checkbox is checked, then it will also trigger a data refresh (which will query the SQL warehouse). This refresh can be seen in the refresh history on Power BI.

Troubleshooting

For information about troubleshooting publishing to Power BI, see Power BI troubleshooting. If you are still having trouble, you can submit product feedback. See Submit product feedback.