Share via


global-init-scripts command group

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.

The global-init-scripts command group within the Databricks CLI enables workspace administrators to configure global initialization scripts for their workspace. These scripts run on every node in every cluster in the workspace. See Global init scripts.

databricks global-init-scripts create

Create a new global init script in this workspace.

databricks global-init-scripts create NAME SCRIPT [flags]

Arguments

NAME

    The name of the script

SCRIPT

    The Base64-encoded content of the script.

Options

--enabled

    Specifies whether the script is enabled.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--position int

    The position of a global init script, where 0 represents the first script to run, 1 is the second script to run, in ascending order.

Global flags

databricks global-init-scripts delete

Delete a global init script.

databricks global-init-scripts delete SCRIPT_ID [flags]

Arguments

SCRIPT_ID

    The ID of the global init script.

Options

Global flags

databricks global-init-scripts get

Get all the details of an init script, including its Base64-encoded contents.

databricks global-init-scripts get SCRIPT_ID [flags]

Arguments

SCRIPT_ID

    The ID of the global init script.

Options

Global flags

databricks global-init-scripts list

Get a list of all global init scripts for this workspace. This returns all properties for each script but not the script contents. To retrieve the contents of a script, use the get command.

databricks global-init-scripts list [flags]

Arguments

None

Options

Global flags

databricks global-init-scripts update

Update a global init script, specifying only the fields to change. All fields are optional. Unspecified fields retain their current value.

databricks global-init-scripts update SCRIPT_ID NAME SCRIPT [flags]

Arguments

SCRIPT_ID

    The ID of the global init script.

NAME

    The name of the script

SCRIPT

    The Base64-encoded content of the script.

Options

--enabled

    Specifies whether the script is enabled.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

--position int

    The position of a script, where 0 represents the first script to run, 1 is the second script to run, in ascending order.

Global flags

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