Skip to content

Commit

Permalink
Snowflake queries minor fixes (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-youwakim authored Apr 13, 2023
1 parent 62427dc commit fea79d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SnowflakeQuery: >
end_time
FROM snowflake.account_usage.query_history
WHERE
p_occurs_since('1 h', start_time)
DATEDIFF(HOUR, start_time, CURRENT_TIMESTAMP) < 24
AND execution_status = 'SUCCESS'
AND query_type = 'GRANT'
AND query_text ILIKE '%to%public%'
Expand Down
2 changes: 1 addition & 1 deletion queries/snowflake_queries/snowflake_user_created_query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SnowflakeQuery: >
role_name
FROM snowflake.account_usage.query_history
WHERE
p_occurs_since('24 h', start_time)
DATEDIFF(HOUR, start_time, CURRENT_TIMESTAMP) < 24
AND execution_status = 'SUCCESS'
AND query_type = 'CREATE_USER'
AND query_text ILIKE '%create%user%'
Expand Down
2 changes: 1 addition & 1 deletion queries/snowflake_queries/snowflake_user_enabled_query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SnowflakeQuery: >
role_name
FROM snowflake.account_usage.query_history
WHERE
p_occurs_since('24 h', start_time)
DATEDIFF(HOUR, start_time, CURRENT_TIMESTAMP) < 24
AND execution_status = 'SUCCESS'
AND query_type = 'ALTER_USER'
AND (query_text ILIKE '%alter user%set disabled = false%'
Expand Down

0 comments on commit fea79d6

Please sign in to comment.