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 ? 

PL_db
Databricks Employee
Databricks Employee

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

Aviral-Bhardwaj
Esteemed Contributor III

yes system table will have all details

AviralBhardwaj