Database / Snowflake Interview Questions
What is the Snowflake Access History feature and how does it support audit and compliance?
Access History records every query that accessed specific database objects — tracking exactly which tables and columns were read or written, by which user, running which role, at what time. It is the foundation for data lineage auditing, regulatory compliance (GDPR, CCPA, HIPAA), and detecting over-privileged accounts.
The primary view is SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY. Key columns include:
QUERY_IDandQUERY_START_TIME— the query being audited.USER_NAMEandROLE_NAME— who ran the query.DIRECT_OBJECTS_ACCESSED— tables/views the SQL explicitly named.BASE_OBJECTS_ACCESSED— the underlying base tables behind any views, including column-level granularity.OBJECTS_MODIFIED— tables written to via DML/COPY.
Access History has a latency of up to 3 hours before records appear in the ACCOUNT_USAGE views. For compliance-sensitive queries, this means near-real-time auditing is not possible through this view alone — pair it with query history and login history for a fuller picture.
Practical use: run a weekly query across ACCESS_HISTORY and TAG_REFERENCES to produce a report of which users accessed columns tagged as sensitivity=high, satisfying GDPR Article 30 record-keeping requirements.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
