Value Presence Verification (RPV) + Last-Seen Tracking Framework

🎯 Purpose This framework ensures that values in complex metadata structures (e.g. project earned value, invoice accounting, or employee attributes) are verified for presence even when using incremental loads. It protects against stale data persistence or silent value loss, using metadata-driven auditing. 🧩 Problem Context In many CDM views, values are upserted using procedures like … Read more

CDM Value Presence Reconciliation Framework

🎯 Objective To proactively expire or flag metadata rows that are no longer present in the source data even if their values haven’t changed, avoiding persistence of stale or misleading data. 1. 🏗 Recommended Table Extension Add these optional columns to any table using patch_upsert or put_update: 2. 📥 Staging Input Table – stage.project_values_current Your … Read more

Row Presence Verification (RPV)

🎯 Core Issue: 🔍 Risks of the Current Approach Scenario Problem Value disappears entirely You keep the last-seen value forever unless a new version overwrites Value moves to another key The old one is retained, and the new one appears as duplicate context Periodic reporting gaps Reporting shows a “stale” value that’s no longer present … Read more

cont.table_templates

Summary The [cont].[table_templates] table defines the structure and metadata behaviour for CDM-managed tables. It acts as a schema blueprint for dynamic table creation, upsert controllers, checksum logic, indexing, and JSON payload generation. All metadata-driven procedures—such as [cdm].[create_table], [cdm].[patch_upsert], and [upsert].[meta]—rely on this table to align logic with the CDM design pattern. ✅ Current Column Structure … Read more

upsert.entity

Summary The [upsert].[entity] procedure registers or updates an entity object in the Common Data Model. It constructs a standardised payload using object_code and object_class, along with derived metadata like domain, entity label, and schema. This payload is then passed to [cdm].[patch_upsert]. It is used for adding or updating entries in core tables (e.g. project_core, employee_core) … Read more

upsert.meta

Summary The [upsert].[meta] procedure is a lightweight controller for inserting or updating metadata attributes related to a specific object. It constructs a compact JSON payload and delegates the logic to [cdm].[patch_upsert]. It is ideal for managing metadata flags, status indicators, or classifications for objects like projects, employees, customers, and more. 🧭 Key Steps 🧪 Example … Read more

upsert.table_list

Here’s your KnowHow page for the upsert.table_list controller—a great example of a reusable shortcode that leverages the metadata engine elegantly. Summary The [upsert].[table_list] procedure registers or updates a metadata record in the log.table_list using a structured payload. It acts as a shortcode controller that builds the required JSON and delegates the actual upsert logic to … Read more

cdm.put_update

Summary The [cdm].[put_update] procedure enables safe, version-controlled updates to metadata tables by: This procedure ensures data immutability, supporting clean audit trails and history tracking. 🧭 Key Steps 🧪 Example Usage 📦 Parameters Parameter Description @tableName Fully qualified or short name of the target table @payload JSON payload containing the metadata to update @tableType Template type … Read more

cdm.post_insert

Summary The [cdm].[post_insert] stored procedure is responsible for inserting a new metadata row into a specified table using a structured JSON payload. It dynamically builds the insert logic using the column metadata from cont.table_templates, including default values and computed checksum logic. This procedure is a core component of the CDM metadata engine, providing consistency, reusability, … Read more

cdm.patch_upsert

Summary The [cdm].[patch_upsert] procedure acts as a controller for metadata inserts and updates. It dynamically evaluates JSON payloads, identifies whether an existing active row already exists, and determines whether to call an insert (post_insert) or update (put_update) operation. This ensures consistent versioned metadata with minimal redundancy. It supports JSON-driven payloads with field mapping based on … Read more