Project wells
Project wells
1. Integration overview
Dataset Name: Project Wells
Shared View: PROJECTS_WELLS_SV
Delivery Mechanism: Databricks view via Delta Sharing
Update Pattern: Continuous Update
Export Trigger: None — this dataset is delivered continuously, not on export.
2. Business context (Oil & Gas Reservoir Engineering)
This dataset is the membership list that links each project to its wells: one row per project and well pair.
A well in a project is a project-level well record. Join WELL_ID to WELL_HEADERS_SV.ID to read its header.
3. Dataset characteristics
What this dataset is
- Entity grain: One record per project and well (latest version).
- Measures: None. This is a link dataset.
- Enrichment: Adds
CHOSEN_ID,DATASOURCE, andPROJECT_NAMEfor client-friendly joins.
Mutable, near real-time dataset
This dataset is mutable: records may be inserted, updated, or soft-deleted after their initial arrival.
Updates are delivered to Databricks continuously. When a change is made in ComboCurve, the corresponding change is typically reflected in Databricks within ~1–3 minutes.
Soft deletes
When a record is deleted in the source system, the dataset reflects that through the __SOFT_DELETE flag. The shared view does not remove those rows. Filter __SOFT_DELETE = FALSE unless you explicitly want to track deletions.
4. Expected record uniqueness
- Technical uniqueness (as exposed by the shared view):
PROJECT_ID+WELL_ID - Business identity (recommended for client reporting):
PROJECT_NAME+CHOSEN_ID+DATASOURCE. Names are not enforced to be unique, so join on the technical key.
5. Client access pattern
Query the shared view directly:
- Primary access object:
PROJECTS_WELLS_SV - Typical filters:
__SOFT_DELETE = FALSE(exclude wells removed from the project)
- Common joins:
- Join to
WELL_HEADERS_SVonWELL_ID = WELL_HEADERS_SV.ID. - Join to
PROJECTS_SVonPROJECT_ID = PROJECTS_SV.ID.
- Join to
Example:
SELECT PROJECT_NAME, CHOSEN_ID, DATASOURCE
FROM <shared_catalog>.<shared_schema>.PROJECTS_WELLS_SV
WHERE __SOFT_DELETE = FALSE
AND PROJECT_NAME = '<project_name>';
6. Full schema definition (client-facing shared view)
The following schema reflects the client-facing shared view (PROJECTS_WELLS_SV). Columns are organized into data categories for easier discovery.
6.1 Project and well references
| Column | Data Type | Description |
|---|---|---|
| PROJECT_ID | STRING | Reference to the related project. |
| WELL_ID | STRING | Reference to the related well. |
| PROJECT_NAME | STRING | Name of the related project. |
| CHOSEN_ID | STRING | Chosen ID from the well header. |
| DATASOURCE | STRING | Data source of the well. |
6.2 Record metadata and integration
| Column | Data Type | Description |
|---|---|---|
| __RECORD_SOURCE | STRING | Origin of the data. |
| __CREATED_AT | TIMESTAMP_NTZ | Timestamp when the record was created in the integration. |
| __UPDATED_AT | TIMESTAMP_NTZ | Timestamp when the record was last updated in the integration. |
| __SOFT_DELETE | BOOLEAN | Integration soft-delete flag. TRUE means the record was deleted in ComboCurve. |
7. Incremental consumption best practices
Pull only new or changed records
For scheduled ingestion, pull records where __UPDATED_AT is greater than your last successful ingestion watermark. Optionally include a small lookback window to capture late updates. Keep soft-deleted rows in the pull so that you can apply the deletes downstream.
SELECT * FROM PROJECTS_WELLS_SV
WHERE __UPDATED_AT > '<last_watermark>';
Deduplicate by the shared-view key
Treat PROJECT_ID + WELL_ID as the record key and upsert accordingly. The shared view always resolves to the latest version for that key, based on COALESCE(__UPDATED_AT, __CREATED_AT).
8. Operational notes
- Latest-row logic: The shared view returns the most recent record for each key, ordered by
COALESCE(__UPDATED_AT, __CREATED_AT). - Late revisions: Records can change after their first appearance. Use incremental pulls driven by
__UPDATED_ATand consider a small backfill window. - Removed wells: A well removed from a project appears as a row with
__SOFT_DELETE = TRUE.