Snowflake is a cloud-based data platform designed to unify data storage, processing, and analytics across multiple clouds. It enables seamless data integration, high-performance analytics, and scalable solutions for diverse workloads, supported by a secure, fully managed framework. With its unique architecture separating compute and storage, Snowflake delivers flexibility, simplicity, and cost-efficiency for businesses of all sizes.
To cancel or manage various aspects of a Snowflake account or queries, you need to follow these steps based on what you want to achieve:
To cancel a running SQL query in Snowflake, you can use the SYSTEM$CANCEL_QUERY
function. Here’s how you can do it:
Obtain the query ID from the History page in the Snowflake web interface. Query IDs are UUID text strings with hyphens.
Use the SYSTEM$CANCEL_QUERY
function with the query ID:
sql
SELECT SYSTEM$CANCEL_QUERY(‘query_id_here’);
For example:
sql
SELECT SYSTEM$CANCEL_QUERY(‘d5493e36-5e38-48c9-a47c-c476f2111ce5’);
If you need to cancel queries executed by another user, you must have a role with the necessary privileges such as OWNERSHIP on the user who executed the operation, or OPERATE or OWNERSHIP on the warehouse that is running the operation.
To cancel a Snowflake trial account, you must contact Snowflake Support directly. Here are the steps:
To delete a Snowflake account, you need to drop it as an organization administrator. Here’s how:
Log in to a different account with the ORGADMIN role, as you cannot drop the account you are currently logged into.
Use Snowsight or SQL to drop the account. For example, using SQL:
sql
DROP ACCOUNT my_account GRACE_PERIOD_IN_DAYS = 14;
Define a grace period during which the account can be restored. The minimum grace period is 3 days and the maximum is 90 days.
To restore a dropped account within the grace period, use the UNDROP ACCOUNT
command:
sql
UNDROP ACCOUNT myaccount123;
.
By following these instructions, you can manage and cancel various aspects of your Snowflake account and queries effectively.