Managing database operations at scale in Snowflake requires careful governance of background processing, compute resource usage, and security configurations. A well-designed operations strategy prevents task overlaps, secures sensitive data, and maintains compliance with industry standards.

This guide details the operations best practices that every Snowflake administrator and data engineer should implement.

1. Managing Task Hierarchies & Graphs

Snowflake Tasks allow scheduled execution of SQL statements. Multi-step workflows are configured using Directed Acyclic Graphs (DAGs), where a root task triggers dependent child tasks.

Best Practices:

  • Sequence via AFTER: Avoid scheduling dependent tasks using hardcoded start times. Use the AFTER clause to link child tasks, preventing overlaps.
  • Task State Suspension: When creating or updating a task graph, child tasks must be enabled before enabling the root task. Conversely, to modify the graph, suspend the root task first.
-- Creating a dependent task graph sequence CREATE OR REPLACE TASK RAW.TASK_LOAD_ORDERS WAREHOUSE = OPS_ETL_WH AFTER RAW.TASK_PIPELINE_ROOT AS INSERT INTO ANALYTICS.FACT_ORDERS SELECT * FROM RAW.STREAM_ORDERS; -- Resume tasks in order (Child first, then Root) ALTER TASK RAW.TASK_LOAD_ORDERS RESUME; ALTER TASK RAW.TASK_PIPELINE_ROOT RESUME;

2. Configuring Resource Monitors

Resource Monitors act as a safety net by setting credit spending limits on warehouses. They can be set to notify administrators, suspend the warehouse immediately, or suspend it after active workloads finish.

Always assign resource monitors to test and development warehouses where experimental workloads run.

-- Creating a resource monitor with a credit quota CREATE OR REPLACE RESOURCE MONITOR dev_test_monitor WITH CREDIT_QUOTA = 100 TRIGGERS ON 80 PERCENT DO NOTIFY ON 100 PERCENT DO SUSPEND ON 110 PERCENT DO SUSPEND_IMMEDIATELY; ALTER WAREHOUSE dev_wh SET RESOURCE_MONITOR = dev_test_monitor;

3. Enforcing CIS Security Benchmarks

Securing your Snowflake deployment involves auditing access privileges, verifying multi-factor authentication (MFA), and restricting warehouse endpoints. The **CIS Snowflake Foundations Benchmark** provides a guideline for these configurations.

🔒 Security Check Checklist:

1. Ensure the ACCOUNTADMIN role is restricted to a minimal number of trusted users.
2. Enforce MFA (Multi-Factor Authentication) for all administrative and user sessions.
3. Apply Dynamic Data Masking policies on columns carrying PII (like emails, phone numbers, or credit cards).

Summary

Following structured task graph setups, configuring resource monitor controls, and executing regular CIS compliance scoring protects your Snowflake account from both cost runaways and data leaks. To audit all of these systems from a single panel inside your Snowflake network, consider utilizing the SnowOps platform.