Skip to main content

PowerBI (dagster-powerbi)

Dagster allows you to represent your PowerBI Workspaces as assets, alongside other your other technologies like dbt and Sling. This allows you to see how your PowerBI assets are connected to your other data assets, and how changes to other data assets might impact your PowerBI Workspaces.

PowerBI API

Here, we provide interfaces to manage PowerBI Workspaces using the PowerBI API.

Assets (PowerBI)

class dagster_powerbi.PowerBIServicePrincipal

Authenticates with PowerBI using a service principal.

class dagster_powerbi.PowerBIToken

Authenticates with PowerBI directly using an API access token.

class dagster_powerbi.PowerBIWorkspace

Represents a workspace in PowerBI and provides utilities to interact with the PowerBI API.

build_defs
deprecated

This API will be removed in version 1.9.0. Use dagster_powerbi.load_powerbi_asset_specs instead.

Returns a Definitions object which will load Power BI content from the workspace and translate it into assets, using the provided translator.

Parameters:

  • context (Optional[DefinitionsLoadContext]) – The context to use when loading the definitions.
  • dagster_powerbi_translator (Type[DagsterPowerBITranslatorDagsterPowerBITranslator]) – The translator to use
  • enable_refresh_semantic_models (bool) – Whether to enable refreshing semantic models

Returns: A Definitions object which will build and return the Power BI content.Return type: Definitions

poll_refresh

Polls the refresh status of a PowerBI dataset until it completes or fails.

trigger_and_poll_refresh

Triggers a refresh of a PowerBI dataset and polls until it completes or fails.

trigger_refresh

Triggers a refresh of a PowerBI dataset.

class dagster_powerbi.DagsterPowerBITranslator

Translator class which converts raw response data from the PowerBI API into AssetSpecs. Subclass this class to implement custom logic for each type of PowerBI content.

dagster_powerbi.load_powerbi_asset_specs
experimental

This API may break in future versions, even between dot releases.

Returns a list of AssetSpecs representing the Power BI content in the workspace.

Parameters:

  • workspace (PowerBIWorkspacePowerBIWorkspace) – The Power BI workspace to load assets from.
  • use_workspace_scan (bool) – Whether to scan the entire workspace using admin APIs

Returns: The set of assets representing the Power BI content in the workspace.Return type: List[AssetSpec]

dagster_powerbi.build_semantic_model_refresh_asset_definition
experimental

This API may break in future versions, even between dot releases.

Builds an asset definition for refreshing a PowerBI semantic model.