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

cdm.create_table

Summary The [cdm].[create_table] stored procedure dynamically builds SQL tables using metadata templates from cont.table_templates. It is used to create consistent core, meta or item tables within a specified schema, complete with partitioning, indexes, and insertion triggers for data integrity and metadata logging. This approach ensures repeatability, consistency, and automated setup of foundational table structures across … Read more