Titan Core
  • Overview
  • Getting Started
  • Working With Resources
  • Blueprint
  • GitHub Action
  • Resources
    • APIAuthenticationSecurityIntegration
    • APIIntegration
    • AccountParameter
    • AggregationPolicy
    • Alert
    • AuthenticationPolicy
    • AzureStorageIntegration
    • ComputePool
    • Database
    • DatabaseRole
    • DynamicTable
    • EmailNotificationIntegration
    • EventTable
    • ExternalAccessIntegration
    • ExternalStage
    • FailoverGroup
    • FutureGrant
    • GCSStorageIntegration
    • GenericSecret
    • GlueCatalogIntegration
    • Grant
    • GrantOnAll
    • HybridTable
    • ImageRepository
    • InternalStage
    • JSONFileFormat
    • JavascriptUDF
    • MaterializedView
    • NetworkPolicy
    • NetworkRule
    • OAuthSecret
    • ObjectStoreCatalogIntegration
    • PackagesPolicy
    • ParquetFileFormat
    • PasswordPolicy
    • PasswordSecret
    • Pipe
    • PythonStoredProcedure
    • PythonUDF
    • ReplicationGroup
    • ResourceMonitor
    • Role
    • RoleGrant
    • S3StorageIntegration
    • Schema
    • Sequence
    • Service
    • SessionPolicy
    • Share
    • SnowflakePartnerOAuthSecurityIntegration
    • SnowservicesOAuthSecurityIntegration
    • StageStream
    • Table
    • TableStream
    • Tag
    • Task
    • User
    • View
    • ViewStream
    • Warehouse
Powered by GitBook
On this page
  • Examples
  • Python
  • YAML
  • Fields
  1. Resources

Alert

PreviousAggregationPolicyNextAuthenticationPolicy

Last updated 11 months ago

Alerts trigger notifications when certain conditions are met.

Examples

Python

alert = Alert(
    name="some_alert",
    warehouse="some_warehouse",
    schedule="USING CRON * * * * *",
    condition="SELECT COUNT(*) FROM some_table",
    then="CALL SYSTEM$SEND_EMAIL('example@example.com', 'Alert Triggered', 'The alert condition was met.')",
)

YAML

alerts:
  - name: some_alert
    warehouse: some_warehouse
    schedule: USING CRON * * * * *
    condition: SELECT COUNT(*) FROM some_table
    then: CALL SYSTEM$SEND_EMAIL('example@example.com', 'Alert Triggered', 'The alert condition was met.')

Fields

  • name (string, required) - The name of the alert.

  • schedule (string) - The schedule for the alert to run on.

  • condition (string) - The condition for the alert to trigger on.

  • then (string) - The query to run when the alert triggers.

  • comment (string) - A comment for the alert. Defaults to None.

  • tags (dict) - Tags for the alert. Defaults to None.

warehouse (string or ) - The name of the warehouse to run the query on.

owner (string or ) - The owner role of the alert. Defaults to "SYSADMIN".

Snowflake Documentation
Warehouse
Role