Schedule icon
RefreshGroupDataset icon
DiscordIncomingWebhook icon

Weekend Full Refresh of a Power BI Dataset with an Extended Wait

Run a Saturday full refresh of a Power BI dataset with Kestra. An extended wait window sized for long loads, with Discord confirmation and alerts.

Categories
BusinessData

Incremental refresh keeps weekdays fast, but most models still need a periodic full rebuild: historical partitions get restated, source backfills land, and schema changes require a complete reload. Those refreshes take hours, not minutes, and they belong on the weekend. This blueprint schedules io.kestra.plugin.powerbi.RefreshGroupDataset for Saturday at 03:00 with a waitDuration of three hours, sized for a full load instead of the default ten minutes.

How it works

  1. A Schedule trigger (disabled by default) fires at 03:00 on Saturdays, when capacity is idle and nobody is waiting on reports.
  2. refresh_dataset (io.kestra.plugin.powerbi.RefreshGroupDataset) authenticates with the Azure AD service principal and triggers the refresh. With wait: true, pollDuration: PT1M, and waitDuration: PT3H, it checks once a minute for up to three hours, a window sized for a complete reload rather than an incremental merge.
  3. notify posts the final status to Discord, so the team knows Monday starts on a fully rebuilt model.
  4. The errors block posts a distinct Discord alert on failure or timeout, early enough on Saturday that there is a whole weekend left to fix and re-run.

What you get

  • A weekly full rebuild that runs while nobody is watching and reports back when it is done.
  • A wait window that matches full load reality, so long refreshes are verified instead of abandoned at the default ten minute timeout.
  • A gentle polling cadence, one check per minute, appropriate for a multi-hour operation.
  • Failure alerts with the weekend still ahead, instead of a Monday morning surprise.

Who it's for

  • Teams running incremental refresh on weekdays who still need periodic full rebuilds.
  • BI owners of large models whose full refresh takes an hour or more.
  • Capacity admins who want heavy refreshes pinned to idle weekend hours.

Why orchestrate this with Kestra

A multi-hour refresh is exactly where fire-and-forget scheduling fails: nobody watches it, nobody is told when it dies at hour two, and its duration is recorded nowhere. Kestra waits through the whole refresh, records how long every weekend rebuild took, and alerts while there is still weekend left to react.

Prerequisites

  • An Azure AD app registration with Power BI API permissions granted, authenticating through the OAuth 2.0 client credentials flow.
  • Service principal access enabled for Power BI in the admin portal, and the service principal added to the target workspace.
  • The workspace id (groupId) and dataset id (datasetId) of the model to rebuild.
  • A Discord incoming webhook for confirmations and alerts.

Secrets

  • AZURE_TENANT_ID: Azure AD tenant id.
  • AZURE_CLIENT_ID: Azure AD application (client) id.
  • AZURE_CLIENT_SECRET: Azure AD client secret.
  • DISCORD_WEBHOOK_URL: Discord incoming webhook URL.

Quick start

  1. Add the four secrets to your Kestra namespace.
  2. Replace groupId and datasetId with your workspace and dataset ids.
  3. Execute the flow manually once and check the Discord confirmation and the recorded duration.
  4. Size waitDuration to your observed full refresh time plus headroom, then set disabled: false on the saturday_mornings trigger.

How to extend

  • Pair this flow with the weekday morning refresh blueprint: fast incremental refreshes Monday to Friday, full rebuild on Saturday.
  • Rebuild several large models on the weekend with bounded parallelism, as shown in the multi-dataset refresh blueprint.
  • Add a retry policy so a transient failure at hour two retries instead of waiting a week, as shown in the retry policy blueprint.
  • Chain a validation query or a report distribution after the rebuild, as shown in the distribution gate blueprint.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.