Stefan Koch
Stefan Koch
Databricks CLI Step by Step - Part 2 - Workspace commands

Databricks CLI Step by Step - Part 2 - Workspace commands

Stefan Koch Stefan Koch
· · 2 min read

Im 2. Teil meiner Blog-Serie zum Thema Databricks CLI behandle ich die Workspace Commandos.

Inhalt der Blogseries

Nachfolgend aufgelistet die jeweiligen Blogbeiträge mit einer kurzen Beschreibung.

Intro Part 2 - Workspace commands

fs group

alt text https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/fs-commands

Usage:

databricks fs [command]

View help:

databricks fs -h

Available Commands:

  cat         Show file content.
  cp          Copy files and directories.
  ls          Lists files.
  mkdir       Make directories.
  rm          Remove files and directories.

fs commands require volume paths to begin with dbfs:/Volumes and require directory and file paths in DBFS to begin with dbfs:/.

ls

list root of dbfs

databricks fs ls dbfs:/

Result:
alt text

list Databricks datasets

databricks fs ls dbfs:/databricks-datasets

Result:
alt text

list files in a volume

Damit man die Files in einem Volume auflisten kann, muss man im Pfad den Catalog, Schema und das entsprechende Volume auflisten. Der Befehel setzt sich wie folgt zusammen:

databricks fs ls dbfs:/Volumes/<CATALOG>/<SCHEMA>/<VOLUME-NAME>

Als Beispiel habe ich im Catalog “main” ein Schema “test” und darin ein Volume “test_volume”: alt text

databricks fs ls dbfs:/Volumes/main/test/test_volume

Resultat:
alt text

git-credentials group

alt text

Usage:

databricks git-credentials [command]

View help:

databricks git-credentials -h

Available Commands:

create      Create a credential entry.
delete      Delete a credential.
get         Get a credential entry.
list        Get Git credentials.
update      Update a credential.

repos group

alt text Usage:

databricks repos [command]

View help:

databricks repos -h

Available Commands:

create                Create a repo.
delete                Delete a repo.
get                   Get a repo.
list                  Get repos.
update                Update a repo.

Permission Commands:

get-permission-levels Get repo permission levels.
get-permissions       Get repo permissions.
set-permissions       Set repo permissions.
update-permissions    Update repo permissions.

secrets group

alt text Usage:

View help:

Available Commands:

workspace group

alt text Usage:

View help:

Available Commands:

Related Articles

Comments

Comments are powered by giscus. You need a GitHub account to comment.