databricks-cli icon indicating copy to clipboard operation
databricks-cli copied to clipboard

Add `--output` parameter to the `runs submit` and `jobs run-now` commands.

Open fjakobs opened this issue 3 years ago • 3 comments

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

fjakobs avatar Jun 16 '22 08:06 fjakobs

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 avatar Jun 17 '22 17:06 jerrylian-db

@jerrylian-db agreed

fjakobs avatar Jun 20 '22 08:06 fjakobs

@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.

pietern avatar Jun 20 '22 10:06 pietern