cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i generate an audit report that lists all Data object privileges in my catalog

sajith_appukutt
Honored Contributor II
 
1 ACCEPTED SOLUTION

Accepted Solutions

sajith_appukutt
Honored Contributor II

You could leverage SHOW GRANT which displays the privileges

SHOW GRANT [<user>] ON [CATALOG | DATABASE <database-name> | TABLE <table-name> | VIEW <view-name> | FUNCTION <function-name> | ANONYMOUS FUNCTION | ANY FILE]

You could use this code snippet to schedule a daily job that writes out this data to delta which would serve as historical audit report.

View solution in original post

1 REPLY 1

sajith_appukutt
Honored Contributor II

You could leverage SHOW GRANT which displays the privileges

SHOW GRANT [<user>] ON [CATALOG | DATABASE <database-name> | TABLE <table-name> | VIEW <view-name> | FUNCTION <function-name> | ANONYMOUS FUNCTION | ANY FILE]

You could use this code snippet to schedule a daily job that writes out this data to delta which would serve as historical audit report.