Custom Rules

Custom Rules allow you run and manage SQL-based data quality rules alongside Metrics.

Deploying custom rules

  1. Click the "Add metrics" button anywhere within your catalog

  1. Name your Custom Rule and write the SQL you want it to execute. You also need to specify the alerting condition for this SQL query. You can pick one of three options:
    • Alert on rows returned
    • Alert on no rows returned
    • Alert if single value within range
      • This is only applicable if the SQL returns one single row with one single value


        Make sure you fully qualify your table names

        The SQL query will not execute with any context, so make sure you are fully qualifying your table names.

  1. Set the schedule, owner, and collections for the custom rule


Custom rule notifications

Custom Rules can only send notifications through Collections. If you want to get notified about alerting Custom Rules, add it to a collection with the appropriate notification channels configured.

Viewing custom rules

You can view all the custom rules for a specific data source in the Rules tab for that source. You can also view the list of custom rules within a collection in the Rules tab in the collection.


Rules are associated with sources

Since a custom rule is arbitrary SQL that is executed, it is associated directly with the source in which it is created. You can not currently associate a custom rule with a specific column or table.

Clicking into a rule will show the list of all runs that executed, the properties in the right hand pane, as well as a Debug tab. The Debug query for a custom rule will be populated if the rule is currently alerting.