cancel
Showing results for 
Search instead for 
Did you mean: 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results for 
Search instead for 
Did you mean: 

User ID, Username and Notebook not populated in History Tab

GMB
New Contributor II

Hi,

If I update a Tag on a table within a Noetbook as follows:

sql = f"""ALTER TABLE {silver_catalog}.public.tablename SET TAGS ('Is_published' = 'Y');"""
spark.sql(sql)
Then the User ID and Username, nor Notebook is populated when I look in the History tab after executing the code.
User ID and Username are capyured if I manually make the updates via the UI.
Is this by design or do I need to do something else to capture this information?
2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @GMB , It seems like you’re trying to capture the User ID and Username in the history tab of a notebook after executing some SQL code.

Typically, the User ID and Username are captured when changes are made via the User Interface (UI), as these changes are associated with a user action. However, when you execute code within a notebook, the changes are made by the system, not a specific user, so the User ID and Username might not be automatically captured.

 

To capture this information, you might need to manually add code to log the User ID and Username along with the changes. For example, you could modify your code to include logging statements that record the User ID and Username each time a change is made.

 

However, this behaviour can vary depending on the specific notebook environment you’re using. If you’re using Databricks, for instance, you might be able to retrieve some information about the n...

 

This could potentially include the User ID and Username, depending on the specific context attributes available in your environment.

Kaniz_Fatma
Community Manager
Community Manager

Hey there! Thanks a bunch for being part of our awesome community! 🎉 

We love having you around and appreciate all your questions. Take a moment to check out the responses – you'll find some great info. Your input is valuable, so pick the best solution for you. And remember, if you ever need more help , we're here for you! 

Keep being awesome! 😊🚀

 

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.

Request a New Group