11-10-2021 07:49 AM
Hi,
How can I export a Databricks repository in dbc format with databricks CLI ?
It is possible to make
databricks workspace export_dir path/to/dir .
but not
databricks repos export_dir path/to/dir .
Thanks for you answers
11-11-2021 06:20 AM
@Bertrand BURCKER Is your requirement to do it only from the CLI? Or to export the repos?
If it is to export the repos, you can export it as DBC format from the UI.
11-10-2021 08:11 AM
Hi @Bertrand BURCKER the repos cli does not support the export command.
Below are the supported commands by repos.
Commands:
create -- Creates a repo.
delete -- Deletes a repo.
get -- Lists information about a repo.
list -- Lists all available repos in the workspace.
update -- Updates information about a repo.
You can get this information by running
databricks repos --help
Please refer to https://docs.databricks.com/dev-tools/cli/repos-cli.html#repos-cli
11-10-2021 08:13 AM
Thanks for your answer.
But then, how can I export a sub-directory which is within a repos in dbc format with cli ?
11-10-2021 08:27 AM
I haven't tried it, but I believe the below might work. Please try it out and let us know.
As per the doc, https://docs.databricks.com/dev-tools/cli/workspace-cli.html#export-a-directory-from-a-workspace-to-...
You can export a directory using the below command.
databricks workspace export_dir --overwrite /Users/someone@example.com/my-folder /Users/me/Downloads/my-folder
You can use the same command and try to export the repos directory. The only change will be on the path.
databricks workspace export_dir --overwrite /Repos/someone@example.com/my-folder /Users/me/Downloads/my-folder
11-10-2021 08:31 AM
I already checked that.
First I don't know why my workspace is temporarily unavailable since always !
Second, I want actually to export from the repos and not from the workspace.
11-10-2021 11:56 PM
why dont you export from your git provider since you use repos?
In git you actually already have an export (assuming you have commited/pushed your code).
11-11-2021 04:29 AM
I would like to export in DBC format and I connot do so from my git provider.
11-11-2021 06:20 AM
11-11-2021 06:23 AM
I would like to export in DBC format with CLI.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group