Documentation
Getting Started
Data Grid
Modeling
Business Rules
Approvals
Users, Roles & Security
Administration
Installation
Migrating from MDS
Architecture

Drift & Rebuild

A staging table has one column per attribute. When the attributes change and the table does not, the table has drifted — and staged data for the affected fields can never arrive.

What keeps the table in sync

Saving an entity in the entity editor already keeps its staging table in sync. Primentra rebuilds the table after every save, so adding, renaming or removing attributes through the editor never leaves the staging table out of date. There is no notification, because there is nothing to fix.

Two paths bypass that automatic repair:

  • Importing a model that changes attributes on an entity with staging enabled
  • Changes made outside the application — direct SQL, an SSIS package, or any other edit to a stg table

Drift detection

Primentra checks every staging-enabled entity's table against its current attributes and reports what does not match.

FindingMeaningSeverity
Missing columnAn attribute exists with no matching staging column, so staged data for that field can never arriveError
Orphan columnA staging column exists with no matching attribute. Harmless, but unusedWarning
Missing tableStaging is enabled but the stg table no longer existsError
A data type change is never reported as drift. Every column in a staging table is NVARCHAR(MAX), whatever the attribute's type. The real type is applied when the batch is processed, not by the column's declared type.

The notification

The notification reads "Staging for '{entity}' is out of date" with a "Go to staging →" action that opens the entity's Staging Config tab. A banner there repeats the detail.

The Staging Config tab showing a drift banner for a missing column, above the Rebuild staging table button
The Staging Config tab showing a drift banner for a missing column, above the Rebuild staging table button(click to enlarge)

Rebuilding the table

  1. Open the entity's Staging Config tab.
  2. Click Rebuild staging table.
  3. Read the confirmation dialog. It names the columns to add and the columns to drop.
  4. Confirm.

Staged rows are kept — Ready and Error alike. Only the values held in dropped columns are lost.

If nothing has drifted, the dialog says the staging table already matches the entity's attributes and there is nothing to change.

Rebuild cannot repair a missing table. If the stg table itself was dropped outside the application, disable staging and enable it again to recreate it.

Disabling staging

Click Disable Staging on the Staging Config tab. The confirmation dialog warns that this drops the staging table permanently and deletes all unprocessed rows. Batch history records are kept for audit.

Ready to get started?

Start managing your master data with Primentra today.

View Pricing
Drift & Rebuild | Integration & API | Docs | Primentra