mirror of https://github.com/databricks/cli.git
77 lines
2.2 KiB
Plaintext
77 lines
2.2 KiB
Plaintext
|
|
||
|
>>> cat databricks.yml
|
||
|
bundle:
|
||
|
name: wheel-task
|
||
|
|
||
|
workspace:
|
||
|
root_path: "~/.bundle/[UNIQUE_NAME]"
|
||
|
|
||
|
resources:
|
||
|
clusters:
|
||
|
test_cluster:
|
||
|
cluster_name: "test-cluster-[UNIQUE_NAME]"
|
||
|
spark_version: "13.3.x-snapshot-scala2.12"
|
||
|
node_type_id: "[NODE_TYPE_ID]"
|
||
|
num_workers: 1
|
||
|
data_security_mode: SINGLE_USER
|
||
|
|
||
|
jobs:
|
||
|
some_other_job:
|
||
|
name: "[${bundle.target}] Test Wheel Job [UNIQUE_NAME]"
|
||
|
tasks:
|
||
|
- task_key: TestTask
|
||
|
existing_cluster_id: "${resources.clusters.test_cluster.cluster_id}"
|
||
|
python_wheel_task:
|
||
|
package_name: my_test_code
|
||
|
entry_point: run
|
||
|
parameters:
|
||
|
- "one"
|
||
|
- "two"
|
||
|
libraries:
|
||
|
- whl: ./dist/*.whl
|
||
|
|
||
|
>>> [CLI] bundle deploy
|
||
|
Building python_artifact...
|
||
|
Uploading my_test_code-0.0.1-py3-none-any.whl...
|
||
|
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
|
||
|
Deploying resources...
|
||
|
Updating deployment state...
|
||
|
Deployment complete!
|
||
|
|
||
|
>>> [CLI] bundle run some_other_job
|
||
|
Run URL: [DATABRICKS_URL]/?o=[NUMID]#job/[NUMID]/run/[NUMID]
|
||
|
|
||
|
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" RUNNING
|
||
|
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" TERMINATED SUCCESS
|
||
|
Hello from my func
|
||
|
Got arguments:
|
||
|
['my_test_code', 'one', 'two']
|
||
|
|
||
|
=== Make a change to code without version change and run the job again
|
||
|
>>> [CLI] bundle deploy
|
||
|
Building python_artifact...
|
||
|
Uploading my_test_code-0.0.1-py3-none-any.whl...
|
||
|
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
|
||
|
Deploying resources...
|
||
|
Updating deployment state...
|
||
|
Deployment complete!
|
||
|
|
||
|
>>> [CLI] bundle run some_other_job
|
||
|
Run URL: [DATABRICKS_URL]/?o=[NUMID]#job/[NUMID]/run/[NUMID]
|
||
|
|
||
|
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" RUNNING
|
||
|
[TIMESTAMP] "[default] Test Wheel Job [UNIQUE_NAME]" TERMINATED SUCCESS
|
||
|
UPDATED MY FUNC
|
||
|
Got arguments:
|
||
|
['my_test_code', 'one', 'two']
|
||
|
|
||
|
>>> [CLI] bundle destroy --auto-approve
|
||
|
The following resources will be deleted:
|
||
|
delete cluster test_cluster
|
||
|
delete job some_other_job
|
||
|
|
||
|
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]
|
||
|
|
||
|
Deleting files...
|
||
|
Destroy complete!
|