โ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