TL;DR
- Data consistency means systems agree on a value; data integrity means that value is correct against business rules and constraints.
- A dataset can be perfectly consistent across every downstream system while silently failing integrity, the costliest pattern for data teams.
- Cloud data platforms don't enforce primary key (PK) or foreign key (FK) constraints, which shifts integrity enforcement onto analytics pipelines that run after ETL.
- A three-layer validation architecture (ingestion, transformation, pre-load) catches both failure types at the right stage.
- Prophecy is an agentic data preparation platform that lets analysts build AI-powered self-service analytics pipelines with integrity and consistency checks built in.
A dataset can have every system in your stack returning the same number, and that number can still be wrong. Consistency means systems agree on a value, while integrity means the value is actually correct with respect to business rules and constraints. Most data teams use the two terms interchangeably, and that conflation is how silent failures propagate through analytics pipelines and out to dashboards before anyone notices.
This article focuses on the transformations, ad hoc queries, and analysis steps that analytics teams build on top of governed data already ingested through ETL. Analytics teams shouldn't have to choose between speed and trustworthy data, and AI-powered self-service analytics is the most practical way for analysts to ensure both consistency and integrity within the pipelines they own, while data engineering maintains governance, ingestion, and platform controls.
What is data integrity?
Data integrity means the data has not been altered in an unauthorized manner, covering data at rest, during processing, and in transit. It extends well beyond security to include accuracy, completeness, and timeliness, with consistency among them. In database terms, integrity means constraint enforcement across several rule types:
- Primary keys (PK): Uniquely identify each row and prevent duplicate records that break joins and aggregations. Without PKs, the same logical record can appear two or three times in a result set without warning.
- Foreign keys (FKs): Maintain referential integrity between tables so child records can't reference missing parent records. When FKs are not enforced, orphaned rows accumulate quietly and break downstream joins.
- CHECK constraints: Validate that column values fall within an allowed range or pattern before they're written. They keep clearly invalid values, like a negative quantity or an unrecognized status, out of the table entirely.
- NOT NULL rules: Block missing values in columns that downstream logic depends on. They prevent silent gaps that would otherwise force every consumer to write defensive logic.
- Domain validation: Confirms that values conform to expected types, formats, and business definitions. This is where integrity meets the business meaning of a field, not just its storage type.
Consistency is one component of integrity, not a synonym for it. The full scope covers preserving the meaning of information, the completeness of its representations, and its correspondence to external sources of truth.
What is data consistency?
Data consistency is narrower and shifts meaning depending on context. As a data quality characteristic, it measures the degree to which data is free from contradiction and coherent with other data in a specific context of use. In plain terms, the same word means three different things depending on where you sit in the stack:
- Atomicity, consistency, isolation, durability (ACID) transactions: Consistency means transactions leave the database in a valid state defined by its constraints. The database refuses to commit anything that would violate the rules it's been told to enforce.
- Consistency, availability, partition tolerance (CAP) theorem: In distributed systems, consistency means all replicas agree on the same value for the same read. It says nothing about whether that value is correct against business rules.
- Cross-system reconciliation: In data operations, consistency means downstream systems return matching values when compared. Most teams check this daily, and it's the easiest one to mistake for integrity.
CAP-consistency and ACID-consistency describe different properties. The C in CAP refers to replication consistency, where all nodes can hold the same copy of data, even if it violates database constraints such as unique keys or foreign key constraints. Your nodes can agree on a value that breaks your business rules, producing consistent data without integrity.
Why the distinction matters in practice
The difference between data consistency and data integrity matters owing to two main reasons:
Consistency can mask an integrity violation
Consider a financial firm whose ETL logic fails to apply a required calculation to source records. The wrong value propagates to the general ledger, internal computation records, and regulatory filings. Every downstream system agrees. Cross-system reconciliation, the most common consistency check, returns zero discrepancies because every system faithfully propagated the same upstream integrity violation.
Fixing this requires you to first correct the computation logic at the source (integrity). Second, verify that corrected values reach all downstream systems (consistency). These are distinct obligations, and a reconciliation report alone will never surface the first one.
Completeness violations are an integrity problem
When required records simply don't exist in the firm's data systems, there's no contradictory data across systems because the data is entirely absent. A completeness constraint violation falls under integrity rather than consistency, and it's invisible to any check that only compares one system to another.
Cloud data platforms shifted the enforcement burden to you
Modern cloud data platforms handle constraint enforcement differently from the on-premises relational engines they replaced, and many teams haven't fully internalized the change. In short, the rules that used to be guarded by the database itself now have to be guarded by the pipelines that load and read the data.
On Snowflake, PK and FK constraints can be defined but are not enforced; they exist purely as metadata, so the responsibility for maintaining data integrity moves from the database to the pipelines that read and transform it. Databricks Delta Lake draws a similar line, where NOT NULL and CHECK constraints are enforced while PK and FK constraints remain informational only. BigQuery follows the same pattern, supporting PK and FK constraints as informational hints to the query optimizer rather than as enforced rules.
The practical enforcement matrix breaks down as follows:
| Platform | PK enforced | FK enforced | NOT NULL | CHECK |
|---|---|---|---|---|
| Oracle DB 21c | ✅ | ✅ | ✅ | ✅ |
| SQL Server | ✅ | ✅ | ✅ | ✅ |
| Snowflake (standard) | ❌ Metadata only | ❌ Metadata only | ✅ | ✅ |
| Databricks Delta Lake | ❌ Informational | ❌ Informational | ✅ | ✅ |
| BigQuery | ❌ Informational | ❌ Informational | ✅ | ✅ |
If neither the engineering team's ETL pipelines nor the analytics team's pipelines are running explicit validation for uniqueness and referential integrity, no one is. The work that used to happen automatically inside the database engine now has to be written into the pipelines themselves.
A subtle trap also exists on Snowflake and BigQuery. Both platforms let you tell the query optimizer to trust unenforced constraints when planning queries. If those constraints aren't actually being maintained by your pipelines, the optimizer can rewrite queries in ways that quietly produce wrong answers, and nothing in the platform flags it.
Building validation that catches both failure types
Validation is a shared responsibility between those who manage the data and those who analyze it. Data engineers own ingestion, ETL, and governance controls that ensure trusted data lands on the platform. Analytics teams pick up from there, automating data transformation logic to prepare datasets for specific questions and build the analytics pipelines that produce insights and reports. Integrity and consistency need to hold across both layers, designed in at every stage rather than retrofitted by a separate oversight function.
Teams might use a three-layer validation architecture that maps to the consistency and integrity distinction:
- Ingestion gate: Format validation, encoding conformance, and schema checks against expected specifications. Engineering owns this layer, which catches malformed input before it enters the platform and rejects records that don't match the expected structure.
- Transformation gate: Business rule validation, relationship checks, and domain constraints inside analytics pipelines. This is where most integrity violations get caught (missing values, broken joins, values outside expected ranges) before they propagate to the analysis layer.
- Pre-load gate: Target system conformance checks before committing transformed analytics outputs to the destination layer. This final gate verifies that aggregated values, totals, and reference relationships hold against the destination's expected state.
The widely used Bronze, Silver, and Gold layering pattern follows the same idea, where data quality has to improve at every step rather than just getting reorganized. Consistency checks comparing downstream systems to each other can't catch what integrity checks (validating source values against domain rules) catch. Your team needs both, applied at different stages and by the team accountable for each one.
Why prepared data matters for BI tools
Business intelligence (BI) tools are powerful for visualization, exploration, and self-service analysis, and most analytics teams already have one they trust for reports and dashboards. What BI tools depend on is well-prepared data; the joins, deduplication, conformance, and integrity checks have to happen upstream, because a chart only shows what the underlying dataset says.
That's where AI-powered self-service pipelines fit in. Analytics teams use them to prepare and transform datasets that flow into the BI layer, so consistency and integrity are maintained by the time analysis happens in the BI tool. Reporting and dashboarding stay where they belong, and the BI tool gets to do what it's good at on top of data that's already been validated.
The hidden cost of integrity work falling on engineers
When the database engine stops enforcing integrity, that work doesn't disappear; it falls to engineering, and much of it ends up in the wrong place. Data engineers should focus on ETL, ingestion, and governance, not on writing one-off transformations for analytics requests. Analytics tickets pull engineering away from the platform work that actually moves modernization forward, and the queue grows faster than headcount.
AI-powered self-service offers an alternative path, where analysts handle their own analytics pipeline integrity inside guardrails that the engineering team controls. AI agents make that self-service realistic by accelerating the parts analysts used to file tickets for, like generating transformation logic, suggesting constraint thresholds, and surfacing data shape issues before they hit production. The business gets fast, trusted, and accurate data; analysts work independently rather than queuing behind engineering bottlenecks; and engineering retains ownership of governance, ingestion, and compute.
Governance stays in your platform, not someone else's
Some data prep tools come with their own governance model, runtime, and opinions about where your data lives. That can be a tough fit for an engineering team that has already standardized on a platform and built security controls around it. The cleaner story is one where analytics work runs inside the same platform the rest of the org has already invested in.
Agentic data preparation runs on your platform rather than alongside it. Compute, governance, and security all stay in your stack; integrity and consistency checks execute as native code; audit trails live where the rest of your ETL pipelines log; and access controls follow the policies engineering already enforces. Nothing about the integrity model requires a parallel governance layer for analytics work.
How Prophecy fits alongside your existing stack
Prophecy is an agentic data preparation platform that powers AI-driven self-service analytics pipelines. Analysts work on top of governed data the engineering team has already ingested through ETL, using a visual canvas backed by native code. AI agents help them prepare data for analysis, build pipelines, transform data confidently for ad hoc questions, and ship results without filing a ticket. Prophecy sits between ETL tools and BI tools, preparing and validating the analytics datasets that connect the two.
Prophecy's built-in data quality checks cover the integrity rules that cloud platforms no longer enforce on their own:
- Completeness: Catches missing data at the column level before it reaches the analysis layer, so downstream consumers aren't writing defensive logic around silent gaps.
- Uniqueness: Replaces the engine-level guarantees that cloud platforms now leave to the consumer, preventing duplicate records from breaking joins and aggregations.
- Valid values: Confirms that data falls within expected types, ranges, and formats, so invalid values fail the constraint rather than propagating downstream.
- Referential checks: Validates that values exist in a reference set, replacing the foreign key enforcement that cloud platforms now treat as informational only.
- Business rules: Comparisons and statistical checks catch the kind of computational errors that produce silent value distortions in financial and operational data.
For teams working in SQL, Prophecy maps to the same standard data tests that dbt users already rely on, plus custom assertions for the rules that don't fit a template. Everything deploys to your existing infrastructure as native code, analysts configure checks through a visual interface, and engineering retains governance control. Behavior on failure is configurable, too. A non-blocking check passes data through while logging results, and a blocking check stops the pipeline after a threshold is crossed. Engineers set the guardrails, and analysts work within them.
Catch silent data failures with Prophecy
The distinction between consistency and integrity has practical consequences. It determines whether your validation strategy can actually catch the costliest failures, which are the ones where every system agrees, and every system is wrong.
Reconciliation reports won't catch failures where every downstream system agrees on the wrong number, and the cost of that gap compounds quickly across reporting cycles. Prophecy powers self-service analytics pipelines with integrity and consistency checks built in, working alongside the ETL pipelines, BI tools, and governance that the engineering team already runs. Teams adopting Prophecy benefit from four capabilities that work together:
- AI agents: Multiple agents generate transformation logic, suggest constraint thresholds, and accelerate analytics pipeline development through natural language prompts. Learn more about Prophecy AI agents for pipelines and how teams use agentic features inside their analytics pipelines.
- Visual interface and code: Analysts configure transformations and data quality checks on a visual canvas while data engineers work in native SQL, with both views staying in sync.
- Pipeline automation: Schedule, monitor, and version pipelines and quality checks alongside transformations, so integrity rules deploy with the analytics they protect.
- Cloud-native deployment: Run directly on your cloud platform as native code, so analytics pipelines execute on the same compute that processes your data.
With Prophecy, your team can build production-ready, AI-powered self-service analytics pipelines that catch both failure modes before they reach downstream systems. Book a demo to see how agentic AI features enforce integrity and consistency in your environment.
FAQ
What is the difference between data consistency and data integrity?
Consistency means systems and replicas agree on the same value, while integrity means that value is correct against constraints, business rules, and source-of-truth definitions. A dataset can be perfectly consistent across every downstream system while still failing integrity.
Do cloud data platforms enforce primary key and foreign key constraints?
Cloud data platforms like Databricks, Snowflake, and BigQuery generally don't enforce PK or FK constraints by default. Snowflake stores them as metadata only, Delta Lake on Databricks treats them as informational, and BigQuery treats them as informational hints. NOT NULL and CHECK constraints are enforced, but uniqueness and referential integrity require pipeline-level validation.
What does the CAP theorem mean by consistency?
In the CAP theorem, consistency means all replicas in a distributed system return the same value for the same read. This is replication consistency, not constraint validity. Nodes can stay in sync on a value that violates business rules, which is consistent without being correct.
Can analytics teams move existing pipelines to a cloud data platform without a full rip-and-replace?
Yes. Prophecy’s transpiler-based migration converts existing analytics workflow logic step by step into native code, so new analytics pipelines run alongside what's already in production. The efficiency gains come first, and the broader migration follows when the value is clear.
Ready to see Prophecy in action?
Request a demo and we’ll walk you through how Prophecy’s AI-powered visual data pipelines and high-quality open source code empowers everyone to speed data transformation

