databricks / databricks-cli

(Legacy) Command Line Interface for Databricks
Other
386 stars 234 forks source link

Python files being to converted to notebooks when using Databricks CLI #685

Open sachamourier96 opened 1 month ago

sachamourier96 commented 1 month ago

Hello, I am using the attached piece of code to import both notebooks and python files from my git repo, and am writing them to a Workspace folder. However, when running the attached code, all of my Python files get converted to notebooks, which is not what I want. I have tried several approaches but still cannot manage to make it work. Has someone found a way to avoid this convertion? I want my Python files to remain Python files to be able to use them as Python modules. Thanks a lot in advance, Sacha

Screenshot 2024-09-22 111325
alexott commented 1 month ago

You need to use new CLI! https://github.com/databricks/cli & https://docs.databricks.com/en/dev-tools/cli/install.html

From the docs:

The legacy Databricks CLI is in an Experimental state. Databricks plans no new feature work for the legacy Databricks CLI at this time.

sachamourier96 commented 1 month ago

Hi @alexott, I have tried to use the latest version but it seems like I am unable to use a version that's above 0.18. Do you have a way to go through this issue ? Thanks for your help, Sacha

alexott commented 1 month ago

new CLI isn't Python based - follow the documentation on how to install it