File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,6 @@ def get_run(self, run_id):
3939
4040 def cancel_run (self , run_id ):
4141 return self .client .cancel_run (run_id )
42+
43+ def get_run_output (self , run_id ):
44+ return self .client .get_run_output (run_id )
Original file line number Diff line number Diff line change @@ -120,6 +120,21 @@ def get_cli(api_client, run_id):
120120 click .echo (pretty_format (RunsApi (api_client ).get_run (run_id )))
121121
122122
123+ @click .command (context_settings = CONTEXT_SETTINGS )
124+ @click .option ('--run-id' , required = True , type = RunIdClickType ())
125+ @debug_option
126+ @profile_option
127+ @eat_exceptions
128+ @provide_api_client
129+ def get_output_cli (api_client , run_id ):
130+ """
131+ Gets the output of a run
132+
133+ The output schema is documented https://docs.databricks.com/api/latest/jobs.html#runs-get-output
134+ """
135+ click .echo (pretty_format (RunsApi (api_client ).get_run_output (run_id )))
136+
137+
123138@click .command (context_settings = CONTEXT_SETTINGS )
124139@click .option ('--run-id' , required = True , type = RunIdClickType ())
125140@debug_option
@@ -151,3 +166,4 @@ def runs_group():
151166runs_group .add_command (list_cli , name = 'list' )
152167runs_group .add_command (get_cli , name = 'get' )
153168runs_group .add_command (cancel_cli , name = 'cancel' )
169+ runs_group .add_command (get_output_cli , name = 'get-output' )
You can’t perform that action at this time.
0 commit comments