0
0
Snowflakecloud~20 mins

Access history and audit logging in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Access History & Audit Logging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Querying Access History for a User
What is the output of this query that retrieves access history for user 'JOHN_DOE' in the last 7 days?
Snowflake
SELECT event_time, user_name, object_name, action FROM SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY WHERE user_name = 'JOHN_DOE' AND event_time >= DATEADD(day, -7, CURRENT_TIMESTAMP());
A
[
  {"event_time": "2024-06-10 14:23:01", "user_name": "JOHN_DOE", "object_name": "SALES_DATA", "action": "SELECT"},
  {"event_time": "2024-06-12 09:15:45", "user_name": "JOHN_DOE", "object_name": "CUSTOMERS", "action": "INSERT"}
]
BSyntaxError: missing FROM keyword
CError: Table SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY does not exist
D[]
Attempts:
2 left
💡 Hint
Check the table name and filter conditions carefully.
🧠 Conceptual
intermediate
1:30remaining
Purpose of Access History in Snowflake
What is the primary purpose of the ACCESS_HISTORY view in Snowflake?
ATo store user passwords and authentication details
BTo monitor system resource usage like CPU and memory
CTo track all user activities on database objects for auditing and compliance
DTo manage user roles and permissions
Attempts:
2 left
💡 Hint
Think about what audit logging means in a database context.
Troubleshoot
advanced
2:30remaining
Troubleshooting Missing Audit Logs
You notice that recent user activities are not appearing in the ACCESS_HISTORY view. What could be a likely cause?
AThe ACCOUNT_USAGE schema is not enabled or data sharing is delayed
BUser has no SELECT privileges on the ACCESS_HISTORY view
CThe Snowflake account is in a paused state
DThe ACCESS_HISTORY view only shows data older than 30 days
Attempts:
2 left
💡 Hint
Consider how Snowflake replicates usage data to ACCOUNT_USAGE.
🔀 Workflow
advanced
3:00remaining
Setting Up Audit Logging for Compliance
Which sequence of steps correctly sets up audit logging access for a security team in Snowflake?
A2,1,3,4
B1,2,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint
Think about granting access before verification.
Best Practice
expert
3:00remaining
Best Practice for Retaining Audit Logs
What is the recommended best practice for retaining audit logs in Snowflake for long-term compliance?
ADisable ACCESS_HISTORY to improve query performance
BRely solely on the default retention period of ACCESS_HISTORY in Snowflake
CDelete old audit logs manually to save storage
DPeriodically export ACCESS_HISTORY data to an external secure storage like AWS S3
Attempts:
2 left
💡 Hint
Think about compliance requirements for long-term data retention.