A statement submitted to a Fabric Livy session
Source:R/fabric_livy_session.R
FabricLivyStatement.RdRepresents one piece of code submitted to a FabricLivySession. Call
$wait() and then $result() to retrieve its output. For the usual
submit-and-wait workflow, use the session's $run() method instead. These
lifecycle methods do not have separate free-function wrappers
Format
An R6::R6Class generator
Public fields
idNumeric Livy statement ID
urlStatement lifecycle URL
stateLatest statement state
responseLatest raw service response
started_localLocal submission timestamp
completed_localLocal completion timestamp
verboseWhether lifecycle messages are enabled
Methods
FabricLivyStatement$new()
Internal constructor used by
FabricLivySession$submit()
Usage
FabricLivyStatement$new(session, response, url, credential, verbose = TRUE)Arguments
sessionParent FabricLivySession
responseInitial statement response
urlStatement lifecycle URL
credentialInternal authentication credential
verboseWhether to emit lifecycle messages
FabricLivyStatement$status()
Retrieve statement state and available output
FabricLivyStatement$wait()
Wait for the statement to reach a terminal state
FabricLivyStatement$result()
Return parsed output and timing metadata
Usage
FabricLivyStatement$result(
refresh = TRUE,
error_on_failure = TRUE,
from = NULL,
size = NULL
)Examples
if (FALSE) { # \dontrun{
# Statements are returned by a session; users do not construct them directly
workspace <- fabric_workspaces()[[1L]]
lakehouse <- fabric_lakehouses(workspace)[[1L]]
session <- fabric_livy_session(lakehouse)
session$wait()
# Submit code, wait for it, and inspect its result
statement <- session$submit("print(40 + 2)", kind = "pyspark")
inherits(statement, "FabricLivyStatement")
statement$wait()
statement$result()
session$close()
} # }