db_context_manager {brickster} | R Documentation |
Databricks Execution Context Manager (R6 Class)
Description
Databricks Execution Context Manager (R6 Class)
Databricks Execution Context Manager (R6 Class)
Details
db_context_manager()
provides a simple interface to send commands to
Databricks cluster and return the results.
Methods
Public methods
Method new()
Create a new context manager object.
Usage
db_context_manager$new( cluster_id, language = c("r", "py", "scala", "sql", "sh"), host = db_host(), token = db_token() )
Arguments
cluster_id
The ID of the cluster to execute command on.
language
One of
r
,py
,scala
,sql
, orsh
.host
Databricks workspace URL, defaults to calling
db_host()
.token
Databricks workspace token, defaults to calling
db_token()
.
Returns
A new databricks_context_manager
object.
Method close()
Destroy the execution context
Usage
db_context_manager$close()
Method cmd_run()
Execute a command against a Databricks cluster
Usage
db_context_manager$cmd_run(cmd, language = c("r", "py", "scala", "sql", "sh"))
Arguments
cmd
code to execute against Databricks cluster
language
One of
r
,py
,scala
,sql
, orsh
.
Returns
Command results
Method clone()
The objects of this class are cloneable with this method.
Usage
db_context_manager$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
[Package brickster version 0.2.5 Index]