Generate and Deploy Wheel file to the Databricks Cluster from VS Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 09:54 PM
I have a scenario where I need to generate a versioned Wheel file and upload it automatically to a Databricks cluster using VS Code, without creating workflows or jobs like those in Databricks Bundles.
My use case is to later use the Wheel file as an importable package in another notebook.
How can I achieve this using the databricks.yml file?
I can use the Databricks bundle, but it requires some tasks to be created in order to generate the wheel file, and I don't need those tasks to be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 08:45 AM
Thanks for your question! To automate generating and deploying a versioned Wheel file to a Databricks cluster directly from VS Code, you can try and follow these steps:
-
Use VS Code Tasks[1]: Configure a
tasks.json
file in your project’s.vscode
directory to define automated steps:- Build the Wheel file using
python setup.py bdist_wheel
. - Use the Databricks CLI to upload the Wheel file to a workspace directory.
- Install the Wheel on the Databricks cluster.
- Build the Wheel file using
-
Example Task Configuration: Define a VS Code task for automation. The first task builds the Wheel, and the second uploads and installs it using the Databricks CLI.
[1] https://code.visualstudio.com/Docs/editor/tasks
This setup allows you to trigger the process directly from VS Code’s task runner, ensuring automation and alignment with your workflow. Let me know if you need more specifics!

