Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
But when I do so, I'm able to capture everything except the current_user() who is running the job, How can I capture it in my custom audit log in my job itself.
Databricks provides system tables that store audit logs. You can query these tables to retrieve information about job executions, including user identities.
Within your Databricks job, you can add custom logging to capture the current user.
Use thedbutils.notebook.getContext().tags().get("user")method to retrieve the current userโs email address.
Connect with Databricks Users in Your Area
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.