pub struct LineageContext {
pub run_id: Option<Uuid>,
pub job_namespace: Option<String>,
pub job_name: Option<String>,
pub parent_run: Option<ParentRunFacet>,
pub run_facets: Map<String, Value>,
pub job_facets: Map<String, Value>,
pub sql: Option<String>,
}Expand description
Top-level context an integration contributes to each emitted run.
All fields are optional; unset values fall back to OpenLineageConfig
defaults and plan-derived identity.
Fields§
§run_id: Option<Uuid>Correlate with an orchestrator-owned run id (else a fresh UUIDv7 is used).
job_namespace: Option<String>Namespace of the emitting job (else the configured default namespace).
job_name: Option<String>Name of the emitting job (else a plan-derived job name).
parent_run: Option<ParentRunFacet>Standard OpenLineage parent run facet.
run_facets: Map<String, Value>Arbitrary extra run facets merged into the emitted event.
job_facets: Map<String, Value>Arbitrary extra job facets merged into the emitted event.
sql: Option<String>The SQL text of the query, if the host has it. Populates the sql job
facet. A plan walk cannot recover this, so the integration supplies it
from the request boundary.
Implementations§
Source§impl LineageContext
impl LineageContext
Sourcepub fn from_env(config: &OpenLineageConfig) -> Self
pub fn from_env(config: &OpenLineageConfig) -> Self
Build a context from the established OpenLineage parent-run environment
conventions, returning None-filled fields when nothing is set.
Reads OPENLINEAGE_PARENT_ID (slash form {namespace}/{name}/{runId}),
falling back to the discrete OPENLINEAGE_PARENT_JOB_NAMESPACE /
OPENLINEAGE_PARENT_JOB_NAME / OPENLINEAGE_PARENT_RUN_ID variables.
Trait Implementations§
Source§impl Clone for LineageContext
impl Clone for LineageContext
Source§fn clone(&self) -> LineageContext
fn clone(&self) -> LineageContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more