(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon
Data Quality in Microsoft Fabric: Gates and automation
Data Engineering

Data Quality in Microsoft Fabric: Gates and automation

João Barros 26/11/2026 10 min

"Without quality gates, a robust pipeline is a factory of false certainties: data arrives fast, decisions remain wrong."

Why implement Data Quality Gates in Microsoft Fabric?

In a business context where Power BI reports and Machine Learning models feed strategic decisions, ingestion speed is no longer the sole success criterion. bConcepts has repeatedly seen clients with well‑sized infrastructure but frequent breakdowns due to bad data — duplicated prices, blank identifiers, or outliers that distort KPIs. The cost of these failures is not merely technical: it translates into lost opportunities, poorly targeted marketing campaigns and weakened trust in data teams.

Data Quality in Microsoft Fabric: Gates and automation

Data Quality Gates are a control layer applied to the ingestion flow that validate, block or quarantine batches of data that do not meet pre‑defined rules. In Microsoft Fabric, these rules can run before writing to a Lakehouse or after transformation, enabling stop, alert or isolate policies. Properly implemented, they reduce incident resolution time, avoid rework and protect downstream models and reports.

Beyond pipeline protection, Gates contribute to a broader data governance effort: they allow tracing data lineage, proving that a decision was based on validated information and building measurable quality SLAs. This is critical when working with sensitive data (pricing, contractual conditions, customer information) or when regulatory compliance is required. Practically, a well‑designed Gates program can reduce operational risk and translate into direct savings — for example, by reducing cancellations due to pricing errors or decreasing time spent on audits.

How Gates work: checks, thresholds and policies

A typical Gate has three components: a set of checks (for example, schema, referential integrity, percentage of nulls, statistical distribution), thresholds that define acceptable tolerances, and an action policy (allow, reject, quarantine). In Fabric, these checks can run as Spark notebooks, PySpark scripts in integrated Data Factory pipelines, or as T‑SQL in Lakehouse Synapse SQL.

Practical check examples: block a batch if the null rate in a critical column exceeds 2%; quarantine a feed if a foreign key field has >0.5% missing references; or raise an alert when the mean and standard deviation of a metric shift by more than 4 standard deviations relative to the reference window. These rules should be parameterizable and versioned for compatibility with continuous deployment and auditability.

To make these decisions actionable, each check should return a score and a coded reason. For example, a referential integrity check might return: {status: "fail", rule: "fk_missing", pct: 0.72, sample: [{order_id:123, product_id:null}, ...]}. With this detail, automations can decide whether to apply immediate remediation, quarantine or human escalation. Additionally, rule versioning (rule_set_v1, v2, etc.) should be integrated with the CI/CD pipeline to ensure reproducibility across development, staging and production environments.

Designing idempotent pipelines with pre- and post-ingestion checks

For a Gate to work in production, pipelines must be idempotent: running the same ingestion multiple times should not cause duplicates or side effects. Practically, this implies using merge operations with natural keys or deduplication techniques based on hashes, along with batch metadata (batch_id, ingestion_time, source_version).

We recommend a two‑phase flow: pre‑ingestion and post‑ingestion. In pre‑ingestion, lightweight validations (schema, formats, sizes) filter obvious failures before volume enters the Lakehouse. For example, a quick check validating date formats and product codes may reject 0.5% of traffic from an external feed, saving substantial downstream effort. In post‑ingestion, deeper checks (referential integrity, metric validation, distribution) run in a transformation environment and can promote the batch to production, send it to quarantine or revert the ingestion. This design enables speed where possible and safety where necessary.

A practical approach is to use MERGE INTO on Delta tables in the Lakehouse: each ingestion includes batch_id and source_schema_version; the MERGE updates existing rows and inserts new ones based on a composite natural key (for example, order_id + source_system). For deduplication, we apply a hash over key columns (SHA256) and keep only the most recent record per hash + batch_timestamp. In streaming integrations, adding a timestamp and a 24–48 hour watermark allows handling late events without breaking idempotency.

If you implement CDC (Change Data Capture) as a source, ensure an intermediate layer materializes changes with transaction metadata; Gates can then validate aggregates by window and reject or accept batches according to diff consistency. Operationally, idempotent pipelines reduce locking requirements and simplify partial rollbacks — essential to minimize downtime windows in production.

Automatic action: fix, rollback and quarantine

Blocking is not always the best solution — there are cases where automatic correction reduces friction without compromising quality. Fixing date formats, normalizing country codes, imputing values with documented business rules are examples of safe automatic remediations that a Gate can apply before promotion.

Practical examples of automated remediations: transform dates with ambiguous formats using heuristics (for instance, if day >31, swap order), map obsolete country codes to current codes using reference tables, or fill stock with the last known value when variation exceeds a plausible threshold. These auto‑fix scripts should be accompanied by logs documenting how many records were changed, the rule applied and a sample of modified data (e.g., 1% or 1000 rows, whichever is smaller).

When automatic remediation is insufficient, quarantine is a practical alternative: problematic batches or tables are moved to a controlled area with metadata about the quarantine reason, samples and a direct link to a manual work queue. Practically, this involves creating a quarantine table in the Lakehouse with columns: batch_id, rule_id, src_path, sample_blob_link, created_by, created_at, status. Operations and business teams can use this information to prioritize fixes — for example, addressing supplier feeds impacting 60% of sales first.

As a last resort, a rollback is executed: using transaction logs or CDC operations, the affected ingestion is reverted. In Microsoft Fabric with Delta, this is possible through time travel and ACID operations — provided appropriate log retention was planned (recommended to keep transaction metadata and logs for 30–90 days, depending on domain risk). Rollbacks should be automated as much as possible, with a clear playbook: identify batch_id, check downstream dependencies, perform the rollback in a low‑usage window and validate integrity post‑rollback.

Observability and alerting: metrics that matter

The effectiveness of Gates depends on the ability to detect, explain and resolve anomalies quickly. Essential metrics include: rejection rate by source, mean time to resolution, volume of data in quarantine, false positive rate and number of rollbacks per month. Beyond these operational metrics, it is crucial to log samples of erroneous records, the violated rule and temporal context.

To make this operational, we suggest clear SLAs: for example, a critical incident (main feed blocked) should have an initial response within 30 minutes and resolution within 4 hours; medium priority incidents (quarantine with limited impact) may have up to 48 hours. Configure escalated alerts: initial notification via Teams to the operations team, escalate to the product manager after 30 minutes with no action, and SMS/voice for high‑severity incidents. Alert thresholds should be configurable per source — a low‑impact supplier may tolerate 5% rejection without alerts, while a primary POS requires tolerance <0.5%.

In Fabric, integrate these metrics with monitoring pipelines and Power BI dashboards. Dashboards show heatmaps by source, rejection rate trends over the last 90 days, and a table with the top‑10 rules causing the most blocks. Alerts via Teams or email should be policy‑driven (for example, escalate if >3 consecutive batches are rejected) and linked to runbooks that document triage steps. Visibility reduces downtime and helps business teams trust the platform.

Mini case study: omnichannel retail — numbers that convince

In an omnichannel retail chain with 120 employees, the data team integrates 6 sources: POS, ecommerce, CRM, inventory, logistics and external suppliers. The system received on average 3 million records per day (≈90M/month). Before Gates, poor quality incidents occurred 2–3 times per month, each taking on average 72 hours to resolve, with an estimated cost of €18k per incident (losses from wrong prices, misapplied discounts and incorrect reports).

bConcepts implemented Gates in Fabric with the following initial rules: block if null rate in product_id >0.5%; quarantine if stock discrepancy between POS and inventory >5% in a batch; and notify when average ticket per customer shifted >3 standard deviations from the 30‑day window. Pipelines were configured with batch_id, hash_key and 60‑day log retention to enable rollbacks. Operationally, we applied automatic remediations for dates and product codes that resolved 65% of incidents that previously required manual intervention.

After three months, results were significant: monthly incidents fell from 2.5 to 0.25 (90% reduction), mean time to resolution became 6 hours and estimated cost per incident dropped to €2k — an annual operational saving in the order of €150–200k. Moreover, commercial teams’ trust increased and the number of rehotfixes in Power BI reports decreased by 85%. In a less tangible but critical indicator, internal user satisfaction (internal NPS) rose 18 points, reflecting lower friction in accessing reliable KPIs.

"Implementing quality gates is not a cost — it is insurance that pays in trust and saved time."

Step‑by‑step implementation in a Fabric Lakehouse

1) Inventory sources and define classes of criticality: identify which sources affect critical KPIs (e.g.: price, stock, sales) and prioritize rules. Start with 10–15 essential checks to have quick impact. Practically, this means mapping 100% of columns used in critical dashboards and defining tolerances (e.g., acceptable nulls, acceptable variation limits).

2) Architect batch metadata: each ingestion should carry batch_id, source_hash, source_schema_version, and a checksum. These enable idempotence and auditability. Additionally, maintain a catalog table with data provenance, supplier contact and expected SLA per feed.

3) Implement pre‑ingestion checks in Fabric Data Factory pipelines (lightweight validation) and post‑ingestion checks in Spark notebooks integrated with Delta Lake for ACID operations. Test rules with a proof dataset that covers edge cases (datasets with 0%, 0.5% and 5% errors) to calibrate thresholds.

4) Define action policies: permit, quarantine, rollback, auto‑fix. Automate common remediations with parameterized scripts and maintain a documented manual escalation process. Prepare runbooks with clear steps: identify batch_id, contacts, rollback script and post‑rollback validation. Train support teams to execute these steps within a 1–2 hour window.

5) Monitor and iterate: build Power BI dashboards with the defined metrics and review thresholds monthly with business stakeholders. This continuous improvement cycle ensures Gates remain relevant as the business evolves. Conduct quarterly reviews to assess whether new rules should be introduced (for example, fraud checks) and keep a prioritized backlog of improvements by estimated impact.

In summary

  • Data Quality Gates in Microsoft Fabric block and fix ingestions, protecting downstream reports and models.
  • Combine pre‑ and post‑ingestion checks, idempotent pipelines and batch metadata for safe implementations.
  • Automate common remediations, use quarantine when necessary and keep rollbacks auditable.
  • Monitor operational metrics (rejection rate, time to resolution, data in quarantine) and align thresholds with the business.
  • A phased rollout with 10–15 essential rules brings quick impact and tangible ROI.

Conclusion: next steps to operationalize

If you plan to reduce the risk associated with your pipelines, start with a source inventory and a catalog of priority rules. Prove the concept with a single origin (for example, POS) and implement lightweight pre‑ingestion checks and advanced post‑ingestion checks. Ensure idempotence and batch metadata, and build monitoring dashboards to close the loop.

At bConcepts we help teams design and operationalize these Gates in Microsoft Fabric, from rule definition to automation of remediations and Power BI integration for executive visibility. Want to discuss how to reduce poor quality incidents in your organization by 90%? What would your first critical Gate be — nulls, referential integrity, or metric distribution?

← Back to insights
Let's talk?

Ready to transform your data?

Book a free 30-minute meeting and find out how we can help your team make better decisions.

Book a Free Meeting
bConcepts