Поделиться через


completion 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 completion command group in the Databricks CLI enables autocompletion of command groups, commands, and other programmatic references as you interact with the Databricks CLI through your shell interface.

Autocompletion scripts are provided for the following shells:

databricks completion bash

Generate the autocompletion script for the bash shell.

This script depends on the 'bash-completion' package. If it is not installed already, you can install it via your OS's package manager.

databricks completion bash [flags]

Options

--no-descriptions

    Disable completion descriptions

Global flags

Examples

To load completions in your current shell session:

source <(databricks completion bash)

To load completions for every new session, execute once:

Linux:

databricks completion bash > /etc/bash_completion.d/databricks

macOS:

databricks completion bash > $(brew --prefix)/etc/bash_completion.d/databricks

You will need to start a new shell for this setup to take effect.

databricks completion fish

Generate the autocompletion script for the fish shell.

databricks completion fish [flags]

Options

--no-descriptions

    Disable completion descriptions

Global flags

Examples

To load completions in your current shell session:

databricks completion fish | source

To load completions for every new session, execute once:

databricks completion fish > ~/.config/fish/completions/databricks.fish

You will need to start a new shell for this setup to take effect.

databricks completion powershell

Generate the autocompletion script for powershell.

databricks completion powershell [flags]

Options

--no-descriptions

    Disable completion descriptions

Global flags

Examples

To load completions in your current shell session:

databricks completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command to your powershell profile.

databricks completion zsh

Generate the autocompletion script for the zsh shell.

If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:

databricks completion zsh [flags]

Options

--no-descriptions

    Disable completion descriptions

Global flags

Examples

If shell completion is not already enabled in your environment, enable it by executing once:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

source <(databricks completion zsh)

To load completions for every new session, execute once:

Linux:

databricks completion zsh > "${fpath[1]}/_databricks"

macOS:

databricks completion zsh > $(brew --prefix)/share/zsh/site-functions/_databricks

You will need to start a new shell for this setup to take effect.

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