databricks-cli
databricks-cli copied to clipboard
Add `--output` parameter to the `runs submit` and `jobs run-now` commands.
The --output parameter would behave like --wait but after the job finishes it would fetch the job output https://docs.databricks.com/dev-tools/api/latest/jobs.html#operation/JobsRunsGetOutput and display that instead of printing the job.
--output would be mutual exclusive with --wait
When this parameter is on, I propose we eliminate printing the run_id into stdout after the job is successfully submitted. That way the only thing printed to stdout is the run output in JSON format.
@jerrylian-db agreed
@fjakobs @jerrylian-db Are you talking about the JSON repr of the run object, or of the notebook output (stdout/stderr)?
If the former, the current implementation can (should?) print it upon completion of the run (as opposed to just showing the object with the run_id immediately after submitting the run).
If the latter, then yes, it shouldn't display anything besides the notebook output. The flag should be named other than --output because that conflicts with the (sort of) global --output flag to select a tabular or JSON output. I would rather name it --print-output or --tail.