Skip to contents

This is a long-running operation, which blocks until Command Execution on Databricks reach Finished or Error state with the timeout of 20 minutes, that you can change via timeout parameter. By default, the state of Databricks Command Execution is reported to console. You can change this behavior by changing the callback parameter.

Usage

execute_command_and_wait(
  client,
  cluster_id = NULL,
  command = NULL,
  context_id = NULL,
  language = NULL,
  timeout = 20,
  callback = cli_reporter
)

Arguments

client

Required. Instance of DatabricksClient()

cluster_id

Running cluster id.

command

Executable code.

context_id

Running context id.

language

This field has no description yet.

timeout

Time to wait for the operation to complete in minutes.

callback

Function to report the status of the operation. By default, it reports to console.

Details

Runs a cluster command in the given execution context, using the provided language.

If successful, it returns an ID for tracking the status of the command's execution.