Share via


clean-rooms 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 clean-rooms command group within the Databricks CLI allows you to manage clean rooms. A clean room uses Delta Sharing and serverless compute to provide a secure and privacy-protecting environment where multiple parties can work together on sensitive enterprise data without direct access to each other's data. See What is Azure Databricks Clean Rooms?.

databricks clean-rooms create

Create a new clean room with the specified collaborators. This method is asynchronous; the returned name field inside the clean_room field can be used to poll the clean room status, using the get method. When this method returns, the clean room will be in a PROVISIONING state, with only name, owner, comment, created_at and status populated. The clean room will be usable once it enters an ACTIVE state.

The caller must be a metastore admin or have the CREATE_CLEAN_ROOM privilege on the metastore.

databricks clean-rooms create [flags]

Arguments

None

Options

--comment string

    Comment for the clean room.

--json JSON

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

--name string

    The name of the clean room.

--owner string

    This is Databricks username of the owner of the local clean room securable for permission management.

Global flags

Examples

The following example creates a clean room with a name and owner:

databricks clean-rooms create --name "my-clean-room" --owner "someone@example.com"

The following example creates a clean room with a comment:

databricks clean-rooms create --name "analytics-clean-room" --owner "someone@example.com" --comment "Clean room for analytics collaboration"

databricks clean-rooms create-output-catalog

Create the output catalog of the clean room.

databricks clean-rooms create-output-catalog CLEAN_ROOM_NAME [flags]

Arguments

CLEAN_ROOM_NAME

    Name of the clean room.

Options

--catalog-name string

    The name of the output catalog in Unity Catalog.

--json JSON

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

Global flags

Examples

The following example creates an output catalog for a clean room:

databricks clean-rooms create-output-catalog my-clean-room --catalog-name "my_output_catalog"

databricks clean-rooms delete

Delete a clean room. After deletion, the clean room will be removed from the metastore. If the other collaborators have not deleted the clean room, they will still have the clean room in their metastore, but it will be in a DELETED state and no operations other than deletion can be performed on it.

databricks clean-rooms delete NAME [flags]

Arguments

NAME

    Name of the clean room.

Options

Global flags

Examples

The following example deletes a clean room:

databricks clean-rooms delete my-clean-room

databricks clean-rooms get

Get the details of a clean room given its name.

databricks clean-rooms get NAME [flags]

Arguments

NAME

    Name of the clean room.

Options

Global flags

Examples

The following example gets details of a clean room:

databricks clean-rooms get my-clean-room

The following example gets clean room details using a specific profile:

databricks clean-rooms get analytics-clean-room --profile production

databricks clean-rooms list

List all clean rooms of the metastore. Only clean rooms the caller has access to are returned.

databricks clean-rooms list [flags]

Arguments

None

Options

--page-size int

    Maximum number of clean rooms to return (i.e., the page length).

--page-token string

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

Global flags

Examples

The following example lists all accessible clean rooms:

databricks clean-rooms list

The following example lists clean rooms with a specific page size:

databricks clean-rooms list --page-size 10

databricks clean-rooms update

Update a clean room. The caller must be the owner of the clean room, have MODIFY_CLEAN_ROOM privilege, or be metastore admin.

When the caller is a metastore admin, only the owner field can be updated.

databricks clean-rooms update NAME [flags]

Arguments

NAME

    Name of the clean room.

Options

--json JSON

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

Global flags

Examples

The following example updates a clean room using JSON configuration:

databricks clean-rooms update my-clean-room --json '{"comment": "Updated clean room description"}'

The following example updates a clean room owner (metastore admin only):

databricks clean-rooms update my-clean-room --json '{"owner": "new-someone@example.com"}'

The following example updates a clean room using a JSON file:

databricks clean-rooms update my-clean-room --json @update-config.json

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