New to Kestra?
Use blueprints to kickstart your first workflows.
Watch Unity Catalog for new tables, alert Slack on naming convention violations, and log the result for data platform teams.
A landing or staging schema with a naming convention nobody enforces drifts the moment a one-off script or a manual notebook run creates a table that does not follow it; Unity Catalog itself has no built-in naming policy check, it accepts whatever name a CREATE TABLE statement sends. This blueprint watches a governed schema continuously and flags the exact table the moment it appears, not during the next schema audit someone remembers to run.
This blueprint was created by Mohit Jeswani.
watch_new_tables (io.kestra.plugin.databricks.unitycatalog.table.Trigger) polls
catalog_name.schema_name every 5 minutes and fires one execution per batch of newly
created tables, tracking what it has already seen in the namespace KV Store so the same
table is never reported twice.evaluate (io.kestra.plugin.core.output.OutputValues) checks each new table's own name
(after the last dot in its fully qualified name) against required_name_prefix with a
jq filter.route (io.kestra.plugin.core.flow.If):summary logs the new-table count and severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example an expired Databricks token.unitycatalog.table.Trigger used as a standing naming-compliance sentinel, distinct from
this repo's existing Databricks Unity Catalog blueprint, which audits grant permissions
via the CLI rather than reacting to new table creation.Unity Catalog reports its tables on request; it does not keep a schedule, compare a new
table's name against a convention you declare, or notify a Slack channel when one breaks
it. Kestra keeps required_name_prefix as a flow input, turns a naming violation into a
Slack page naming the exact table, and keeps a full execution history of every table ever
detected.
This flow calls the Databricks Unity Catalog API directly over HTTPS; there is no official
local Unity Catalog emulator, so watch_new_tables cannot be exercised against a local
Docker container.
DATABRICKS_HOST / DATABRICKS_TOKEN: the workspace URL and personal access token used
by watch_new_tables. In Kestra OSS, provide them as the base64-encoded environment
variables SECRET_DATABRICKS_HOST and SECRET_DATABRICKS_TOKEN.SLACK_WEBHOOK_URL: used by alert and the errors block. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Default | Purpose |
|---|---|---|
required_name_prefix |
stg_ |
Prefix every new table in the monitored schema must start with |
{{ trigger.tables }} / .fullNames / .size: the new tables this poll detected, as the
Trigger reports them (without column definitions; chain unitycatalog.table.Get for
full schema).{{ outputs.evaluate.values.noncompliant_tables }} / .new_table_count: the violating
table names, semicolon-joined, and how many tables were detected in total.{{ outputs.evaluate.values.severity }}: OK or UNAPPROVED_TABLE_NAME.on: CREATE (the default) means the first evaluation after enabling this trigger reports
every existing table in the schema as "new," since the KV-stored state starts empty;
expect one large initial alert if the schema already has non-compliant tables.inputs: to override per execution; catalogName, schemaName, and
interval are trigger-level configuration set directly on the trigger block.DATABRICKS_HOST, DATABRICKS_TOKEN, and SLACK_WEBHOOK_URL secrets.catalogName and schemaName on watch_new_tables to a real governed schema.on: CREATE reports every existing table as new on first run.required_name_prefix to confirm a fresh alert fires.on to CREATE_OR_UPDATE to also flag a compliant table later renamed or recreated
to break the convention.io.kestra.plugin.databricks.unitycatalog.table.Get on each non-compliant table to
include its owner and creation timestamp in the alert.evaluate step.