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! ๐Ÿ˜Š๐Ÿš€

 

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!