Compare commits

...
2 Commits
Author SHA1 Message Date
blog-dev b50efc01e2 feat(feed): expand rollback post LinkedIn copy, drop version refs
publish / Build-and-publish (push) Successful in 12m52s
2026-08-20 21:50:27 +01:00
blog-dev de23966721 feat(feed): add rollback data changes post with meme 2026-08-20 21:06:43 +01:00
2 changed files with 81 additions and 0 deletions
@@ -0,0 +1,81 @@
---
title: 'Oops! Now You Can Roll Back Data Changes'
description: Despite all the checks in Data Controller for SAS®, sometimes the wrong updates get approved. You can now roll back to a previous version - with full audit history preserved.
date: '2026-08-20 09:00:00'
author: 'Data Controller'
authorLink: https://www.linkedin.com/showcase/data-controller-for-sas
tags:
- Announcements
previewImg: './rollback-trains-meme.jpeg'
---
# Oops! Now You Can Roll Back Data Changes
Despite the MANY checks and guarantees in Data Controller for SAS®, sometimes it can happen that the wrong updates are approved and applied.
Thankfully, it is now possible to **roll back** data changes to a previous state.
## How it works in practice
Behind the scenes, rollback is not a silent undo. It is a **first-class approval workflow** just like any other edit. When you choose to restore a previous version, the backend - via the [`%mp_stripdiffs`](https://core.sasjs.io/mp__stripdiffs_8sas.html) macro - reads the `MPE_AUDIT` table (or a custom `AUDIT_LIBDS` configured for the table) and computes every difference between the current state and the version you want to go back to.
It handles all three change types:
- **Deleted rows** are re-inserted with their original values.
- **Modified rows** are reverted to their previous values.
- **Added rows** are marked for deletion with `_____DELETE__THIS__RECORD_____="Yes"`.
The computed differences are written to a new staging package in the approvals directory, complete with a CSV and a `macvars.sas` snapshot of the session context. A new `LOAD_REF` is generated, and the package is submitted via the standard `%mpe_loader` service - so it goes through the same edit-stage-approve workflow as any manual change.
This means the rollback itself is **reviewable and approvable**. Nothing is applied silently, and the full audit trail is maintained: the reversion appears as a new load reference in `MPE_SUBMIT`, `MPE_REVIEW`, `MPE_DATALOADS`, and `MPE_AUDIT`, just like any other submission.
## Security and access
Not everyone can roll back everything. The `%mpe_checkrestore` macro enforces a strict access check before the restore service will run:
- The load must actually exist and have been loaded (no rollbacks of unapproved submissions).
- The table must be configured with an audit table.
- The user must have `EDIT` access to the target table.
- If the user is not an admin, Row Level Security or Column Level Security rules on the table will block the restore.
If access is denied, the service aborts with a clear reason - no opaque errors.
## What this means for compliance
Because the rollback creates a new, approved changeset rather than silently rewinding history, auditors can see exactly what was reverted, when, and by whom. The `MPE_AUDIT` table retains the record of every intermediate state, so nothing is ever truly lost. For tables where data integrity is critical - regulatory reporting, actuarial assumptions, steering parameters - this is the difference between "we have no idea what happened" and "here is the complete chain of custody."
This feature works for all temporal-aware load types (`UPDATE`, `TXTEMPORAL`, and `BITEMPORAL`) and respects SCD2 validity windows. And the whole process is built on the same open-source macro library that powers the rest of Data Controller - so you can inspect, test, and audit the code itself.
Full documentation is here: https://docs.datacontroller.io/rollback-data-changes/
<!--
Source LinkedIn post:
"Which submission introduced this value?" should never be a hard question to answer.
Yet for many teams managing reference data, mappings, and regulatory adjustments in SAS®, a wrong approval means exactly that - an uncomfortable audit conversation, a forensic exercise, and a quiet hope that nobody upstream consumed the bad data.
Data Controller now lets you ROLL BACK a table to a previous state.
Not by silently rewinding history - the one thing your auditor definitely does not want. Instead, the reversion is packaged as a brand NEW change that goes through the same review and approval as any other edit:
- The reversion diff is calculated and staged
- An approver reviews it before anything is applied
- The rollback itself lands in the audit trail - who, what, when, why
Nothing disappears. The original mistake, its correction, and every state in between all remain fully traceable.
Access rules apply exactly as they do for edits - the same group permissions, the same restrictions. A rollback cannot be used as a shortcut around your controls.
For regulated reporting data - the kind where "oops" is a reportable event, not a shrug - this closes the loop between catching an error and evidencing its correction.
The underlying process is open source.
Link in the comments below 👇
#sas #sasviya #datagovernance #datamanagement
-->
<!-- Image prompt:
A dramatic flat-design meme illustration in the Data Controller brand style: two high-speed trains colliding head-on at the center of the frame, with data rows and spreadsheet cells flying out of the impact. A group of onlookers in business-casual attire stand in the foreground, heads bowed, looking on in shared sadness. Dark navy background, teal/green and muted orange accents. The collision represents conflicting data changes; the sad onlookers are the data stewards. Minimal text, no labels. Slightly stylised, not gory - suitable for a B2B data product audience. 16:9 landscape, suitable as a blog/feed cover image.
-->
Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB