blog: add a post on running two rule sets against one table #20

Merged
allan merged 1 commits from feed/two-rule-sets-one-table into main 2026-09-24 16:37:17 +00:00
Collaborator

Adds a feed post explaining how to run more than one set of validation rules against a single physical table.

Structure

  1. Why one table is one rule set - MPE_TABLES is keyed (tx_from, libref, dsn) and MPE_VALIDATIONS on (tx_from, base_lib, base_ds, base_col, rule_type), so rules hang off the physical table with no per-menu or per-report scoping.
  2. Option 1 (recommended): two librefs over the same data - configuration only. Both names are the same file, so an approval in either report updates the same data, and filtering, search, the row cap, the diff and the audit trail are untouched. Includes the platform-specific place to define the librefs and the locking / audit caveats.
  3. Option 2: an empty mirror plus two hook scripts - the deep dive. PRE_EDIT_HOOK replaces work.OUT so the empty mirror shows live rows; POST_EDIT_HOOK reassigns LIBREF / DS at submit time so the changeset is raised against the real table. Covers the call symputx vs %let trap, the already-applied filter, the column shape, and the config that has to stay in step between the two MPE_TABLES rows.

Four screenshots, all taken on the demo estate with a synthetic orders table:

  • rule-set-1.png / rule-set-2.png - the same amount (5000) rejected in one report and accepted in the other
  • mirror-live.png - an empty mirror displaying the live rows of its target table
  • approval-routed.png - a change submitted against the mirror, raised against the real table

Every claim was checked against the source (mpe_tables.ddl, mpe_validations.ddl, getdata.sas, mpe_loader.sas, postdata.sas) and the behaviour was reproduced on a live Viya estate before writing it up.

Adds a feed post explaining how to run more than one set of validation rules against a single physical table. ## Structure 1. **Why one table is one rule set** - `MPE_TABLES` is keyed `(tx_from, libref, dsn)` and `MPE_VALIDATIONS` on `(tx_from, base_lib, base_ds, base_col, rule_type)`, so rules hang off the physical table with no per-menu or per-report scoping. 2. **Option 1 (recommended): two librefs over the same data** - configuration only. Both names are the same file, so an approval in either report updates the same data, and filtering, search, the row cap, the diff and the audit trail are untouched. Includes the platform-specific place to define the librefs and the locking / audit caveats. 3. **Option 2: an empty mirror plus two hook scripts** - the deep dive. `PRE_EDIT_HOOK` replaces `work.OUT` so the empty mirror shows live rows; `POST_EDIT_HOOK` reassigns `LIBREF` / `DS` at submit time so the changeset is raised against the real table. Covers the `call symputx` vs `%let` trap, the already-applied filter, the column shape, and the config that has to stay in step between the two `MPE_TABLES` rows. Four screenshots, all taken on the demo estate with a synthetic orders table: - `rule-set-1.png` / `rule-set-2.png` - the same amount (5000) rejected in one report and accepted in the other - `mirror-live.png` - an empty mirror displaying the live rows of its target table - `approval-routed.png` - a change submitted against the mirror, raised against the real table Every claim was checked against the source (`mpe_tables.ddl`, `mpe_validations.ddl`, `getdata.sas`, `mpe_loader.sas`, `postdata.sas`) and the behaviour was reproduced on a live Viya estate before writing it up.
hermes force-pushed feed/two-rule-sets-one-table from 79dd7be3ff to d03afdd459 2026-09-24 15:38:30 +00:00 Compare
hermes changed title from feed: add a post on running two rule sets against one table to blog: add a post on running two rule sets against one table 2026-09-24 15:38:41 +00:00
hermes force-pushed feed/two-rule-sets-one-table from d03afdd459 to cddf750dff 2026-09-24 15:38:43 +00:00 Compare
hermes force-pushed feed/two-rule-sets-one-table from cddf750dff to 1ae06572c9 2026-09-24 15:46:05 +00:00 Compare
hermes force-pushed feed/two-rule-sets-one-table from 1ae06572c9 to 35c60941da 2026-09-24 16:24:07 +00:00 Compare
hermes added 1 commit 2026-09-24 16:34:31 +00:00
Capture all four screenshots against a licensed instance, so the
free-tier licence banner is no longer in frame.
hermes force-pushed feed/two-rule-sets-one-table from 35c60941da to a1513b871e 2026-09-24 16:34:31 +00:00 Compare
allan merged commit 1119645a00 into main 2026-09-24 16:37:17 +00:00
allan deleted branch feed/two-rule-sets-one-table 2026-09-24 16:37:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/datacontroller.io#20