databricks-cli/cmd/bundle
Pieter Noordhuis 3108883a8f
Processing and completion of positional args to bundle run (#1120)
## Changes

With this change, both job parameters and task parameters can be
specified as positional arguments to bundle run. How the positional
arguments are interpreted depends on the configuration of the job.

### Examples:

For a job that has job parameters configured a user can specify:

```
databricks bundle run my_job -- --param1=value1 --param2=value2
```

And the run is kicked off with job parameters set to:
```json
{
  "param1": "value1",
  "param2": "value2"
}
```

Similarly, for a job that doesn't use job parameters and only has
`notebook_task` tasks, a user can specify:

```
databricks bundle run my_notebook_job -- --param1=value1 --param2=value2
```

And the run is kicked off with task level `notebook_params` configured
as:
```json
{
  "param1": "value1",
  "param2": "value2"
}
```

For a job that doesn't doesn't use job parameters and only has either
`spark_python_task` or `python_wheel_task` tasks, a user can specify:

```
databricks bundle run my_python_file_job -- --flag=value other arguments
```

And the run is kicked off with task level `python_params` configured as:
```json
[
  "--flag=value",
  "other",
  "arguments"
]
```

The same is applied to jobs with only `spark_jar_task` or
`spark_submit_task` tasks.

## Tests

Unit tests. Tested the completions manually.
2024-04-22 11:50:13 +00:00
..
debug Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deployment Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
generate Bump github.com/databricks/databricks-sdk-go from 0.36.0 to 0.37.0 (#1326) 2024-04-03 10:39:53 +00:00
utils Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
bundle.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
debug.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deploy.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
destroy.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
generate.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
init.go Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
init_test.go Improve experience for multiple builtin templates (#1052) 2023-12-27 12:03:08 +00:00
launch.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
run.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
schema.go Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
summary.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
sync.go Added validate mutator to surface additional bundle warnings (#1352) 2024-04-18 15:13:16 +00:00
test.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
validate.go Print host in `bundle validate` when passed via profile or environment variables (#1378) 2024-04-19 11:43:50 +00:00
variables.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00