Share via


connections 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 connections command group within the Databricks CLI allows you to create and manage connections to external data sources. See Connect to data sources and external services.

databricks connections create

Create a new connection to an external data source. It allows users to specify connection details and configurations for interaction with the external server.

databricks connections create [flags]

Options

--comment string

    User-provided free-form text description.

--json JSON

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

--read-only

    If the connection is read only.

Global flags

Examples

The following example creates a connection with a comment:

databricks connections create --comment "Connection to external database"

The following example creates a read-only connection:

databricks connections create --read-only

databricks connections delete

Delete the connection that matches the supplied name.

databricks connections delete NAME [flags]

Arguments

NAME

    The name of the connection to be deleted.

Options

Global flags

Examples

The following example deletes a connection named my-connection:

databricks connections delete my-connection

databricks connections get

Get a connection from its name.

databricks connections get NAME [flags]

Arguments

NAME

    Name of the connection.

Options

Global flags

Examples

The following example gets information about a connection named my-connection:

databricks connections get my-connection

databricks connections list

List all connections.

databricks connections list [flags]

Options

--max-results int

    Maximum number of connections to return.

--page-token string

    Opaque pagination token to go to next page based on previous query.

Global flags

Examples

The following example lists all connections:

databricks connections list

The following example lists connections with a maximum of 10 results:

databricks connections list --max-results 10

databricks connections update

Update the connection that matches the supplied name.

databricks connections update NAME [flags]

Arguments

NAME

    Name of the connection.

Options

--json JSON

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

--new-name string

    New name for the connection.

--owner string

    Username of current owner of the connection.

Global flags

Examples

The following example renames a connection:

databricks connections update my-connection --new-name my-renamed-connection

The following example changes the owner of a connection:

databricks connections update my-connection --owner someone@example.com

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