cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How do we get user list who accessed specific table or view in Unity catalog for last 6 months

saikrishna3390
New Contributor II

We have a business use case where we want to track users who accessed a specific table in Unity catalog for last 6 months . Is there a way where we can pull this data ? 

1 ACCEPTED SOLUTION

Accepted Solutions

PL_db
New Contributor III
New Contributor III

You can pull this data from system tables

 
SELECT
*
FROM
system.access.audit
WHERE
service_name = "unityCatalog"
AND user_identity.email = < user email >
AND action_name = "getTable"
AND request_params.full_name_arg = < table name >
AND (
event_date BETWEEN < start_date >
AND < end_date >
)

View solution in original post

2 REPLIES 2

PL_db
New Contributor III
New Contributor III

You can pull this data from system tables

 
SELECT
*
FROM
system.access.audit
WHERE
service_name = "unityCatalog"
AND user_identity.email = < user email >
AND action_name = "getTable"
AND request_params.full_name_arg = < table name >
AND (
event_date BETWEEN < start_date >
AND < end_date >
)

Aviral-Bhardwaj
Esteemed Contributor III

yes system table will have all details