Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
Note
A new version of the Databricks SQL API is now available. See Update to the latest Databricks SQL API version. To perform operations on new Databricks SQL alerts, see alerts
command group.
The alerts-legacy
command group within the Databricks CLI allows you to perform get, create, update, and delete operations on legacy alerts.
databricks alerts-legacy create
Create a legacy alert. An alert is a Databricks SQL object that periodically runs a query, evaluates a condition of its result, and notifies users or notification destinations if the condition was met.
databricks alerts-legacy create [flags]
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body
--parent string
The identifier of the workspace folder containing the object.
--rearm int
Number of seconds after being triggered before the alert rearms itself and can be triggered again.
databricks alerts-legacy delete
Delete a legacy alert. Deleted alerts are no longer accessible and cannot be restored. Unlike queries and dashboards, alerts cannot be moved to the trash.
databricks alerts-legacy delete ALERT_ID [flags]
Arguments
ALERT_ID
The ID of the alert to delete.
Options
Examples
The following example deletes an alert by ID:
databricks alerts-legacy delete 12345
databricks alerts-legacy get
Get a legacy alert.
databricks alerts-legacy get ALERT_ID [flags]
Arguments
ALERT_ID
The ID of the alert to get.
Options
Examples
The following example gets an alert by ID:
databricks alerts-legacy get 12345
databricks alerts-legacy list
Get a list of legacy alerts.
databricks alerts-legacy list [flags]
Options
Examples
The following example lists all alerts:
databricks alerts-legacy list
databricks alerts-legacy update
Update a legacy alert.
databricks alerts-legacy update ALERT_ID [flags]
Arguments
ALERT_ID
The ID of the alert to update.
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body
--rearm int
Number of seconds after being triggered before the alert rearms itself and can be triggered again.
Global flags
--debug
Whether to enable debug logging.
-h
or --help
Display help for the Databricks CLI or the related command group or the related command.
--log-file
string
A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.
--log-format
format
The log format type, text
or json
. The default value is text
.
--log-level
string
A string representing the log format level. If not specified then the log format level is disabled.
-o, --output
type
The command output type, text
or json
. The default value is text
.
-p, --profile
string
The name of the profile in the ~/.databrickscfg
file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT
is used.
--progress-format
format
The format to display progress logs: default
, append
, inplace
, or json
-t, --target
string
If applicable, the bundle target to use