OpenLineage client
OpenLineageClient.RdCoordinates event emission through an OpenLineage transport. Supply a
transport directly for local or custom delivery, or configure the built-in
HTTP transport with url and related arguments.
When an argument is absent, the client reads OPENLINEAGE_URL,
OPENLINEAGE_ENDPOINT, OPENLINEAGE_API_KEY, and
OPENLINEAGE_DISABLED. Explicit arguments take precedence over their
environment equivalents. OPENLINEAGE_DISABLED accepts only true or
false, ignoring case and surrounding whitespace.
A disabled client uses NoopTransport. An injected transport takes
precedence over HTTP environment variables. If neither a transport nor URL
is configured, the client uses ConsoleTransport. Supplying partial HTTP
settings without a URL is an error.
Methods
OpenLineageClient$new()
Create an OpenLineage client.
Usage
OpenLineageClient$new(
transport = NULL,
url = NULL,
endpoint = "api/v1/lineage",
api_key = NULL,
headers = character(),
timeout = 5,
verify_tls = TRUE,
max_retries = 3L,
disabled = NULL
)Arguments
transportAn optional R6 transport with an
emit(event)method.urlAn optional HTTP or HTTPS base URL. If
NULL,OPENLINEAGE_URLis used when set.endpointA relative OpenLineage endpoint path. If omitted,
OPENLINEAGE_ENDPOINTis used when set.api_keyAn optional bearer API key. If
NULL,OPENLINEAGE_API_KEYis used when set.headersOptional custom HTTP headers as a named character vector.
timeoutA positive HTTP request timeout in seconds.
verify_tlsWhether to verify TLS certificates.
max_retriesA non-negative number of HTTP retries after the first request attempt.
disabledWhether to disable emission. If
NULL,OPENLINEAGE_DISABLEDis used when set.
Examples
transport <- AccumulatingTransport$new()
client <- OpenLineageClient$new(transport = transport, disabled = FALSE)
event <- RunEvent(
Run(new_run_id()),
Job("example", "task"),
event_type = "START"
)
client$emit(event)
length(transport$events)
#> [1] 1