File tree Expand file tree Collapse file tree 21 files changed +256
-14
lines changed
Expand file tree Collapse file tree 21 files changed +256
-14
lines changed Original file line number Diff line number Diff line change 1+ bundle :
2+ name : my_project
3+
4+ resources :
5+ jobs :
6+ job_1 :
7+ name : Updated Job
Original file line number Diff line number Diff line change 1+
2+ >>> [CLI] jobs create --json {"name": "My Job"}
3+
4+ >>> [CLI] bundle deployment bind job_1 [NUMID] --auto-approve
5+ Updating deployment state...
6+ Successfully bound job with an id '[NUMID]'. Run 'bundle deploy' to deploy changes to your workspace
7+
8+ >>> [CLI] bundle deploy
9+ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...
10+ Deploying resources...
11+ Updating deployment state...
12+ Deployment complete!
13+
14+ >>> [CLI] jobs get [NUMID] --output json
15+ {
16+ "job_id":[NUMID],
17+ "settings": {
18+ "deployment": {
19+ "kind":"BUNDLE",
20+ "metadata_file_path":"/Workspace/Users/[USERNAME]/.bundle/my_project/default/state/metadata.json"
21+ },
22+ "edit_mode":"UI_LOCKED",
23+ "format":"MULTI_TASK",
24+ "max_concurrent_runs":1,
25+ "name":"Updated Job",
26+ "queue": {
27+ "enabled":true
28+ }
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ job_id=$(trace $CLI jobs create --json '{"name": "My Job"}' | jq -r '.job_id')
2+
3+ trace $CLI bundle deployment bind job_1 $job_id --auto-approve
4+
5+ trace $CLI bundle deploy
6+
7+ trace $CLI jobs get $job_id --output json
Original file line number Diff line number Diff line change 1+ Cloud = false # test leaves deployed job
Original file line number Diff line number Diff line change 1+ bundle :
2+ name : my_project
3+
4+ experimental :
5+ python :
6+ resources :
7+ - " resources:load_resources"
Original file line number Diff line number Diff line change 1+
2+ >>> [CLI] jobs create --json {"name": "My Job"}
3+
4+ >>> uv run --with [DATABRICKS_BUNDLES_WHEEL] -q [CLI] bundle deployment bind job_1 [NUMID] --auto-approve
5+ Updating deployment state...
6+ Successfully bound job with an id '[NUMID]'. Run 'bundle deploy' to deploy changes to your workspace
7+
8+ >>> uv run --with [DATABRICKS_BUNDLES_WHEEL] -q [CLI] bundle deploy
9+ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...
10+ Deploying resources...
11+ Updating deployment state...
12+ Deployment complete!
13+
14+ >>> [CLI] jobs get [NUMID] --output json
15+ {
16+ "job_id":[NUMID],
17+ "settings": {
18+ "deployment": {
19+ "kind":"BUNDLE",
20+ "metadata_file_path":"/Workspace/Users/[USERNAME]/.bundle/my_project/default/state/metadata.json"
21+ },
22+ "edit_mode":"UI_LOCKED",
23+ "format":"MULTI_TASK",
24+ "max_concurrent_runs":1,
25+ "name":"Updated Job",
26+ "queue": {
27+ "enabled":true
28+ }
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ from databricks .bundles .core import Resources
2+
3+
4+ def load_resources () -> Resources :
5+ resources = Resources ()
6+
7+ resources .add_job (
8+ resource_name = "job_1" ,
9+ job = {"name" : "Updated Job" },
10+ )
11+
12+ return resources
Original file line number Diff line number Diff line change 1+ UV_RUN="uv run --with $DATABRICKS_BUNDLES_WHEEL -q"
2+
3+ job_id=$(trace $CLI jobs create --json '{"name": "My Job"}' | jq -r '.job_id')
4+
5+ trace $UV_RUN $CLI bundle deployment bind job_1 $job_id --auto-approve
6+
7+ trace $UV_RUN $CLI bundle deploy
8+
9+ trace $CLI jobs get $job_id --output json
Original file line number Diff line number Diff line change 1+ Cloud = false # test leaves deployed job
Original file line number Diff line number Diff line change 1+ bundle :
2+ name : my_project
3+
4+ variables :
5+ job_name :
6+ description : " Job name"
7+
8+ resources :
9+ jobs :
10+ job_1 :
11+ name : ${var.job_name}
You can’t perform that action at this time.
0 commit comments