Documentation & Tutorials

How to Use SnowOps Intelligence

Get up and running with cost optimization, real-time query suspension, security compliance scoring, and autonomous agents in your Snowflake account.

1. Quickstart Wizard 2. Cost Guardian 3. Cortex AI Assistant 4. Task Pipelines 5. CIS Benchmarks
[01] SETUP & ENVIRONMENT DETECT

The Quickstart Wizard

When you launch the Streamlit App for the first time from your Snowflake workspace, you will be greeted by the interactive Setup Wizard. This guide ensures your current user environment is compatible.

Required Role: ACCOUNTADMIN
  • 1

    Auto-Detect Your Role & Warehouse

    The wizard automatically checks if your active session role has the required schema access. It detects the active warehouse and verifies if there is a running cluster to load catalog metadata.

  • 2

    Verify Cortex AI Capability

    Cortex AI functions are required for natural language query explanation. The wizard tests model availability (e.g. llama3-8b) in your Snowflake region, showing warning alerts if access is restricted.

  • 3

    Initialize Metadata Tables

    With a single click on "Initialize Database Schemas", SnowOps automatically creates necessary operational tables (like DBT_MODEL_REGISTRY and QUERY_BENCHMARK) to hold historical run statistics.

[02] BUDGET PROTECTION

Cost Guardian & Suspends

Runaway queries and zombie warehouses can deplete your Snowflake credits rapidly. The Cost Guardian module provides active budget protection rules.

  • 1

    Configure Auto-Suspend Thresholds

    Review the warehouse grid to see which warehouses have auto-suspend set to "Never" or excessively high limits. Set these to 60-120 seconds for standard dev/test environments.

  • 2

    Detect Credit Consumption Anomalies

    The system uses statistical Z-scores of hourly credits to determine spikes. A spike exceeding 3.0 standard deviations is flagged as a CRITICAL anomaly, prompting Slack notifications.

  • 3

    Abort Running Runaway Queries

    Identify slow-running queries and click the "Suspend Query" button. SnowOps compiles a safe SYSTEM$ABORT_QUERY('query_id') request to kill the task instantly.

Suspension Command Reference

Admins can manually kill queries or suspend idle warehouses directly using these native Snowflake commands:

-- Kill a running query SELECT SYSTEM$ABORT_QUERY('01b4c9e8-0000-1c2d...'); -- Suspend a runaway warehouse ALTER WAREHOUSE OPS_ZOMBIE_WH SUSPEND;
[03] NATURAL LANGUAGE INTERFACE

Cortex AI Analyst

SnowOps integrates with Snowflake Cortex LLMs, enabling you to explain slow-performing queries, receive rewriting recommendations, and chat with your database structure.

  • 1

    Explain Query Complexity

    Navigate to the "AI Power Suite". Paste any complex SQL query. The system queries Cortex to decompose the query into a simple, non-technical bulleted summary.

  • 2

    Generate Optimized SQL rewrites

    Request a rewrite aimed at either minimizing cost or maximizing execution speed. Cortex rewrites standard joins to use partition pruning and prunes unused columns.

  • 3

    Setup the Cortex Analyst Stage

    Upload your semantic YAML model to the stage using SnowSQL. This metadata allows users to chat and generate database queries dynamically.

    PUT file://semantic_model.yaml @RAW.CORTEX_STAGE AUTO_COMPRESS=FALSE OVERWRITE=TRUE;
[04] DATA PIPELINE MONITORING

Task Graphs & Pipelines

Keep track of your dbt tasks, raw streams, and dynamic data pipeline runs directly from the monitoring dashboard.

  • 1

    View Directed Acyclic Graphs (DAGs)

    Inspect multi-level task chains. The system maps the root tasks to child tasks using the AFTER dependency configuration to display execution sequences.

  • 2

    Track Task Status & Failures

    Monitor dbt model statuses (SUCCESS, FAIL, RUNNING) inside the registry. Drill down into failed task logs to find compilation or permission issues.

  • 3

    Monitor Raw Data Streams

    Observe Stream action metrics (like INSERT checks and METADATA$ACTION values) to see if source data is loading into core tables.

DBT Run Schema Structure

The dbt model registry table captures model runs and allows you to view duration trends across warehouses:

DESCRIBE TABLE APP_ANALYTICS.DBT_MODEL_REGISTRY; -- Columns: -- MODEL_NAME, PROJECT_NAME, LAYER, MATERIALIZATION -- LAST_RUN_STATUS, LAST_RUN_AT, AVG_DURATION_SEC
[05] SECURITY COMPLIANCE

CIS Benchmarks & PII Scan

Maintain corporate data governance and audit trails using automated security compliance scorecards.

  • 1

    Audit User Authentication

    The scorecard audits the number of active users, checking if multi-factor authentication (MFA) is enabled for high-privilege roles like ACCOUNTADMIN.

  • 2

    Review Network Policies

    The dashboard scans for active network policies, ensuring database endpoints are restricted to whitelisted enterprise IP ranges.

  • 3

    PII & Sensitive Column Scanning

    Identify columns containing sensitive data (e.g. emails, phone numbers, SSNs). Create automated masking rules to redact data for lower-tier roles.

Have additional questions?

Reach out to our core developer queue for support, custom integrations, or bug reports.

Open Support Hub →