Custom SQL monitoring
Overview
The Custom SQL monitor is used when Sifflet's templates are not enough. It allows the specification of
SQL
The SQL parameter requires a SQL that is able to run on the database that your asset lives on. It will execute with the default database and schema of the asset you selected but you are able to join to other tables as you would in SQL.
Success and Failure
The Custom SQL Monitor will fail whenever rows are returned by the query.
If you want the custom SQL monitor to error whenever there are any rows with a value over 100 you simply need to write a request that fetches those rows.
SELECT * FROM orders where value > 100
AI Features
AI-Driven SQL generation
Sifflet's AI Assistant can generate SQL for you!
Sifflet leverages the power of all the documented context of your catalog to better understand your prompts. If columns are named in complex ways, having descriptions in the catalog will help the AI agent generate better SQL
Fix SQL with AI for Custom SQL Monitors
Sometimes it's hard to write SQL correctly, if the Test Run fails Sifflet will now display the option to use AI to attempt to generate correct SQL.
Updated 2 months ago