cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Generate and Deploy Wheel file to the Databricks Cluster from VS Code

sunilp
New Contributor

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.

1 REPLY 1

VZLA
Databricks Employee
Databricks Employee

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:

  1. 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.
  2. 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!

Connect with Databricks Users in Your Area

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