Databricks Audit Logs, Where the log files are stored? How to read them?

Mohammad Saber 591 Reputation points
2023-02-15T22:29:26.9266667+00:00

Hi,

 

I want to access the Databricks Audit Logs to check user activity. For example, the number of times that a table was viewed by a user.

 

I have a few questions in this regard.

 

  1. Where the log files are stored? Are they stored on DBFS?

 

  1. Can I read log files and save them as a table (let's say a delta table)?

If Log files are saved somewhere like DBFS, I might be able to read files by SQL language. 

 

I'd like to know if there is any way to get Logs as a Databricks table. I mean, saving the Logs as a table.

 

Also, I want it to work continuously; adding new logs to the table when a new event happens (not just one time).

 

I am not sure if I can use SQL language for this purpose or not (instead of Rest API).

 

Any idea how to do that?

Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.


2 answers

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    5 deleted comments

    Comments have been turned off. Learn more

  2. PRADEEPCHEEKATLA 91,946 Reputation points
    2023-02-20T08:17:51.59+00:00

    Hello @Mohammad Saber

    For SQL persona, you don't get logs ingested into Log Analytics.
    Monitor a SQL warehouse: You can view the number of queries handled by the warehouse and the number of clusters allocated to the warehouse.

    1. Click Endpoints Icon-5 SQL Warehouses in the sidebar.
    2. Click a SQL warehouse.
    3. Click Monitoring.

    ADB-SQL-Query

    OR

    Directly from Query History:

    User's image

    Hope this helps.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.