databricks-cli/bundle/run
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
..
output Do not include empty output in job run output (#749) 2023-09-08 09:52:45 +00:00
progress Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
args.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
args_test.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
job.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
job_args.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
job_args_test.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
job_options.go Group bundle run flags by job and pipeline types (#1174) 2024-02-06 14:51:02 +00:00
job_options_test.go Group bundle run flags by job and pipeline types (#1174) 2024-02-06 14:51:02 +00:00
job_test.go Added `--restart` flag for `bundle run` command (#1191) 2024-02-09 14:33:14 +00:00
keys.go Use interactive prompt to select resource to run if not specified (#762) 2023-09-11 18:03:12 +00:00
keys_test.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
options.go Make sure grouped flags are added to the command flag set (#1180) 2024-02-07 10:27:13 +00:00
pipeline.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
pipeline_options.go Add `--validate-only` flag to run validate-only pipeline update (#1251) 2024-03-04 08:38:32 +00:00
pipeline_options_test.go Add `--validate-only` flag to run validate-only pipeline update (#1251) 2024-03-04 08:38:32 +00:00
pipeline_test.go Added `--restart` flag for `bundle run` command (#1191) 2024-02-09 14:33:14 +00:00
runner.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
runner_test.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00