Scénario de test & Cas d'usage
Create a sample customer accounts table with sensitive and non-sensitive columns.
| 1 | DATA casuser.customer_accounts; |
| 2 | LENGTH AccountID $ 10 CustomerName $ 50 SSN $ 11; |
| 3 | INPUT AccountID $ CustomerName $ Balance SSN $; |
| 4 | DATALINES; |
| 5 | ACC1001 'John Smith' 15000 123-456-7890 |
| 6 | ACC1002 'Jane Doe' 250000 987-654-3210 |
| 7 | ACC1003 'Peter Jones' 5200 555-444-3333 |
| 8 | ; |
| 9 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.loadTable / |
| 3 | caslib='CASUSER' |
| 4 | path='customer_accounts.sashdat' |
| 5 | casOut={name='CUSTOMER_ACCOUNTS', replace=true}; |
| 6 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.attribute / |
| 3 | task='ADD' |
| 4 | name='CUSTOMER_ACCOUNTS' |
| 5 | caslib='CASUSER' |
| 6 | SET='DataLineage' |
| 7 | attributes={{key='DataOwner', value='Analytics Dept'}, {key='SourceSystem', value='CRM_PROD'}}; |
| 8 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.attribute / |
| 3 | task='ADD' |
| 4 | name='CUSTOMER_ACCOUNTS' |
| 5 | caslib='CASUSER' |
| 6 | SET='Security' |
| 7 | attributes={{key='PII_Classification', value='Confidential', column='CustomerName'}, {key='PII_Classification', value='Highly Confidential', column='SSN'}}; |
| 8 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.attribute / |
| 3 | task='UPDATE' |
| 4 | name='CUSTOMER_ACCOUNTS' |
| 5 | caslib='CASUSER' |
| 6 | SET='DataLineage' |
| 7 | attributes={{key='LastRefreshDate', value='2025-11-26T10:00:00Z'}}; |
| 8 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.attribute / |
| 3 | task='EXPORT' |
| 4 | name='CUSTOMER_ACCOUNTS' |
| 5 | caslib='CASUSER' |
| 6 | TABLE='AUDIT_ATTRIBUTES'; |
| 7 | |
| 8 | TABLE.fetch / TABLE='AUDIT_ATTRIBUTES'; |
| 9 | RUN; |
| 10 | QUIT; |
A new CAS table 'AUDIT_ATTRIBUTES' is created. It should contain four rows: two for the table-level attributes ('DataOwner', 'LastRefreshDate') and two for the column-level PII attributes ('PII_Classification' for 'CustomerName' and 'SSN'). The value for 'LastRefreshDate' should be the updated one.