
What are the best practices for oil and gas data quality?
Oil and gas data quality best practices: the six quality dimensions, rules for wells, units, and volumes, placeholder traps, reconciliation, and ownership.
12 min read
An engineering guide to detecting revised records, safely reprocessing historical data, and keeping downstream customers consistent.
Written by: AKM Ahsan Created on: 1 Dec 202615 min to read

An engineering guide to detecting revised records, safely reprocessing historical data, and keeping downstream customers consistent.
Your data pipeline completed successfully overnight. Every scheduled job passed, the API is responding, and customers can retrieve the latest production records.
But one of those records is wrong.
Not because the pipeline failed. The original source corrected a historical production report after your system had already processed and delivered it.
This is a recurring challenge for companies building oil and gas data products. Regulatory agencies and operators don't publish immutable records. Previously reported production figures can change, identifiers may be corrected, and historical datasets may be restated.
If your pipeline only ingests newly published records, those corrections can go unnoticed.
The engineering challenge is not simply how to backfill historical data. It's how to detect a change, reprocess it safely, and ensure that every customer receives a consistent corrected version.
This guide focuses on that process, especially for platforms that distribute oil and gas data through APIs, scheduled exports, and analytics applications.

Oil and gas data is collected from sources with different reporting schedules, data structures, and correction procedures.
A production figure available today may not be the same figure available several months from now.
The Railroad Commission of Texas (RRC) provides a concrete example. Its production reporting documentation explains that records may be updated as revised, corrected, or late reports arrive from operators. Production records are historically substantially complete after approximately six months, although subsequent corrections remain possible.
Source: Railroad Commission of Texas — Production Data Query System
This creates a problem for platforms that continually combine state regulatory data.
A pipeline might retrieve a record in February, normalize it, and publish it to customers. In April, the regulator updates the source. The February ingestion was technically successful, but the customer's historical dataset is now outdated.
Historical corrections may affect more than production volumes. Depending on the source, changes can involve:
A reliable system must distinguish between genuinely new records and changes to information it has already delivered.
A data backfill is the process of loading or reprocessing historical data for a period that has already passed through a data pipeline.
A backfill may be required because data arrived late, an earlier processing job failed, a source corrected historical records, or transformation logic changed.
For an oil and gas data provider, it's useful to separate three situations.
| Scenario | What happened | Required action |
| Missing historical data | A reporting period was never ingested | Load the missing period |
| Corrected source record | A previously delivered value changed | Identify and safely apply the correction |
| Changed transformation logic | Your processing rules were updated | Reprocess affected historical data |
These are related problems, but they don't have identical solutions.
Loading a missing month is relatively straightforward when no downstream records exist.
Correcting a month that has already been included in customer reports, API responses, and derived calculations requires more care.
Databricks' documentation similarly distinguishes historical backfill operations and identifies duplicate handling, schema compatibility, and processing requirements as important considerations.
Source: Databricks — Backfilling Historical Data with Pipelines
Consider a fictional oil and gas data provider that distributes monthly production information through an API.
The provider ingests January production records from a regulatory source and publishes them to customers in February.
In April, the source corrects one lease's January oil production.
| Event | January production value | Customer impact |
| Initial February ingestion | 1,250 barrels | Customers receive 1,250 |
| April source correction | 1,180 barrels | Original source now reports 1,180 |
| Pipeline without correction handling | 1,250 barrels | Customers continue receiving stale information |
| Successful correction publication | 1,180 barrels | Customers receive the corrected current value |
Illustrative example only; values do not represent an actual regulator, customer, or 6sense HQ project.
The difference is 70 barrels.
The numerical difference is not the only problem.
Suppose the provider has already generated monthly summaries, customer exports, production trend charts, and a cached API response using the original figure.
Updating one database record does not necessarily update those other representations.
The customer might then receive:
Each component may be functioning as designed, yet the complete product is inconsistent.
This is why a backfill should be treated as a controlled data-publication operation, not just an ETL rerun.

A reliable approach needs to cover the complete journey from a changed source record to the final customer-facing result.
When possible, retain immutable copies of the source data and metadata identifying each retrieval.
For file-based sources, useful metadata may include the source name, retrieval time, file checksum, file location, and processing run.
For APIs and database sources, record the equivalent source snapshot or revision boundary when available.
This matters because a data discrepancy can originate in two places:
The source changed, or your transformation logic produced a different result.
Without a historical representation of the input, engineers may struggle to tell which happened.
Raw snapshots also make controlled replay and investigation easier.
They do not need to dictate the design of every downstream table, but they should provide a trustworthy record of what entered the system.
Many pipelines are designed around a simple assumption: retrieve records newer than the last successful processing timestamp.
That works when sources are append-only.
It is insufficient when older data can change.
Depending on the source, revision detection may use:
Source revision metadata. Some sources expose updated timestamps or revision identifiers that can help identify changed records.
Snapshot comparison. Compare new source data with previously retrieved data at the appropriate business-record grain.
Checksums or fingerprints. Detect whether a source file or partition has changed before performing more expensive comparisons.
Rolling historical windows. Revisit recent periods where corrections commonly occur.
Periodic deeper reconciliation. Check older periods that may fall outside the usual correction window.
No single mechanism works for every regulator or source system.
A file may be republished under the same name. A source may update records without exposing record-level timestamps. A revised file may contain unchanged rows alongside corrected rows.
The detection strategy must reflect how the source actually behaves.
For multi-state integrations, this is one reason a source registry should document not only access methods and formats but also update schedules and revision behavior.
For more on those source-specific differences, see our guide to integrating US state oil and gas regulatory data.
A safe backfill depends on knowing what constitutes the same business record.
This sounds straightforward, but oil and gas sources differ in how they report information.
For example, Texas production reporting is generally lease-based rather than individual-well-based. A pipeline that assumes every production row represents a single well can introduce errors even before historical corrections are considered.
A record identity might depend on:
The exact key varies.
The important principle is to define record identity using the source's business meaning, not simply the row number or file position.
If the source later corrects the reporting entity or an identifier, that change may require updating relationships or crosswalks rather than performing a simple value replacement.
A change in record identity can also require explicitly retiring the previous canonical representation.
That is different from inserting another row and hoping consumers know which one is current.
Idempotency means that repeating the same processing operation produces the same intended final state without introducing duplicate or compounded changes.
Suppose a backfill processing job fails halfway through and the scheduler retries it.
If every retry blindly inserts new records, the resulting dataset can contain duplicates.
If the transformation depends on whatever source data happens to be latest at execution time, two retries might even produce different results.
For repeatable processing, consider:
Apache Airflow's best-practices documentation recommends treating tasks like database transactions and avoiding blind INSERT operations during retries.
Source: Apache Airflow — Best Practices
Idempotent database writes are necessary, but they may not be sufficient by themselves.
For example, a rerun could correctly update the database while sending the same customer correction notification twice.
External side effects, including exports, notifications, and downstream delivery jobs, also need retry-safe behavior.
Not every correction should trigger a complete rebuild.
Before running a backfill, establish its scope.
Which source changed? Which reporting periods are affected? Which canonical records depend on that source? Which aggregates, exports, or customer datasets will need to be refreshed?
A useful backfill execution record may contain:
| Field | Purpose |
| Source identifier | Which data provider or regulator changed |
| Affected period | Which historical interval is being reprocessed |
| Source snapshot ID | Which input version the operation uses |
| Transformation version | Which processing rules produced the result |
| Backfill run ID | Which execution applied the change |
| Changed-record count | How many records differed |
| Validation status | Whether reconciliation passed |
| Publication version | Which corrected dataset customers can access |
This information helps make reprocessing reproducible.
It also helps answer operational questions later, such as why a particular production figure changed and which processing run introduced the corrected value.
A backfill can finish without throwing an exception and still produce incorrect data.
Validation should examine both the changed records and the surrounding dataset.
Useful checks include:
Source-to-target reconciliation. Do corrected records match the authoritative source at the same reporting grain?
Duplicate-key checks. Did replay introduce multiple current representations of a business record?
Aggregate validation. Have dependent totals been recomputed correctly?
Scope validation. Did records outside the intended correction scope change unexpectedly?
Completeness checks. Are all expected records for the affected period present?
Deletion handling. Were withdrawn or invalidated records treated according to the source's rules?
Customer-facing checks. Do APIs and scheduled exports produce results consistent with the corrected dataset?
Simple row-count comparisons are helpful, but they aren't sufficient to prove business correctness.
Two datasets can contain the same number of records while reporting different production totals.
The reconciliation logic should be designed around the meaning of the underlying data.
This is where historical reprocessing becomes a product-delivery problem.
A large backfill may update thousands of records over several minutes or hours.
Customers should not accidentally receive an incompatible mixture of old and new records while processing is underway.
Where the architecture allows, the system can stage a corrected dataset separately, validate it, and publish it through a controlled cutover.
Possible approaches include:
The right approach depends on the storage engine, processing volume, and customer contract.
For some systems, an atomic publication boundary is feasible. Others may require a carefully defined eventual-consistency model.
Either way, the behavior should be intentional and documented.
The critical design question is:
At what exact point is a corrected historical value considered available to customers?
If the team cannot answer that question, downstream consistency is probably underspecified.
A correction-aware architecture separates raw source retention, revision detection, historical replay, validation, and publication.
Its core components are:
Source layer: Regulators, operators, vendor feeds, and other authoritative datasets.
Raw snapshot layer: Preserved input files or source snapshots with provenance metadata.
Revision detection: Identification of changes to previously processed records.
Canonical processing: Normalization at the correct business-record grain, using deterministic transformations where practical.
Historical reprocessing: Scoped backfill jobs that process affected records or partitions.
Validation gate: Reconciliation before promotion into customer-visible datasets.
Published data layer: A controlled current representation, potentially with version or snapshot metadata.
Customer delivery: APIs, exports, and analytics applications that consume the published dataset.
Monitoring: Visibility into source revisions, backfill results, publication lag, and downstream consistency.

This is a conceptual reference architecture. It is not a diagram of Peak ETL's production implementation.

Backfill design is often discussed as an internal data-engineering concern.
For companies selling energy data, the larger question is what happens after a correction reaches the platform.
Imagine a customer retrieves January production figures every morning.
The customer may maintain a local copy of your records. They might update existing records based on stable IDs, append records to a warehouse, or generate their own reporting snapshots.
When January changes in April, how does that customer find out?
Simply changing the value returned by your API may be sufficient for customers who always retrieve the entire current dataset.
It may not be sufficient for customers performing incremental synchronization.
Depending on product requirements, a customer-facing API may provide:
Stable resource identifiers. Customers can recognize that a corrected response represents an existing record rather than a new one.
Last-updated or revision timestamps. Customers can identify records changed since a previous synchronization.
Dataset versions or snapshot IDs. Customers can request or compare a coherent published version where supported.
Change feeds. Customers can retrieve additions, corrections, and deletions rather than repeatedly downloading every historical record.
Corrected exports. File-based consumers can retrieve revised versions or receive a manifest describing changed reporting periods.
Correction notices. Material changes can be communicated explicitly when customer contracts require them.
These are options, not a mandatory feature list.
A small internal analytics tool may not need a public change feed. A data vendor with many downstream customers may benefit substantially from one.
The contract should be chosen based on how customers consume the product.
A historical record can have several meaningful dates.
Reporting period: When the production activity occurred.
Source revision time: When the source says the record changed, if that information is available.
Platform observation time: When your ingestion system first detected the changed source record.
Customer publication time: When the corrected value became available through your product.
These timestamps should not be treated as interchangeable.
A January production record corrected in April is still a January record. Its observation and publication history simply changed.
Preserving this distinction makes it easier to investigate discrepancies, support customers, and explain what version of the data was available at a particular time.
A useful operational definition is:
That may include more than a successful data-processing job.
Dependent outputs can include:
A practical system should also monitor the time between discovering a correction and making the corresponding update available to customers.
This can be more meaningful to a data-product owner than pipeline execution time alone.
The customer's problem is not that a job took longer to run.
It's that the product may continue delivering outdated information after the source has changed.
At 6sense HQ, we built Spud Wire for Peak ETL, an oil and gas data business working with information published across the United States.
The platform brings together well, production, land, and regulatory data from state agencies into a unified, map-first product.
The published project materials describe integration challenges involving different state formats and delivery mechanisms, including SFTP, scraping, Excel, and CSV.
See our Peak ETL case study.
That project demonstrates experience with the source-integration and normalization challenges underlying multi-state oil and gas data products.
It does not, by itself, verify that the specific correction-detection, versioning, backfill orchestration, or customer-notification mechanisms described in this article were implemented in Spud Wire.
Those mechanisms are presented here as engineering approaches to the wider data-delivery problem.
For more on the underlying ingestion work, see our guide to building reliable oil and gas ETL pipelines.
Use these questions when reviewing a platform that distributes oil and gas information to downstream customers.
If several answers are unclear, the platform may have a correction-handling gap even when its ingestion pipeline appears healthy.
Not every historical-data problem requires a rebuild.
Improving the existing pipeline may be sufficient when the canonical model is reliable, source identity is understood, and the major weaknesses involve replay, monitoring, reconciliation, or controlled publication.
A more substantial redesign may be justified when:
The decision should start with the actual failure modes.
For a broader comparison of engineering approaches, see our oil and gas data management guide.
A working ingestion pipeline is valuable. Preserving it while adding reliable historical correction handling may be more sensible than rebuilding everything.
For an energy-data business, the challenge isn't simply collecting records from regulators and operators.
It's keeping customer-facing information reliable as those sources continue to change.
A pipeline that handles new records but ignores historical corrections can create problems that remain invisible until customers compare results.
If your team is dealing with revised source records, difficult backfills, or inconsistent API and export data, we'd be interested in comparing approaches.
At 6sense HQ, we build custom software and data integrations for energy and operations-heavy businesses.
Bring one problematic source and describe how corrections reach your customers today. We can use that as the starting point for a focused technical conversation.

Oil and gas data quality best practices: the six quality dimensions, rules for wells, units, and volumes, placeholder traps, reconciliation, and ownership.
12 min read

How to integrate oil and gas regulatory data across US states: who publishes it, how to access it, lease vs. well reporting, operator matching, federal records.
10 min read

An oil and gas ETL pipeline pulls well, production, land, and regulatory data from state regulators, federal sources, and operators, then converts many file formats into one model keyed on the well identifier. The transformation code is rarely the hard part. The hard parts are format sprawl, well identity, coordinate datums, and sources that revise their own history.
11 min read