Manage Datafold monitors via version-controlled YAML for greater scalability, governance, and flexibility in code-based workflows.
monitors.yaml
and place it in the root directory, but neither of these choices are hard requirements.
Leave the file blank for now—we’ll come back to it in a moment.
.github/workflows/
using the following template. Be sure to tailor it to your particular setup:
freshness
row_count
cardinality
uniqueness
minimum
maximum
average
median
sum
std_dev
fill_rate
SDT Type | Monitor-as-Code Type | Supported Variables | Variable Type |
---|---|---|---|
Unique | unique | - | - |
Not Null | not_null | - | - |
Accepted Values | accepted_values | accepted_values | Collection with values |
Referential Integrity | referential_integrity | - | - |
Numeric Range | numeric_range | minimum | Single value |
maximum | Single value |
include_tables
and exclude_tables
to fine-tune your selection.
Can I still create/manage monitors in the app if I'm using monitors as code?
What happens to a monitor in the app if it's removed from the code?
--dangling-monitors-strategy [delete|pause]
flag to your run
command to either delete or pause notifications if they’re removed from your code. For example:How do I delete or pause all of my monitors?
--dangling-monitors-strategy [delete|pause]
flag to your run
command and replace the contents of your YAML file with the following:Can I use the app to modify monitors managed in code?
Can I export monitors I've created in the app so I can manage them in code?
id
field in the YAML. If you want to preserve monitor history, keep the id
field as this will update the original monitor to be managed as code. If you don’t want to preserve your monitor history, delete the id
field to create a new monitor as code while keeping the original monitor intact.