Data Lake Curated Dataset to Power BI Push
On a schedule, the flow reads aggregated curated-zone files from the Data Lake, validates record counts, and triggers a Power BI dataset refresh so the dashboard reflects the latest mart. Closes the lake-to-dashboard gap without a separate gateway pipeline.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow closes the lake-to-dashboard gap from Azure Data Lake. On an hourly schedule it lists and reads the aggregated curated-zone mart files, totals the data rows across them, validates that total against a configurable floor, and - only when the data looks sane - triggers a Power BI dataset refresh so the dashboard reflects the latest mart. It posts a success summary or a count-anomaly alert to a Microsoft Teams channel either way.
Why it matters: getting curated data into Power BI usually means gateways and ADF/Synapse pipelines. A flow-driven refresh with a built-in record-count sanity check is a lighter, governed path for pre-aggregated marts - and it refuses to publish when the row count collapses, preventing a broken dashboard.
Ships Off (demo).
Use Case
A data team lands pre-aggregated marts in the curated zone of a Data Lake and wants them visible in Power BI on a schedule, without standing up a separate gateway/pipeline - and with a guardrail that skips the refresh if the mart looks empty or truncated.
Flow Architecture
Recurrence Every Hour
RecurrenceRuns the flow hourly (frequency/interval configurable).
Initialize Config & Counters
Initialize variableBinds the Data Lake account, mart path, min rows, Power BI workspace/dataset, and Teams ids; sets row and file counters.
List & Read Curated Files
Azure Data Lake - ListFiles / ReadFileLists the curated mart folder and reads each file (skips subfolders), accumulating data-row counts.
Validate Record Counts
ConditionChecks the accumulated row count against the configured minimum floor.
Refresh & Notify (pass)
Power BI RefreshDataset + TeamsTriggers the dataset refresh and posts a success summary (files, rows, workspace, dataset).
Count Anomaly (fail)
Microsoft Teams - PostMessageToConversationAlerts the channel that the refresh was skipped due to a low/zero row count.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_DataLakeAccountName | String | your-adls-gen1-account | Data Lake account name (account param). |
| flowlibs_MartPath | String | curated/marts/daily_sales | Curated-zone folder to scan (no leading slash). |
| flowlibs_MinExpectedRows | String | 1 | Validation floor; refresh is skipped below this. |
| flowlibs_PowerBIWorkspaceId | String | REPLACE_WITH_PBI_WORKSPACE_ID | Target Power BI workspace (group) id. |
| flowlibs_PowerBIDatasetId | String | REPLACE_WITH_PBI_DATASET_ID | Target Power BI dataset id to refresh. |
| flowlibs_PowerBITableName | String | RealTimeData | Push-dataset table name for the AddRows customization (not used by the default refresh path). |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for notifications. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for notifications. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Azure Data Lake | shared_azuredatalake | ListFiles ReadFile |
| Power BI | shared_powerbi | RefreshDataset |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Push rows instead of refresh (AddRows)
- For a Power BI push/streaming dataset, replace RefreshDataset with AddRows (groupid + datasetid + tablename, body Payload). Configure a real dataset/table first so the designer can resolve the dynamic body columns.
- Incremental loads
- Track the last-processed partition/file (a Dataverse row or state file) and have ListFiles / the filter only pick up new partitions.
- Multi-dataset fan-out
- Loop a list of workspace/dataset ids to refresh several reports from one run.
- Stricter validation
- Raise the min-rows floor, or compare against the prior run's count to catch a sudden drop rather than just an empty file.
- Poll the refresh
- After RefreshDataset, add a Do-until on Get Refresh History to confirm success before notifying.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Row count per file
Lines minus header, CR stripped.
EXPR.02Accumulate (guarded >= 0)
Running total of data rows.
EXPR.03Validation gate
Refresh only when the floor is met.
EXPR.04Null-safe file list
Iterated in the Foreach.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.