woensdag 4 november 2026

Databricks series : Deployment from Visual Studio Code (Part IV)

Introduction 

I've written a couple of blogposts about a small project to create a Databricks project. This blogpost is the fourth in the series. Now the fun part: we don’t have to manually create the Job in the Databricks interface. We’ll use the Databricks CLI for this!

Previous blogposts : 


Deploy the code

Open a terminal window in Visual Studio Code and authenticate with databricks auth login


 > databricks auth login --host https://dbc-xxxxxx-d21b.cloud.databricks.com/
--profile DBprofile


Validate the bundle

Next step is validate the code with databricks bundle validate


> databricks bundle validate

results in :

Name: DatabricksProject Target: dev Workspace: Host: https://dbc-xxxxxx-d21b.cloud.databricks.com User: xxxxxx@gmail.com Path: /Workspace/Users/xxxxx@gmail.com/.bundle/DatabricksProject/dev


Deploy the code

And deploy the code with databricks bundle deploy

> databricks bundle deploy

results in :

Uploading bundle files to /Workspace/Users/xxxxr@gmail.com/.bundle/DatabricksProject/dev/files... Created jobs.transfer_job Files: 1 uploaded, 0 deleted Resources: 1 created, 0 changed, 0 deleted, 0 unchanged


Databricks now deploys:

  • The Python code.
  • The job configuration.
  • The required project files.


Where is everything in Databricks?

In your Databricks Workspace, go to: Workspace → Users → your user → .bundle

There, you will typically find a structure such as:



Job-configuration

The Job itself is not necessarily found as a YAML file within the Workspace.

Go to: Workflows → Jobs & Pipelines

Search for: python-data-transfer

There, you can view:

  • The Job configuration.
  • The configured parameters.
  • The Python Script Task.
  • The execution history.
  • The logs and results.


The YAML configuration remains part of your local DAB project in Visual Studio Code. Databricks uses that configuration to create or update the Job.



So that's it. The code is deployed to Databricks with DAB


Hennie

Geen opmerkingen:

Een reactie posten