Skip to main content

Snowflake

Anomstack supports Snowflake as a data source for your metrics.

Configuration

Configure Snowflake in your metric batch's config.yaml:

db: "snowflake"
table_key: "YOUR_DATABASE.SCHEMA.TABLE"
metric_batch: "your_metric_batch_name"
ingest_cron_schedule: "*/60 * * * *" # When to run the ingestion
ingest_sql: >
select
current_timestamp() as metric_timestamp,
'metric_name' as metric_name,
your_value as metric_value
from your_table;

Authentication

You can authenticate with Snowflake using:

  • Username and password
  • Key pair authentication
  • OAuth
  • Environment variables

Examples

Check out the Snowflake example for a complete working example.

Best Practices

  • Use appropriate warehouse sizing
  • Consider query optimization
  • Implement proper access controls
  • Use parameterized queries

Limitations

  • Warehouse credits consumption
  • Query timeout limits
  • Concurrent query limits