Scénario de test & Cas d'usage
Verwaltung von Zugriffsrechten und Datensicherheit.
Entdecken Sie alle Aktionen von accessControlErstellung einer gesicherten Caslib und einer AML-Tabelle mit Dummy-Daten.
| 1 | |
| 2 | PROC CAS; |
| 3 | caslib aml_lib path='/tmp/aml_data' dataSource={srcType='path'} sessref=mysess; |
| 4 | |
| 5 | SOURCE hdfs; |
| 6 | |
| 7 | DATA aml_lib.blacklist; |
| 8 | LENGTH customer_id $10 reason $50; |
| 9 | customer_id='CUST001'; |
| 10 | reason='Suspicious transaction'; |
| 11 | OUTPUT; |
| 12 | customer_id='CUST002'; |
| 13 | reason='Sanctions list'; |
| 14 | OUTPUT; |
| 15 | |
| 16 | RUN; |
| 17 | |
| 18 | QUIT; |
| 19 |
| 1 | |
| 2 | PROC CAS; |
| 3 | ACCESSCONTROL.startTransaction; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
| 1 | |
| 2 | PROC CAS; |
| 3 | ACCESSCONTROL.checkOutObject / checkOutType='EXCLUSIVE' objectSelector={objType='TABLE', caslib='aml_lib', TABLE='blacklist'}; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
Die Aktion wird erfolgreich ausgeführt (Status OK). Die Tabelle 'blacklist' ist nun für die aktuelle Sitzung exklusiv reserviert. Andere Sitzungen können nicht schreiben, bis die Transaktion beendet wird.