# Dataflows

The **Dataflows** screen, in the **Performance** menu, shows the **code findings** of the Dataflows Gen1 and Gen2 in your tenant: Power Query (M) patterns that usually make the refresh slower or more expensive, such as broken folding, late filters, sorts in the middle of the query, destinations in replace mode and chained dataflows. Each finding points to the query and line, the severity, the confidence, the recommended action and the link to the official Microsoft documentation. Alongside, the screen shows the Capacity Units (CU) consumption of the last 7 days and the refresh duration, so you can prioritize what really weighs.

**How to access:** *Performance › Dataflows*. The screen is read-only and available to all profiles, within each user's workspace scope; in the **Audit** profile it is blocked by default and can be unblocked in [Users](../usuarios.md). Click the name of a dataflow to open the **Dataflow detail**. Running the analysis is managed by administrators in [Mapping › Code analysis](../mapeamento/analise-de-codigo.md).

{% hint style="info" %}
The analysis is **static**: Power Monitor reads the dataflow definition already collected and looks for patterns in the code, **without running the dataflow** and without querying the data. No code excerpt is shown on this screen: each finding shows only the rule, the query and the line.
{% endhint %}

## What it is for

* **Reduce capacity consumption:** find the dataflows that spend the most CU and have high severity findings, and start with them.
* **Speed up long refreshes:** find out where folding is lost, which filters should come earlier and which queries are re-evaluated several times.
* **Review before publishing or migrating:** use the list of evaluated rules as a best practice checklist, including to plan the migration of Dataflows Gen1 to Gen2.
* **Track progress:** the **Seen since** column shows how long each issue has existed, and the finding leaves the list when the code is fixed.

## Screen components

### Code analysis line

**What it is:** the line right below the title, for example *Code analysis: last run on 10/15/2026 23:20*.

**What it is for:** knowing whether the findings are up to date.

**How it works:** the line shows the last analysis run (or *running since ...*, *... failed*, *no run recorded*). Administrators also see the **View/manage collection →** link, which opens [Mapping › Code analysis](../mapeamento/analise-de-codigo.md), where the collection and the analysis can be triggered. The **Refresh** button, in the header, reloads the list.

### Analysis coverage

**What it is:** the **Analysis coverage** card (*"{total} items in the current filter, {percent}% analyzed"*), with four counters.

**What it is for:** knowing how much of your environment has already been analyzed before concluding that "there are no issues".

| Counter | Meaning |
| --- | --- |
| **Analyzed** | Dataflows with a completed analysis and a real finding count |
| **With findings** | Analyzed with at least one finding |
| **Not analyzable** | Definition too large, unreadable or with a failed analysis |
| **Pending** | Not analyzed yet; there is no finding count for them |

**How it works:** the card considers the search, workspace and generation filters, but ignores the status filter, so you always see the full coverage of the selection.

### Filters

**What it is:** the filter card above the list.

| Filter | Options |
| --- | --- |
| **Search** | Part of the dataflow name |
| **Workspace** | **All workspaces** or a workspace in your scope |
| **Generation** | **All**, **Gen1** or **Gen2** |
| **Analysis status** | **All**, **Analyzed**, **With findings**, **Pending** or **Not analyzable** |
| **Minimum severity** | **Any** (no filter), **Critical**, **High or above**, **Medium or above**, **Low or above** or **Any finding** |
| **Sort by** | **Severity**, **Name** or **Most recent analysis** |

**How to use:** choose the filters; the list reloads right away (the search waits until you stop typing). **Clear filters** resets everything to the default, keeping the chosen sort.

### Dataflow list

**What it is:** the **Dataflows** table, with 10, 25 or 50 items per page.

| Column | Content |
| --- | --- |
| **Dataflow** | Name, with a link to the detail |
| **Workspace** | Dataflow workspace |
| **Generation** | **Gen1** or **Gen2** |
| **Findings** | Count by severity (for example, *2 High*, *1 Medium*). *No findings* when the analysis found nothing; *Not counted* when the dataflow has not been analyzed yet or is not analyzable. A *{n} at runtime* badge indicates rules triggered from consumption and duration |
| **CU in 7 days** | CU consumed in the last 7 complete days and the share of the capacity (*{x} of the capacity*) |
| **p95 duration** | Refresh duration at the 95th percentile, with the source badge (**Job runs**, **Estimate** or **No source**) |
| **Analysis** | Analysis status and, when applicable, the **Partial coverage**, **Re-analysis pending** or **Definition read failed** badges (hover to see the explanation) |

**How it works:** missing values appear as **No data**, never as zero. There is no sort by CU, because consumption is calculated only for the page shown.

### Dataflow detail

**What it is:** the page opened from the dataflow name (*Code findings, evaluated rules, consumption and runs.*), with **Back to Dataflows** and **Refresh** in the header.

**Detail header:** analysis status, findings by severity, **Analyzed at**, **Definition captured at**, **Rule catalog version** and the analysis facts: **Queries**, **Loaded queries**, **Data destinations**, **Parameters** and **Linked entities**.

**Findings tab:**

* **Code findings** (*Found in the stored definition, by query and line. No code snippet is shown.*): one row per finding, with the columns **Rule** (title, identifier, description and the recommended action, with the light bulb icon), **Severity**, **Confidence** (with the **Heuristic** badge when the rule is inferred), **Query and line**, **Seen since** and **Source** (link to the Microsoft documentation).
* **Runtime findings**: rules decided from current consumption and duration, not only from the code (for example, migrating a Gen1 that still consumes CU).

**Evaluated rules tab:** the result of **each** catalog rule for this dataflow, with **Rule** (and the **Heuristic** and **Microsoft threshold** or **Power-Monitor threshold** badges), **Type** (**Code** or **Runtime**), **Result** (**Triggered**, **Not triggered** or **Not evaluated**), **Reason** and **Sources**. A **Not evaluated** rule shows the reason (for example, *Setting outside the definition* or *No runtime metrics*) and never counts as passed.

**Consumption tab:** last 7 complete days, from Capacity Metrics: **Total CU**, **Interactive CU**, **Background CU**, **Share of the capacity**, **Daily average**, **Daily peak**, **Throttling** and the **Operations** table. If the dataflow ran on more than one capacity, the screen says so.

**Runs tab:** refresh duration over the last 30 days, with **Samples**, **Average**, **p50** and **p95** and the labeled source.

**How it works:** if the dataflow was removed, is in an unmonitored workspace or outside your scope, the page shows *Dataflow not found*.

## Analyzed rules

The rules have an official Microsoft source. When Microsoft does not publish a cutoff number, the threshold defined by Power Monitor appears as **Power-Monitor threshold**. Rules marked as **Heuristic** are inferred from the code structure: confirm before changing.

| Rule | Generation | What is checked |
| --- | --- | --- |
| **Keep folding to the source** (heuristic) | Gen1 and Gen2 | Source that supports folding with a step that probably breaks it, in a loaded or referenced query |
| **Reorder the steps that break folding** (heuristic) | Gen1 and Gen2 | Steps that would fold placed after the first step that does not fold |
| **Adjust the native query usage** | Gen1 and Gen2 | Native SQL followed by more than one step, without `EnableFolding` |
| **Transform at the source** (heuristic) | Gen1 and Gen2 | Broken folding combined with merge, sort or `Table.Buffer` |
| **File sources do not fold** | Gen1 and Gen2 | File source (CSV, Excel, JSON etc.) |
| **Filter early** (heuristic) | Gen1 and Gen2 | Filter applied after a merge or sort |
| **Leave expensive operations for last** (heuristic) | Gen1 and Gen2 | Sort before the last transformation step |
| **Use the source-specific connector** | Gen1 and Gen2 | Generic ODBC or OLE DB connector |
| **Avoid re-evaluating referenced queries** | Gen1 and Gen2 | Query without load or staging and without a destination used by two or more loaded queries |
| **Be careful with Table.Buffer** | Gen1 and Gen2 | Use of `Table.Buffer` |
| **Avoid dynamic data sources** | Gen1 and Gen2 | Source address built at run time (parameters count as static) |
| **Read from a data destination, not from another dataflow** | Gen2 | Reading another dataflow through the Dataflows connector |
| **Dataflow with too many queries** | Gen1 and Gen2 | More than 30 queries (Power-Monitor threshold) |
| **Destination in replace mode** | Gen2 | Data destination writing in replace mode |
| **Staging possibly unnecessary** (heuristic) | Gen2 | Staging on in a query with a Lakehouse destination that no other query references |
| **Chained dataflows** | Gen1 and Gen2 | Linked entity (Gen1) or reading another dataflow |
| **Migrate to Dataflow Gen2** | Gen1 | Runtime rule: the Dataflow Gen1 consumed CU in the last 7 days |
| **Long refresh without incremental** (heuristic) | Gen1 and Gen2 | Runtime rule: no incremental refresh and a refresh of 15 minutes or more (Power-Monitor threshold). On Gen2 it stays **Not evaluated**, because the setting is not in the definition |
| **Fast copy**, **Enhanced compute engine** and **Privacy levels** | Gen2; Gen1; Gen1 and Gen2 | Always **Not evaluated** (*Setting outside the definition*): they serve as a reminder to check these options in Fabric |

## Severity and confidence

* **Severity** (**Critical**, **High**, **Medium**, **Low** or **Info**) indicates the likely impact of the pattern on performance or consumption.
* **Confidence** (**High confidence**, **medium** or **low**) indicates how sure Power Monitor is that the pattern really is a problem in this code.
* The **Heuristic** badge appears when the finding is inferred from the code structure (*Detected by a heuristic over the code, without running the item. Confirm before changing it.*).

## Rules and behavior

* **Where the code comes from:** each dataflow's definition is collected once a day by the **Notebook, pipeline and dataflow dependencies** collection, which needs the Service Principal with write permission (**Contributor** or higher) on the workspaces. When the collection finishes, the analysis runs automatically. See [Mapping › Code analysis](../mapeamento/analise-de-codigo.md) and [How dependencies are collected](../qualidade-de-dados/linhagem-de-dados.md#how-dependencies-are-collected).
* **Only monitored workspaces**, within your workspace scope.
* **Analysis status:** **Analyzed**; **Analyzed with cap** (more than 200 findings in the item; the most severe are kept); **Not analyzable** (definition too large to be stored, or unreadable); **Analysis failed** (redone when the definition changes); **Not analyzed yet** (definition not yet captured or processed).
* **Partial coverage:** the analysis did not cover the whole definition (for example, a query exceeded the analyzer time limit). The counts are real, but partial.
* **Re-analysis pending:** the item was analyzed with an earlier version of the rule catalog; the re-analysis happens on the next run, without downloading the definition again.
* **Definition read failed:** the last read of the definition in Fabric failed, usually due to a lack of write permission on the item. The findings shown are from the last definition read successfully.
* **Consumption:** last 7 complete days (today is not included), from the [capacity monitoring](../monitoramento/capacidades/ativar-monitoramento-de-capacidade.md) metrics. Without metrics, the column shows **No data**.
* **Duration:** last 30 days, with at least 5 runs. The preferred source is the job run history in Fabric (**Job runs**); without it, Power Monitor uses the total duration divided by the number of Capacity Metrics operations (**Estimate**, without percentile). Without enough samples, **No source** appears.
* **Seen since:** the date the finding first appeared. Changing lines above the finding does not reset the date; renaming the query or the step makes the finding count as new.
* **Limits of the folding heuristic:** Power Monitor does not run the Power Query engine. A connector may fold functions that the rule considers non-foldable (or the other way around), and the privacy levels between sources, which also block folding, are not in the definition. That is why the folding rules are marked as heuristic.

## Step by step: prioritizing dataflow optimization

{% stepper %}
{% step %}
### Open the screen

Go to *Performance › Dataflows* and check on the **Code analysis** line that the last run is recent.
{% endstep %}

{% step %}
### Filter what matters

In **Analysis status**, choose **With findings** and, in **Minimum severity**, **High or above**. To focus on one team, choose the **Workspace**.
{% endstep %}

{% step %}
### Compare with consumption

In the list, look at the **CU in 7 days** and **p95 duration** columns: a dataflow with serious findings and high consumption is the first candidate.
{% endstep %}

{% step %}
### Open the detail

Click the dataflow name. In the **Findings** tab, see the query and line of each finding and the recommended action; use the link in the **Source** column to read the Microsoft guidance.
{% endstep %}

{% step %}
### Fix and check

After publishing the fix in Fabric, wait for the next daily collection (or ask an administrator to run the analysis in *Mapping › Code analysis*). The fixed finding leaves the list.
{% endstep %}
{% endstepper %}

## Frequently asked questions

<details>

<summary>Many dataflows show as Pending. Why?</summary>

The analysis depends on the daily collection of definitions. Check that the **Notebook, pipeline and dataflow dependencies** collection is on in *Settings › Monitoring* and that the Service Principal has **Contributor** permission or higher on the workspaces. Then ask an administrator to run the analysis in [Mapping › Code analysis](../mapeamento/analise-de-codigo.md).

</details>

<details>

<summary>Does "No findings" mean the dataflow is optimized?</summary>

It means no catalog rule triggered on the analyzed definition. Check the **Evaluated rules** tab: **Not evaluated** rules (such as fast copy and privacy levels) depend on settings that are not in the code and need to be checked in Fabric.

</details>

<details>

<summary>Is my dataflow code shown or sent to AI?</summary>

No. This screen shows only the rule, the query and the line of each finding. The code is not sent to AI.

</details>

<details>

<summary>A folding finding does not make sense for my connector.</summary>

The folding rules are heuristic: they infer the behavior from the code structure, without running the query. Confirm in Power Query (for example, with the step folding indicator) before changing.

</details>

## Related pages

* [Notebooks](notebooks.md)
* [Mapping › Code analysis](../mapeamento/analise-de-codigo.md)
* [Performance Assessment](avaliacao-de-performance.md)
* [Average Execution Time](tempo-medio-de-execucao.md)
* [Data Lineage](../qualidade-de-dados/linhagem-de-dados.md)
* [Governance › Data Engineering](../governanca/engenharia-de-dados.md)
