Well Header ingestion reference
Well Header ingestion reference
Use this document when you ingest the WELL_HEADERS share view from a client Databricks Delta Share into ComboCurve.
1. Purpose
WELL_HEADERS defines the well master record. It carries the identifiers and attributes that ComboCurve uses to establish the well, scope it correctly, and attach downstream production records.
For this integration pattern, the scheduled job reads the client-provided share view, validates record identity and audit fields, and upserts the current state of each well into ComboCurve.
2. Source object
Read from the client share view that exposes WELL_HEADERS.
ComboCurve reads this data through the INBOUND_WELL_HEADERS_SV view in your tenant schema (tenant_<tenant>) in the ComboCurve Databricks workspace. ComboCurve builds that view over the Delta Share you provide, and it must expose the columns described in this document.
Expected behavior:
- Read the full current-state row for each well.
- Use the business key to identify the ComboCurve target record.
- Use audit fields to detect changes and soft deletes.
- Upsert the record into ComboCurve.
3. Business key
Treat the following fields as the business key for WELL_HEADERS:
CHOSEN_IDDATASOURCEPROJECT_NAME
Uniqueness rule:
- Only one well header record can exist for each (
CHOSEN_ID,DATASOURCE,PROJECT_NAME) combination.
4. Project scoping rule
PROJECT_NAME controls whether the record is project-scoped or company-scoped.
- For project wells,
PROJECT_NAMEmust be populated. - For company-level wells,
PROJECT_NAMEmust beNULL.
Do not normalize a NULL project name into an empty string. Preserve the source convention so record identity remains stable.
5. Required audit fields
Every inbound record must include the following audit fields. ComboCurve checks that these columns exist in the view. It does not validate their values, except that __UPDATED_AT drives incremental reads. A NULL __SOFT_DELETE is treated as FALSE.
__RECORD_SOURCE__UPDATED_AT__SOFT_DELETE
The view must also include the __CREATED_AT column. ComboCurve checks that the column exists, and the run for this dataset fails if it is missing. ComboCurve does not validate its values.
5.1 Audit field behavior
__RECORD_SOURCE
Use this field for lineage and source tracking. It should identify the client system or organization that produced the record.
__UPDATED_AT
Use this field as the integration watermark.
Requirements:
- It must be present on every row.
- It must change whenever any value in the record changes.
- ComboCurve applies rows in ascending
__UPDATED_ATorder, so the newest version of a record is applied last.
Because ComboCurve reads incrementally, a row is picked up only when its __UPDATED_AT is later than the last value ComboCurve processed. Rows that share the same timestamp are ordered by CHOSEN_ID and DATASOURCE only, not by PROJECT_NAME. When you load the same well into several projects in one bulk load, give each project's row a different __UPDATED_AT. Rows with a NULL __UPDATED_AT, or a value earlier than that watermark, are not picked up after the first run.
__SOFT_DELETE
Use this field to mark a record as deleted.
FALSEmeans the well is active for ingestion.TRUEmeans ComboCurve should treat the well as deleted.
For delete events, the source should still provide:
- the business key fields
- the audit fields
Other non-key attributes can be omitted on delete rows.
6. Minimum required fields for ingestion
At minimum, the ingestion job should require the following fields to process a WELL_HEADERS row:
6.1 Identity and scope
CHOSEN_IDDATASOURCEPROJECT_NAME
6.2 Audit
__RECORD_SOURCE__UPDATED_AT__SOFT_DELETE
6.3 Required column
__CREATED_AT(the column must exist; its values are not validated)
All other well attributes are optional from the integration contract perspective, but they can still be ingested when present. ComboCurve ignores columns that it calculates itself. See section 7.6.
7. Recommended field groups
The full example DDL contains a large number of optional well attributes. In practice, it helps to think about them in groups.
7.1 Core identifiers
Common examples include:
WELL_NAMEWELL_NUMBERAPI10API12API14IHS_IDDRILLINGINFO_ID
7.2 Geographic and organizational attributes
Common examples include:
BASINPLAYSUBPLAYFIELDSTATECOUNTYCOUNTRYCURRENT_OPERATORPAD_NAME
7.3 Status and lifecycle dates
Common examples include:
STATUSSPUD_DATEDRILL_START_DATEDRILL_END_DATECOMPLETION_START_DATECOMPLETION_END_DATEFIRST_PROD_DATETIL
7.4 Well geometry and completion attributes
Common examples include:
LATERAL_LENGTHPERF_LATERAL_LENGTHUPPER_PERFORATIONLOWER_PERFORATIONTRUE_VERTICAL_DEPTHLANDING_ZONETARGET_FORMATION
7.5 Custom client-defined attributes
The schema also supports client-defined extensions such as:
CUSTOM_BOOL_*CUSTOM_DATE_*CUSTOM_NUMBER_*CUSTOM_STRING_*
Use these fields when the client needs to pass data that does not map to one of the standard header columns.
7.6 Columns ComboCurve ignores
ComboCurve calculates or controls some well header columns, so it ignores any value you send for them. They are read-only:
- Cumulative, first 6, first 12, last 12, and last month production metrics, including the
*_PER_PERFORATED_INTERVALvariants (for exampleCUM_OIL,FIRST_12_BOE,LAST_MONTH_GAS). - Production flags and dates that ComboCurve derives (
HAS_DAILY,HAS_MONTHLY,HAS_DIRECTIONAL_SURVEY,FIRST_PROD_DATE_DAILY_CALC,FIRST_PROD_DATE_MONTHLY_CALC,LAST_PROD_DATE_DAILY,LAST_PROD_DATE_MONTHLY,MONTH_PRODUCED). - Economics results (
IRR,UNDISCOUNTED_ROI,PAYOUT_DURATION,BEFORE_INCOME_TAX_CASH_FLOW,FIRST_DISCOUNT_CASH_FLOW,ECON_RUN_DATE,ECON_FIRST_PRODUCTION_DATE,OIL_BREAKEVEN,GAS_BREAKEVEN,WI_OIL,NRI_OIL). - Shrunk EUR columns (
OIL_SHRUNK_EUR,GAS_SHRUNK_EUR,NGL_SHRUNK_EUR, and their*_OVER_PLLvariants). - Calculated completion totals (
TOTAL_FLUID_VOLUME,TOTAL_PROP_WEIGHT,TOTAL_STAGE_COUNT,TOTAL_CLUSTER_COUNT,TOTAL_ADDITIVE_VOLUME, and the calculated per-interval and per-fluid ratios). - System fields (
ID,PROJECT_ID,SCOPE,DATAPOOL,INPT_ID,GENERIC,COPIED_WELL,COPIED_FROM,MIDPOINT_LATITUDE,MIDPOINT_LONGITUDE,MOST_RECENT_IMPORT_DATE,MOST_RECENT_IMPORT_DESC,MOST_RECENT_IMPORT_TYPE,CREATED_AT,UPDATED_AT).
8. Validation rules
Apply these checks before loading into ComboCurve:
8.1 Required-field validation
ComboCurve checks two things before it loads a well header row:
- The view must contain these columns:
CHOSEN_ID,DATASOURCE,PROJECT_NAME,__RECORD_SOURCE,__CREATED_AT,__UPDATED_AT, and__SOFT_DELETE. If any is missing, the run for this dataset fails. Other columns that are missing from the view are skipped. - Every row must have a non-empty
CHOSEN_IDandDATASOURCE. ComboCurve skips a row that does not, and writes the failure to the data share error log.
For PROJECT_NAME:
- accept
NULLonly for company-level wells - require a value for project wells
Project wells load into an existing project, so ComboCurve loads projects first in every run. If the project does not exist, ComboCurve rejects the whole request for that project and data source. A request can contain up to 1,000 wells.
8.2 Key stability validation
Treat the business key as immutable identity. If a source system changes one of the business key values for an existing well, handle that as a new logical record unless an explicit remapping rule exists.
8.3 Timestamp validation
Require __UPDATED_AT to be parseable as a timestamp. Use the source value as the authoritative change timestamp.
8.4 Delete validation
If __SOFT_DELETE = TRUE, the record must still contain enough data to identify the row to remove:
CHOSEN_IDDATASOURCEPROJECT_NAME__UPDATED_AT__RECORD_SOURCE__SOFT_DELETE
9. Operational notes
- Prefer idempotent loads. Re-reading the same row should not create duplicates.
- Prefer full-row delivery for updates. Partial updates should only be accepted if the mapping contract explicitly supports them.
- Preserve the client business key exactly as delivered.
- Deleting a row from the view does not delete the record in ComboCurve. ComboCurve only sees changes, so mark the row with
__SOFT_DELETE = TRUEinstead. - Rows that fail validation are skipped and written to the data share error log (
DATA_SHARE_ERROR_LOGS, exposed asDATA_SHARE_ERROR_LOGS_SV). ComboCurve does not read them again on its own. To resubmit a corrected row, change its__UPDATED_ATto a newer value. ComboCurve retries temporary platform errors. - Well header requests are the exception to row-level isolation. A well delete request for a project deletes nothing if any well in it is missing from that project, and the error is written to the error log, and one request can carry up to 2,000 deletes. Send deletes only for wells that exist in the project.
- A project can hold at most 50,000 wells. ComboCurve rejects inserts that would exceed the limit.
- If a previous run is still active for the same source, the next scheduled run is skipped. The skipped run is not an error, and the next run picks up the changes.
- Keep raw-source lineage available for troubleshooting.