Skip to content

OpenLineage

OpenLineage events and Marquez lineage: runs, datasets, column lineage

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/openlineage/index.md to help me query OpenLineage with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Count RunEvents by eventType

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT event_type, count(*) AS events
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_kind = 'run'
GROUP BY event_type
ORDER BY events DESC

Quick start

Choose where to run OpenLineage, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'openlineage' AS openlineage (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-openlineage-worker'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

marquez credentials

Connection to a Marquez (OpenLineage) API server: BASE_URL plus an optional bearer API_KEY.

Get these credentials β†’
secret.sql
CREATE SECRET marquez (
    TYPE marquez,
    base_url  '<base_url>',
    api_key   '<MARQUEZ_API_KEY>',  -- secret
    page_size '<page_size>'
);
Credential fields and requirements β†’

4. Run a query

query.sql
SELECT event_type, count(*) AS events
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_kind = 'run'
GROUP BY event_type
ORDER BY events DESC
More example queries β†’
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'openlineage' AS openlineage (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-openlineage-worker'
);

Overview

OpenLineage lineage as SQL: query raw RunEvent, DatasetEvent and JobEvent JSON files or a Marquez server's namespaces, datasets, jobs, runs and lineage graph from DuckDB.

Catalog

Everything openlineage exposes once attached β€” read straight from the worker's released build.

openlineage 3 schemas
main 11 functions

Table functions over raw OpenLineage event JSON files, globs and URLs.

Schema examples (14)
Examples (14)

Count RunEvents by eventType

SELECT event_type, count(*) AS events
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_kind = 'run'
GROUP BY event_type
ORDER BY events DESC;

The latest FAIL events with their error message

SELECT job_name, event_time, run_facets->>'$.errorMessage.message' AS error
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_type = 'FAIL'
ORDER BY event_time DESC
LIMIT 20;

Failed runs with the error message from the errorMessage facet

SELECT job_name, ended_at, error_message
FROM openlineage.main.runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'failed'
ORDER BY ended_at DESC;

The ten slowest jobs by average successful run time

SELECT job_name, count(*) AS runs,
  round(avg(duration_seconds), 1) AS avg_seconds
FROM openlineage.main.runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'success'
GROUP BY job_name
ORDER BY avg_seconds DESC
LIMIT 10;
10 more examples

Which jobs write each dataset

SELECT dataset_namespace, dataset_name,
  list(job_name ORDER BY job_name) AS writers
FROM openlineage.main.job_io('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE direction = 'output'
GROUP BY ALL
ORDER BY dataset_name;

Column lists of every dataset with a schema facet

SELECT dataset_name, count(*) AS columns,
  list(field_name ORDER BY ordinal) AS fields
FROM openlineage.main.dataset_schema('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
GROUP BY dataset_name
ORDER BY dataset_name;

Where each column of one table comes from

SELECT output_field, input_dataset, input_field, transformation_subtype
FROM openlineage.main.column_lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE output_dataset = 'analytics.orders_enriched'
ORDER BY output_field, input_field;

Processing engine and version per job

SELECT DISTINCT job_name, facet->>'$.name' AS engine,
  facet->>'$.version' AS version
FROM openlineage.main.facets('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE facet_name = 'processing_engine'
ORDER BY job_name;

Every dataset upstream of analytics.customers

SELECT namespace, name, hops
FROM openlineage.main.lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', 'analytics.customers', depth := 10, direction := 'upstream')
WHERE node_type = 'dataset' AND hops > 0
ORDER BY hops, name;

Impact analysis: jobs downstream of a source table

SELECT name, hops
FROM openlineage.main.lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', 'dataset:postgres://db.internal:5432:shop.public.orders', direction := 'downstream')
WHERE node_type = 'job'
ORDER BY hops, name;

Run counts by orchestrator and normalized status

SELECT orchestrator, status, count(*) AS runs
FROM openlineage.main.unified_runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
GROUP BY ALL
ORDER BY orchestrator, status;

The latest failed task runs with their attempt number

SELECT task_name, status, attempt, duration_seconds
FROM openlineage.main.unified_task_runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'failed'
ORDER BY started_at DESC
LIMIT 20;

Events per orchestrator in a hand-loaded NDJSON file

SELECT openlineage.main.orchestrator(producer) AS orchestrator,
  count(*) AS events
FROM read_json('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', format = 'newline_delimited')
GROUP BY ALL
ORDER BY events DESC;

Events per normalized status in a hand-loaded NDJSON file

SELECT openlineage.main.run_status(eventType) AS status, count(*) AS events
FROM read_json('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', format = 'newline_delimited')
GROUP BY ALL
ORDER BY status;
Scalar functions
orchestrator (producer VARCHAR) 2 examples

Name the orchestrator or engine (airflow, dbt, spark, ...) behind an OpenLineage producer URI

Arguments
producer VARCHAR
The event's producer URI; NULL in, NULL out.
ReturnsVARCHAR
Examples (2)

Events per orchestrator in a hand-loaded NDJSON file

SELECT openlineage.main.orchestrator(producer) AS orchestrator,
  count(*) AS events
FROM read_json('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', format = 'newline_delimited')
GROUP BY ALL
ORDER BY events DESC;
SELECT openlineage.main.orchestrator('https://github.com/apache/airflow/tree/providers-openlineage/1.14.0') AS a,
  openlineage.main.orchestrator('https://github.com/OpenLineage/OpenLineage/tree/1.24.2/integration/spark') AS b;
Link
run_status (event_type VARCHAR) 2 examples

Map an OpenLineage eventType to queued, running, success, failed or cancelled

Arguments
event_type VARCHAR
An eventType such as 'COMPLETE'; NULL in, NULL out.
ReturnsVARCHAR
Examples (2)

Events per normalized status in a hand-loaded NDJSON file

SELECT openlineage.main.run_status(eventType) AS status, count(*) AS events
FROM read_json('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', format = 'newline_delimited')
GROUP BY ALL
ORDER BY status;
SELECT t, openlineage.main.run_status(t) AS status
FROM (VALUES ('START'), ('RUNNING'), ('COMPLETE'), ('FAIL'), ('ABORT'), ('OTHER')) v(t)
ORDER BY t;
Link
Table functions
column_lineage (path VARCHAR, ignore_errors := BOOLEAN) 1 example

Column-level lineage edges from the columnLineage facets in OpenLineage events

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
output_namespace VARCHAR
Namespace of the dataset carrying the columnLineage facet.
output_dataset VARCHAR
Name of that dataset.
output_field VARCHAR
Output column; NULL for a dataset-wide dependency.
input_namespace VARCHAR
Namespace of the input dataset.
input_dataset VARCHAR
Input dataset name.
input_field VARCHAR
Input column.
transformation_type VARCHAR
DIRECT or INDIRECT (or the legacy field-level type).
transformation_subtype VARCHAR
IDENTITY, TRANSFORMATION, AGGREGATION, FILTER, JOIN, ...
transformation_description VARCHAR
Free-text description of the transformation.
masking BOOLEAN
Whether the transformation masks the input.
job_namespace VARCHAR
Namespace of the job that wrote the output.
job_name VARCHAR
Job that wrote the output.
last_seen TIMESTAMP WITH TIME ZONE
Latest eventTime carrying this edge.
Example

Where each column of one table comes from

SELECT output_field, input_dataset, input_field, transformation_subtype
FROM openlineage.main.column_lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE output_dataset = 'analytics.orders_enriched'
ORDER BY output_field, input_field;
Link
dataset_schema (path VARCHAR, ignore_errors := BOOLEAN) 1 example

Dataset columns from the latest OpenLineage schema facet of each dataset

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
dataset_namespace VARCHAR
Dataset namespace.
dataset_name VARCHAR
Dataset name.
ordinal INTEGER
1-based position in the schema facet (nested fields follow their parent).
field_name VARCHAR
Field name; nested fields are dotted, e.g. 'address.city'.
field_type VARCHAR
Field type as the producer reported it.
description VARCHAR
Field description.
observed_at TIMESTAMP WITH TIME ZONE
eventTime of the event carrying this (latest) schema facet.
run_id VARCHAR
runId of that event (NULL for DatasetEvents/JobEvents).
Example

Column lists of every dataset with a schema facet

SELECT dataset_name, count(*) AS columns,
  list(field_name ORDER BY ordinal) AS fields
FROM openlineage.main.dataset_schema('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
GROUP BY dataset_name
ORDER BY dataset_name;
Link
facets (path VARCHAR, ignore_errors := BOOLEAN) 1 example

Every run, job and dataset facet in OpenLineage events, one JSON row per facet

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
source VARCHAR
File path or URL the event was read from.
event_index BIGINT
Position of the event within its source (0-based).
event_time TIMESTAMP WITH TIME ZONE
When the event happened (the event's eventTime, UTC).
event_type VARCHAR
eventType (RunEvents).
run_id VARCHAR
runId (RunEvents).
job_namespace VARCHAR
Job namespace.
job_name VARCHAR
Job name.
entity VARCHAR
Where the facet sits: run, job, dataset, input, output, input_facet (inputFacets) or output_facet.
dataset_namespace VARCHAR
Dataset namespace for dataset/input/output facets.
dataset_name VARCHAR
Dataset name for dataset/input/output facets.
facet_name VARCHAR
Facet key, e.g. 'parent', 'schema', 'columnLineage', 'errorMessage'.
facet_producer VARCHAR
The facet's _producer.
facet_schema_url VARCHAR
The facet's _schemaURL.
facet JSON
The facet body (JSON).
Example

Processing engine and version per job

SELECT DISTINCT job_name, facet->>'$.name' AS engine,
  facet->>'$.version' AS version
FROM openlineage.main.facets('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE facet_name = 'processing_engine'
ORDER BY job_name;
Link
job_io (path VARCHAR, ignore_errors := BOOLEAN) 1 example

Job-to-dataset lineage edges (inputs and outputs) from OpenLineage events

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
job_namespace VARCHAR
Job namespace.
job_name VARCHAR
Job name.
direction VARCHAR
'input' (job reads the dataset) or 'output' (job writes it).
dataset_namespace VARCHAR
Dataset namespace, e.g. 'postgres://db:5432' or 'bigquery'.
dataset_name VARCHAR
Dataset name, e.g. 'analytics.orders'.
run_count BIGINT
Distinct runs that recorded this edge (0 for JobEvents).
first_seen TIMESTAMP WITH TIME ZONE
Earliest eventTime carrying the edge.
last_seen TIMESTAMP WITH TIME ZONE
Latest eventTime carrying the edge.
Example

Which jobs write each dataset

SELECT dataset_namespace, dataset_name,
  list(job_name ORDER BY job_name) AS writers
FROM openlineage.main.job_io('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE direction = 'output'
GROUP BY ALL
ORDER BY dataset_name;
Link
lineage (path VARCHAR, node VARCHAR, depth := BIGINT, direction := VARCHAR, ignore_errors := BOOLEAN) 2 examples

Walk the job/dataset lineage graph upstream or downstream from one node, N hops

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
node VARCHAR
Start node id in Marquez form (dataset or job, then namespace, then name, joined by colons), or a bare dataset or job name that identifies exactly one node.
Named arguments
depth := BIGINT
Maximum hops (edges) to walk; 1 to 100. Β· default 5
direction := VARCHAR
'upstream' (what feeds the node), 'downstream' (what it feeds) or 'both'. Β· default "both"
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
node_id VARCHAR
'dataset:<namespace>:<name>' or 'job:<namespace>:<name>'.
node_type VARCHAR
'dataset' or 'job'.
namespace VARCHAR
Node namespace.
name VARCHAR
Node name.
direction VARCHAR
'start' (the start node), 'upstream' or 'downstream'.
hops INTEGER
Edges between the start node and this node.
reached_from VARCHAR
node_id of the neighbour this node was reached from.
Examples (2)

Every dataset upstream of analytics.customers

SELECT namespace, name, hops
FROM openlineage.main.lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', 'analytics.customers', depth := 10, direction := 'upstream')
WHERE node_type = 'dataset' AND hops > 0
ORDER BY hops, name;

Impact analysis: jobs downstream of a source table

SELECT name, hops
FROM openlineage.main.lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson', 'dataset:postgres://db.internal:5432:shop.public.orders', direction := 'downstream')
WHERE node_type = 'job'
ORDER BY hops, name;
Link
read_events (path VARCHAR, ignore_errors := BOOLEAN) 2 examples

Read raw OpenLineage events from files, globs, directories or URLs, one row per event

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
source VARCHAR
File path or URL the event was read from.
event_index BIGINT
Position of the event within its source (0-based).
event_kind VARCHAR
'run' (RunEvent), 'dataset' (DatasetEvent) or 'job' (JobEvent).
event_type VARCHAR
RunEvent eventType: START, RUNNING, COMPLETE, FAIL, ABORT or OTHER; NULL otherwise.
event_time TIMESTAMP WITH TIME ZONE
When the event happened (the event's eventTime, UTC).
producer VARCHAR
Producer URI of the integration that emitted the event.
schema_url VARCHAR
schemaURL of the event.
run_id VARCHAR
run.runId (RunEvents).
job_namespace VARCHAR
Namespace of the job the event reports on, e.g. 'airflow-prod'.
job_name VARCHAR
Name of the job the event reports on, e.g. 'etl_orders.extract'.
parent_run_id VARCHAR
runId from the parent run facet.
parent_job_namespace VARCHAR
Job namespace from the parent run facet.
parent_job_name VARCHAR
Job name from the parent run facet.
root_run_id VARCHAR
Root runId from the parent facet's root (OpenLineage 1.18+).
orchestrator VARCHAR
airflow, dagster, dbt, spark, flink, ... derived from facets and producer.
dataset_namespace VARCHAR
dataset.namespace (DatasetEvents).
dataset_name VARCHAR
dataset.name (DatasetEvents).
inputs STRUCT(namespace VARCHAR, name VARCHAR)[]
Input datasets as {namespace, name}.
outputs STRUCT(namespace VARCHAR, name VARCHAR)[]
Output datasets as {namespace, name}.
run_facets JSON
run.facets (JSON object).
job_facets JSON
job.facets (JSON object).
event JSON
The whole event (JSON).
Examples (2)

Count RunEvents by eventType

SELECT event_type, count(*) AS events
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_kind = 'run'
GROUP BY event_type
ORDER BY events DESC;

The latest FAIL events with their error message

SELECT job_name, event_time, run_facets->>'$.errorMessage.message' AS error
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_type = 'FAIL'
ORDER BY event_time DESC
LIMIT 20;
Link
runs (path VARCHAR, ignore_errors := BOOLEAN) 2 examples

The latest state of every OpenLineage run in a set of event files, one row per runId

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
run_id VARCHAR
OpenLineage runId.
job_namespace VARCHAR
Job namespace.
job_name VARCHAR
Job name.
state VARCHAR
Latest eventType: START, RUNNING, COMPLETE, FAIL, ABORT or OTHER.
status VARCHAR
queued, running, success, failed or cancelled.
started_at TIMESTAMP WITH TIME ZONE
Earliest START/RUNNING eventTime.
ended_at TIMESTAMP WITH TIME ZONE
eventTime of the terminal (COMPLETE/FAIL/ABORT) event.
duration_seconds DOUBLE
ended_at - started_at in seconds.
first_event_at TIMESTAMP WITH TIME ZONE
Earliest eventTime for the run.
last_event_at TIMESTAMP WITH TIME ZONE
Latest eventTime for the run.
event_count BIGINT
Events seen for the run.
parent_run_id VARCHAR
Parent runId (parent run facet).
parent_job_namespace VARCHAR
Parent job namespace.
parent_job_name VARCHAR
Parent job name.
root_run_id VARCHAR
Root runId (parent facet's root).
orchestrator VARCHAR
airflow, dagster, dbt, spark, flink, ... or 'unknown'.
job_type VARCHAR
jobType facet's jobType: DAG, TASK, MODEL, QUERY, ...
nominal_start_time TIMESTAMP WITH TIME ZONE
nominalTime facet's nominalStartTime (the scheduled time).
nominal_end_time TIMESTAMP WITH TIME ZONE
nominalTime facet's nominalEndTime.
error_message VARCHAR
errorMessage facet's message (failed runs).
inputs STRUCT(namespace VARCHAR, name VARCHAR)[]
Input datasets across all the run's events.
outputs STRUCT(namespace VARCHAR, name VARCHAR)[]
Output datasets across all the run's events.
producer VARCHAR
Producer URI of the latest event.
run_facets JSON
Run facets merged across events, later values winning (JSON).
job_facets JSON
Job facets merged across events (JSON).
Examples (2)

Failed runs with the error message from the errorMessage facet

SELECT job_name, ended_at, error_message
FROM openlineage.main.runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'failed'
ORDER BY ended_at DESC;

The ten slowest jobs by average successful run time

SELECT job_name, count(*) AS runs,
  round(avg(duration_seconds), 1) AS avg_seconds
FROM openlineage.main.runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'success'
GROUP BY job_name
ORDER BY avg_seconds DESC
LIMIT 10;
Link
unified_runs (path VARCHAR, ignore_errors := BOOLEAN) 1 example

Top-level runs from OpenLineage events in the shared cross-orchestrator run layout

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
orchestrator VARCHAR
airflow, dagster, dbt, spark, ... (from facets and producer).
run_id VARCHAR
OpenLineage runId.
pipeline VARCHAR
Job name (DAG, dbt invocation, job).
status VARCHAR
queued, running, success, failed, cancelled or skipped.
raw_status VARCHAR
OpenLineage state (eventType or Marquez RunState).
trigger VARCHAR
schedule, manual, event or other (Airflow run_type), else NULL.
queued_at TIMESTAMP WITH TIME ZONE
First event (or creation) time.
started_at TIMESTAMP WITH TIME ZONE
When the run started.
ended_at TIMESTAMP WITH TIME ZONE
When the run finished.
duration_seconds DOUBLE
ended_at - started_at in seconds.
url VARCHAR
Marquez API link to the run (NULL for event files).
Example

Run counts by orchestrator and normalized status

SELECT orchestrator, status, count(*) AS runs
FROM openlineage.main.unified_runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
GROUP BY ALL
ORDER BY orchestrator, status;
Link
unified_task_runs (path VARCHAR, ignore_errors := BOOLEAN) 1 example

Task runs (runs with a parent facet) from OpenLineage events in the shared layout

Positional arguments
path VARCHAR
OpenLineage events to read: a file, a directory (every .json/.ndjson/.jsonl[.gz] inside, recursively), a glob such as '/var/log/ol/**/*.ndjson', or an http(s) URL.
Named arguments
ignore_errors := BOOLEAN
Skip lines/items that are not JSON event objects instead of failing (default false). Β· default false
Returns columns
orchestrator VARCHAR
airflow, dagster, dbt, spark, ... (from facets and producer).
run_id VARCHAR
Root runId (parent facet's root) or the parent runId.
task_run_id VARCHAR
This run's OpenLineage runId.
task_name VARCHAR
Job name of the task run.
status VARCHAR
queued, running, success, failed, cancelled or skipped.
raw_status VARCHAR
OpenLineage state (eventType or Marquez RunState).
attempt INTEGER
Attempt number, counting from 1 (Airflow try_number); NULL when not reported.
started_at TIMESTAMP WITH TIME ZONE
When the task run started.
ended_at TIMESTAMP WITH TIME ZONE
When it finished.
duration_seconds DOUBLE
ended_at - started_at in seconds.
url VARCHAR
Marquez API link to the run (NULL for event files).
Example

The latest failed task runs with their attempt number

SELECT task_name, status, attempt, duration_seconds
FROM openlineage.main.unified_task_runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'failed'
ORDER BY started_at DESC
LIMIT 20;
Link
marquez 6 tables Β· 6 functions

Namespaces, sources, datasets, jobs, runs and lineage from a Marquez API server.

Schema examples (12)
Examples (12)

Namespaces in the order Marquez first saw them

SELECT name, created_at
FROM openlineage.marquez.namespaces
ORDER BY created_at;

Every source and its connection URI

SELECT name, connection_url FROM openlineage.marquez.sources ORDER BY name;

Datasets in one namespace with their column counts

SELECT namespace, name, len(fields) AS columns
FROM openlineage.marquez.datasets
WHERE namespace = 'bigquery'
ORDER BY name;

Jobs whose latest run failed

SELECT namespace, name, latest_run_state
FROM openlineage.marquez.jobs
WHERE latest_run_state = 'FAILED'
ORDER BY namespace, name;
8 more examples

Failed runs in one namespace

SELECT job_name, state, duration_ms
FROM openlineage.marquez.runs
WHERE namespace = 'airflow-prod' AND state = 'FAILED'
ORDER BY ended_at DESC;

FAIL events since a point in time

SELECT job_name, event_type, event_time
FROM openlineage.marquez.lineage_events
WHERE event_time >= TIMESTAMPTZ '2026-11-03 00:00:00+00' AND event_type = 'FAIL'
ORDER BY event_time;

Version history of a table

SELECT version, created_at, len(fields) AS columns, created_by_run_id
FROM openlineage.marquez.dataset_versions('bigquery', 'analytics.customers')
ORDER BY created_at;

Version history of a job

SELECT version, created_at, len(inputs) AS inputs, latest_run_state
FROM openlineage.marquez.job_versions('airflow-prod', 'etl_orders.transform')
ORDER BY created_at;

Run facets of one run, with the error message if it failed

SELECT facet_name, facet->>'$.message' AS message
FROM openlineage.marquez.run_facets('01930a6e-0000-7000-8000-000000000005')
WHERE facet_type = 'run'
ORDER BY facet_name;

Datasets upstream and downstream of one table

SELECT direction, hops, node_id
FROM openlineage.marquez.lineage_graph('dataset:bigquery:analytics.orders_daily')
WHERE node_type = 'DATASET'
ORDER BY direction, hops;

Which upstream columns feed each column of a table

SELECT output_field, input_dataset, input_field
FROM openlineage.marquez.column_lineage('dataset:bigquery:analytics.customers')
WHERE output_dataset = 'analytics.customers'
ORDER BY output_field;

Datasets whose name mentions orders

SELECT namespace, name, node_id
FROM openlineage.marquez.search('orders', filter := 'DATASET')
ORDER BY name;
Tables
datasets 1 example16 cols

Every Marquez dataset with its fields, tags and facets

Columns
namespacenot null VARCHAR
Dataset namespace.
namenot null VARCHAR
Dataset name.
type VARCHAR
DB_TABLE or STREAM.
physical_name VARCHAR
Name of the dataset in its storage system (usually equal to name).
source_name VARCHAR
Source (sources.name).
description VARCHAR
Dataset description.
fields STRUCT of 4 fields[]
Columns as `LIST(STRUCT(name, type, description, tags))`.
STRUCT[] 4 fields
  • nameVARCHAR
  • typeVARCHAR
  • descriptionVARCHAR
  • tagsVARCHAR[]
tags VARCHAR[]
Dataset tags.
created_at TIMESTAMP WITH TIME ZONE
When Marquez first saw the dataset.
updated_at TIMESTAMP WITH TIME ZONE
Last update.
last_modified_at TIMESTAMP WITH TIME ZONE
Last time a run wrote the dataset.
last_lifecycle_state VARCHAR
Latest lifecycleStateChange (CREATE, OVERWRITE, DROP, ...).
current_version VARCHAR
Current dataset version UUID.
deleted BOOLEAN
Whether the dataset is soft-deleted.
column_lineage JSON
Marquez's column lineage for the dataset (JSON).
facets JSON
Dataset facets (JSON).
ConstraintsPRIMARY KEY (namespace, name)
Example

Datasets in one namespace with their column counts

SELECT namespace, name, len(fields) AS columns
FROM openlineage.marquez.datasets
WHERE namespace = 'bigquery'
ORDER BY name;
Link
jobs 1 example18 cols

Every Marquez job with its inputs, outputs and latest run

Columns
namespacenot null VARCHAR
Job namespace.
namenot null VARCHAR
Job name; Marquez prefixes child jobs with the parent job name.
simple_name VARCHAR
Name without the parent prefix.
parent_job_name VARCHAR
Parent job (from the parent run facet).
type VARCHAR
BATCH, STREAM or SERVICE.
description VARCHAR
Job description.
location VARCHAR
Source-code location URL.
created_at TIMESTAMP WITH TIME ZONE
When Marquez first saw the job.
updated_at TIMESTAMP WITH TIME ZONE
Last update.
current_version VARCHAR
Current job version UUID.
inputs STRUCT(namespace VARCHAR, "name" VARCHAR)[]
Input datasets of the current version.
outputs STRUCT(namespace VARCHAR, "name" VARCHAR)[]
Output datasets of the current version.
latest_run_id VARCHAR
Most recent run id.
latest_run_state VARCHAR
NEW, RUNNING, COMPLETED, FAILED or ABORTED.
latest_run_ended_at TIMESTAMP WITH TIME ZONE
When the latest run ended.
labels VARCHAR[]
Job labels.
tags VARCHAR[]
Job tags.
facets JSON
Job facets (JSON).
ConstraintsPRIMARY KEY (namespace, name)
Example

Jobs whose latest run failed

SELECT namespace, name, latest_run_state
FROM openlineage.marquez.jobs
WHERE latest_run_state = 'FAILED'
ORDER BY namespace, name;
Link
lineage_events 1 example22 cols

Raw OpenLineage events stored in Marquez, in the read_events layout

Columns
source VARCHAR
File path or URL the event was read from.
event_index BIGINT
Position of the event within its source (0-based).
event_kindnot null VARCHAR
'run' (RunEvent), 'dataset' (DatasetEvent) or 'job' (JobEvent).
event_type VARCHAR
RunEvent eventType: START, RUNNING, COMPLETE, FAIL, ABORT or OTHER; NULL otherwise.
event_time TIMESTAMP WITH TIME ZONE
When the event happened (the event's eventTime, UTC).
producer VARCHAR
Producer URI of the integration that emitted the event.
schema_url VARCHAR
schemaURL of the event.
run_id VARCHAR
run.runId (RunEvents).
job_namespace VARCHAR
Namespace of the job the event reports on, e.g. 'airflow-prod'.
job_name VARCHAR
Name of the job the event reports on, e.g. 'etl_orders.extract'.
parent_run_id VARCHAR
runId from the parent run facet.
parent_job_namespace VARCHAR
Job namespace from the parent run facet.
parent_job_name VARCHAR
Job name from the parent run facet.
root_run_id VARCHAR
Root runId from the parent facet's root (OpenLineage 1.18+).
orchestrator VARCHAR
airflow, dagster, dbt, spark, flink, ... derived from facets and producer.
dataset_namespace VARCHAR
dataset.namespace (DatasetEvents).
dataset_name VARCHAR
dataset.name (DatasetEvents).
inputs STRUCT(namespace VARCHAR, "name" VARCHAR)[]
Input datasets as {namespace, name}.
outputs STRUCT(namespace VARCHAR, "name" VARCHAR)[]
Output datasets as {namespace, name}.
run_facets JSON
run.facets (JSON object).
job_facets JSON
job.facets (JSON object).
event JSON
The whole event (JSON).
Example

FAIL events since a point in time

SELECT job_name, event_type, event_time
FROM openlineage.marquez.lineage_events
WHERE event_time >= TIMESTAMPTZ '2026-11-03 00:00:00+00' AND event_type = 'FAIL'
ORDER BY event_time;
Link
namespaces 1 example6 cols

Marquez namespaces (job and dataset namespaces)

Columns
namenot null VARCHAR
Namespace name, e.g. 'airflow-prod' or 'postgres://db:5432'.
owner_name VARCHAR
Owner recorded by Marquez.
description VARCHAR
Namespace description.
is_hidden BOOLEAN
Whether the namespace is hidden in the Marquez UI.
created_at TIMESTAMP WITH TIME ZONE
When Marquez first saw the namespace.
updated_at TIMESTAMP WITH TIME ZONE
Last update.
ConstraintsPRIMARY KEY (name)
Example

Namespaces in the order Marquez first saw them

SELECT name, created_at
FROM openlineage.marquez.namespaces
ORDER BY created_at;
Link
runs 1 example21 cols

Every run of every Marquez job, with state, timing, parent and dataset versions

Columns
run_idnot null VARCHAR
Run id (OpenLineage runId).
namespacenot null VARCHAR
Job namespace.
job_namenot null VARCHAR
Marquez job name (child jobs carry the parent prefix).
state VARCHAR
NEW, RUNNING, COMPLETED, FAILED or ABORTED.
created_at TIMESTAMP WITH TIME ZONE
When the run was created.
updated_at TIMESTAMP WITH TIME ZONE
Last update.
started_at TIMESTAMP WITH TIME ZONE
When the run started.
ended_at TIMESTAMP WITH TIME ZONE
When the run ended.
duration_ms BIGINT
Run duration in milliseconds.
nominal_start_time TIMESTAMP WITH TIME ZONE
Scheduled start (nominalTime facet).
nominal_end_time TIMESTAMP WITH TIME ZONE
Scheduled end.
job_version VARCHAR
Job version UUID the run executed.
parent_run_id VARCHAR
Parent runId (parent run facet).
parent_job_name VARCHAR
Job of the parent run, from the parent run facet.
root_run_id VARCHAR
Root runId (parent facet's root).
orchestratornot null VARCHAR
airflow, dagster, dbt, spark, ... or 'unknown'.
error_message VARCHAR
errorMessage facet message.
input_versions STRUCT of 3 fields[]
Input dataset versions as STRUCT(namespace, name, version).
STRUCT[] 3 fields
  • namespaceVARCHAR
  • nameVARCHAR
  • versionVARCHAR
output_versions STRUCT of 3 fields[]
Output dataset versions.
STRUCT[] 3 fields
  • namespaceVARCHAR
  • nameVARCHAR
  • versionVARCHAR
args JSON
Run args (JSON).
facets JSON
Run facets (JSON).
ConstraintsPRIMARY KEY (run_id)
Example

Failed runs in one namespace

SELECT job_name, state, duration_ms
FROM openlineage.marquez.runs
WHERE namespace = 'airflow-prod' AND state = 'FAILED'
ORDER BY ended_at DESC;
Link
sources 1 example6 cols

Marquez data sources (databases, warehouses, object stores)

Columns
namenot null VARCHAR
Source name (from the dataSource facet).
type VARCHAR
Source type as Marquez records it.
connection_url VARCHAR
Connection URI, e.g. 'postgres://db:5432'.
description VARCHAR
Source description.
created_at TIMESTAMP WITH TIME ZONE
When Marquez first saw the source.
updated_at TIMESTAMP WITH TIME ZONE
Last update.
ConstraintsPRIMARY KEY (name)
Example

Every source and its connection URI

SELECT name, connection_url FROM openlineage.marquez.sources ORDER BY name;
Link
Table functions
column_lineage (node_id VARCHAR, depth := BIGINT, with_downstream := BOOLEAN) 1 example

Column-level lineage from Marquez for a dataset or one column, one row per input column

Positional arguments
node_id VARCHAR
'dataset:<namespace>:<name>' (every column) or 'datasetField:<namespace>:<dataset>:<field>'.
Named arguments
depth := BIGINT
Traversal depth; 1 to 100. Β· default 20
with_downstream := BOOLEAN
Also return downstream columns (default: upstream only). Β· default false
Returns columns
node_id VARCHAR
'datasetField:<ns>:<dataset>:<field>' of the output column.
output_namespace VARCHAR
Namespace of the output dataset.
output_dataset VARCHAR
Output dataset.
output_field VARCHAR
Output column.
output_field_type VARCHAR
Type of the output column.
input_namespace VARCHAR
Namespace of the input dataset (NULL: no inputs).
input_dataset VARCHAR
Input dataset.
input_field VARCHAR
Input column.
transformation_type VARCHAR
Transformation type, if recorded.
transformation_description VARCHAR
Transformation description, if recorded.
dataset_version VARCHAR
Version of the output dataset.
Example

Which upstream columns feed each column of a table

SELECT output_field, input_dataset, input_field
FROM openlineage.marquez.column_lineage('dataset:bigquery:analytics.customers')
WHERE output_dataset = 'analytics.customers'
ORDER BY output_field;
Link
dataset_versions (namespace VARCHAR, name VARCHAR) 1 example

Every version of one Marquez dataset, newest first, with the run that created it

Arguments
namespace VARCHAR
Namespace, e.g. 'bigquery' or 'airflow-prod'.
name VARCHAR
Dataset or job name (full Marquez name for child jobs).
Returns columns
namespace VARCHAR
Dataset namespace.
name VARCHAR
Dataset name.
version VARCHAR
Dataset version UUID.
created_at TIMESTAMP WITH TIME ZONE
When the version was created.
type VARCHAR
DB_TABLE or STREAM.
source_name VARCHAR
Source name.
fields STRUCT of 4 fields[]
Columns of this version.
STRUCT[] 4 fields
  • nameVARCHAR
  • typeVARCHAR
  • descriptionVARCHAR
  • tagsVARCHAR[]
schema_version VARCHAR
currentSchemaVersion UUID.
lifecycle_state VARCHAR
lifecycleStateChange of this version.
created_by_run_id VARCHAR
Run that produced this version.
created_by_run_state VARCHAR
State of that run.
facets JSON
Dataset facets of this version (JSON).
Example

Version history of a table

SELECT version, created_at, len(fields) AS columns, created_by_run_id
FROM openlineage.marquez.dataset_versions('bigquery', 'analytics.customers')
ORDER BY created_at;
Link
job_versions (namespace VARCHAR, name VARCHAR) 1 example

Every version of one Marquez job with its inputs, outputs and latest run

Arguments
namespace VARCHAR
Namespace, e.g. 'bigquery' or 'airflow-prod'.
name VARCHAR
Dataset or job name (full Marquez name for child jobs).
Returns columns
namespace VARCHAR
Job namespace.
name VARCHAR
Job name.
version VARCHAR
Job version UUID.
created_at TIMESTAMP WITH TIME ZONE
When the version was created.
location VARCHAR
Source-code location.
inputs STRUCT(namespace VARCHAR, name VARCHAR)[]
Inputs of this version.
outputs STRUCT(namespace VARCHAR, name VARCHAR)[]
Outputs of this version.
latest_run_id VARCHAR
Latest run of this version.
latest_run_state VARCHAR
Its state.
Example

Version history of a job

SELECT version, created_at, len(inputs) AS inputs, latest_run_state
FROM openlineage.marquez.job_versions('airflow-prod', 'etl_orders.transform')
ORDER BY created_at;
Link
lineage_graph (node_id VARCHAR, depth := BIGINT) 1 example

The Marquez lineage graph around one dataset or job, one row per node with hop counts

Positional arguments
node_id VARCHAR
Start node: 'dataset:<namespace>:<name>' or 'job:<namespace>:<name>'.
Named arguments
depth := BIGINT
Marquez traversal depth; 1 to 100. Β· default 20
Returns columns
node_id VARCHAR
'dataset:<ns>:<name>' or 'job:<ns>:<name>'.
node_type VARCHAR
DATASET or JOB.
namespace VARCHAR
Node namespace.
name VARCHAR
Node name.
direction VARCHAR
'start', 'upstream', 'downstream' or NULL (reachable only sideways).
hops INTEGER
Edges from the start node along that direction.
in_edges VARCHAR[]
node_ids with an edge into this node.
out_edges VARCHAR[]
node_ids this node has an edge to.
data JSON
Marquez's dataset/job object for the node (JSON).
Example

Datasets upstream and downstream of one table

SELECT direction, hops, node_id
FROM openlineage.marquez.lineage_graph('dataset:bigquery:analytics.orders_daily')
WHERE node_type = 'DATASET'
ORDER BY direction, hops;
Link
run_facets (run_id VARCHAR) 1 example

The run and job facets Marquez recorded for one run, one JSON row per facet

Arguments
run_id VARCHAR
The OpenLineage runId of the run, as shown in runs.run_id.
Returns columns
run_id VARCHAR
Run id.
facet_type VARCHAR
'run' (run facets) or 'job' (job facets recorded with the run).
facet_name VARCHAR
Facet key, e.g. 'parent', 'errorMessage', 'processing_engine'.
facet_producer VARCHAR
The facet's _producer.
facet_schema_url VARCHAR
The facet's _schemaURL.
facet JSON
The facet body (JSON).
Example

Run facets of one run, with the error message if it failed

SELECT facet_name, facet->>'$.message' AS message
FROM openlineage.marquez.run_facets('01930a6e-0000-7000-8000-000000000005')
WHERE facet_type = 'run'
ORDER BY facet_name;
Link
unified 2 tables

Marquez runs and task runs in the column layout shared by every orchestrator worker.

Schema examples (2)
Examples (2)

Run counts by orchestrator and status

SELECT orchestrator, status, count(*) AS runs
FROM openlineage.unified.runs
GROUP BY ALL
ORDER BY ALL;

Failed task runs with their pipeline

SELECT t.task_name, t.status, r.pipeline
FROM openlineage.unified.task_runs t
JOIN openlineage.unified.runs r USING (run_id)
WHERE t.status = 'failed'
ORDER BY t.task_name;
Tables
runs 1 example11 cols

Marquez top-level runs in the shared cross-orchestrator shape

Columns
orchestratornot null VARCHAR
airflow, dagster, dbt, spark, ... (from facets and producer).
run_idnot null VARCHAR
OpenLineage runId.
pipeline VARCHAR
Job name (DAG, dbt invocation, job).
statusnot null VARCHAR
queued, running, success, failed, cancelled or skipped.
raw_status VARCHAR
OpenLineage state (eventType or Marquez RunState).
trigger VARCHAR
schedule, manual, event or other (Airflow run_type), else NULL.
queued_at TIMESTAMP WITH TIME ZONE
First event (or creation) time.
started_at TIMESTAMP WITH TIME ZONE
When the run started.
ended_at TIMESTAMP WITH TIME ZONE
When the run finished.
duration_seconds DOUBLE
ended_at - started_at in seconds.
url VARCHAR
Marquez API link to the run (NULL for event files).
ConstraintsPRIMARY KEY (run_id)
Example

Run counts by orchestrator and status

SELECT orchestrator, status, count(*) AS runs
FROM openlineage.unified.runs
GROUP BY ALL
ORDER BY ALL;
Link
task_runs 1 example11 cols

Marquez task runs (runs with a parent facet) in the shared cross-orchestrator shape

Columns
orchestratornot null VARCHAR
airflow, dagster, dbt, spark, ... (from facets and producer).
run_idnot null VARCHAR
Root runId (parent facet's root) or the parent runId.
task_run_idnot null VARCHAR
This run's OpenLineage runId.
task_name VARCHAR
Job name of the task run.
statusnot null VARCHAR
queued, running, success, failed, cancelled or skipped.
raw_status VARCHAR
OpenLineage state (eventType or Marquez RunState).
attempt INTEGER
Attempt number, counting from 1 (Airflow try_number); NULL when not reported.
started_at TIMESTAMP WITH TIME ZONE
When the task run started.
ended_at TIMESTAMP WITH TIME ZONE
When it finished.
duration_seconds DOUBLE
ended_at - started_at in seconds.
url VARCHAR
Marquez API link to the run (NULL for event files).
ConstraintsPRIMARY KEY (task_run_id)
Example

Failed task runs with their pipeline

SELECT t.task_name, t.status, r.pipeline
FROM openlineage.unified.task_runs t
JOIN openlineage.unified.runs r USING (run_id)
WHERE t.status = 'failed'
ORDER BY t.task_name;
Link

Credentials

The secret type openlineage declares, as reported by the worker itself.

marquez

How to get these credentials

Connection to a Marquez (OpenLineage) API server: BASE_URL plus an optional bearer API_KEY.

secret.sql
CREATE SECRET marquez (
    TYPE marquez,
    base_url  '<base_url>',
    api_key   '<MARQUEZ_API_KEY>',  -- secret
    page_size '<page_size>'
);
Key Type Required Description
base_url VARCHAR β€” Root URL of the Marquez API server, e.g. 'http://localhost:5000'. /api/v1 is appended.
api_key secret VARCHAR β€” Bearer token sent as 'Authorization: Bearer <api_key>' (for an auth proxy or hosted deployment). Leave unset for an open Marquez.
page_size VARCHAR β€” Rows requested per page (Marquez 'limit'); 1 to 1000, default 100.

The worker doesn't mark which keys are required.

Needed by dataset_versionsjob_versionsrun_facetslineage_graphcolumn_lineagesearch

Create the secret in the same session, after attaching openlineage β€” the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

The latest FAIL events with their error message

SELECT job_name, event_time, run_facets->>'$.errorMessage.message' AS error
FROM openlineage.main.read_events('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE event_type = 'FAIL'
ORDER BY event_time DESC
LIMIT 20

Uses read_events

Failed runs with the error message from the errorMessage facet

SELECT job_name, ended_at, error_message
FROM openlineage.main.runs('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE status = 'failed'
ORDER BY ended_at DESC

Uses runs

Which jobs write each dataset

SELECT dataset_namespace, dataset_name,
  list(job_name ORDER BY job_name) AS writers
FROM openlineage.main.job_io('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE direction = 'output'
GROUP BY ALL
ORDER BY dataset_name

Uses job_io

Column lists of every dataset with a schema facet

SELECT dataset_name, count(*) AS columns,
  list(field_name ORDER BY ordinal) AS fields
FROM openlineage.main.dataset_schema('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
GROUP BY dataset_name
ORDER BY dataset_name

Uses dataset_schema

Where each column of one table comes from

SELECT output_field, input_dataset, input_field, transformation_subtype
FROM openlineage.main.column_lineage('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE output_dataset = 'analytics.orders_enriched'
ORDER BY output_field, input_field

Uses column_lineagecolumn_lineage

Processing engine and version per job

SELECT DISTINCT job_name, facet->>'$.name' AS engine,
  facet->>'$.version' AS version
FROM openlineage.main.facets('https://raw.githubusercontent.com/Query-farm/vgi-openlineage/v0.1.0/test/fixtures/all-events.ndjson')
WHERE facet_name = 'processing_engine'
ORDER BY job_name

Uses facets

23 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • A Marquez server is running at http://127.0.0.1:5056. How many datasets does each of its namespaces hold? Include namespaces with none.
  • A Marquez server is running at http://127.0.0.1:5056. Which jobs have a FAILED run, and how long did each failed run take in milliseconds?
  • A Marquez server is running at http://127.0.0.1:5056. Which data sources does it know, and what is each one's connection URL?
  • A Marquez server is running at http://127.0.0.1:5056. Which jobs (namespace and name) have a latest run that failed?
  • A Marquez server is running at http://127.0.0.1:5056. How many raw OpenLineage events did it receive with an event time on 2026-11-03 (UTC), per event type?
  • A Marquez server is running at http://127.0.0.1:5056. How many versions of the dataset analytics.customers (namespace bigquery) has it recorded?

OpenLineage is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.