accessControl checkInAllObjects

Standard Workflow: Multi-Table Metadata Update

Scénario de test & Cas d'usage

Business Context

A Data Governance team needs to update the column labels and formats for multiple sensitive tables (Clients and Transactions) to ensure regulatory compliance. The tables must be locked (checked out) during the update to prevent concurrent access, and then released (checked in) immediately after the updates are applied.
About the Set : accessControl

Management of access rights and data security.

Discover all actions of accessControl
Data Preparation

Creation of two sample tables: CLIENTS and TRANSACTIONS.

Copied!
1 
2DATA casuser.clients;
3INPUT id name $;
4DATALINES;
51 Alice 2 Bob;
6 
7RUN;
8 
9DATA casuser.transactions;
10INPUT id amount;
11DATALINES;
121 100 2 200;
13 
14RUN;
15 

Étapes de réalisation

1
Explicitly checkout both tables to lock them for editing.
Copied!
1PROC CAS;
2 ACCESSCONTROL.checkOutObject / uri="cas/caslibs/casuser/tables/clients";
3 ACCESSCONTROL.checkOutObject / uri="cas/caslibs/casuser/tables/transactions";
4 ACCESSCONTROL.whatCheckoutsExist;
5RUN;
2
Perform metadata updates (simulated) and then release all locks using checkInAllObjects.
Copied!
1PROC CAS;
2 /* Simulate metadata update logic here */
3 PRINT "Updating metadata...";
4 /* Release locks on all objects */
5 ACCESSCONTROL.checkInAllObjects;
6 /* Verify locks are gone */
7 ACCESSCONTROL.whatCheckoutsExist;
8RUN;

Expected Result


Initially, `whatCheckoutsExist` should list both tables. After executing `checkInAllObjects`, the final `whatCheckoutsExist` must return an empty list, confirming both tables were successfully released.