Lineage payload reference
POST https://api.dataloris.com/api/v1/lineage/ingestions with a JSON body. Version 2 is described here;
the older version 1 format is summarised at the end.
Top level
Section titled “Top level”| Field | Type | Required | Description |
|---|---|---|---|
version |
2 |
Yes | Payload format. |
namespace |
string | No | Default namespace for datasets that don’t set their own. |
scope |
object | No | { "namespace", "prefix", "complete" }. With complete: true, jobs in the namespace whose name starts with prefix, and that this request neither lists nor references, are retired. Without complete it is informational. |
jobs |
array | No | The jobs this push describes. |
datasets |
array | No | Extra datasets, for example to declare a schema or a dataset no job touches yet. |
| Field | Type | Required | Description |
|---|---|---|---|
namespace |
string | Yes | Where the job lives, for example airflow://prod or dbt://shop. origin is reserved. |
name |
string | Yes | Unique in its namespace, for example sales_dag.load_orders. |
type |
enum | Yes | See job types. |
parent |
string | No | Name of the parent job in the same namespace (a DAG for a task, a project for a model). |
upstream_jobs |
string[] | No | Names of jobs in the same namespace that must run first. Drawn as dashed job dependencies. |
run |
object | No | { "state": "RUNNING" | "SUCCESS" | "FAILED" | "SKIPPED", "at": "<RFC 3339 time>" } of the latest run. |
inputs |
dataset ref[] | No | Datasets the job reads. |
outputs |
dataset ref[] | No | Datasets the job writes. |
edges |
array | No | { "source", "target", "source_namespace", "target_namespace" } pairs. When omitted, every input flows into every output. |
edge_kind |
enum | No | TRANSFORM (default), COPY, CDC or STREAM. |
column_lineage |
array | No | Column mappings, see below. |
metadata |
object | No | Any JSON you want to keep with the job. |
Dataset ref
Section titled “Dataset ref”Used in inputs, outputs and datasets.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | See naming. |
namespace |
string | No | Defaults to the top-level namespace. |
kind |
enum | No | TABLE, VIEW, TOPIC, FILE or EXTERNAL. |
columns |
array | No | { "name", "type" } items: the dataset’s full current schema. Leave it out when unknown; a column missing from a list you send is treated as dropped. |
metadata |
object | No | Any JSON. |
Column mapping
Section titled “Column mapping”{ "target": { "dataset": "acme.analytics.sale_daily", "column": "revenue" }, "sources": [ { "dataset": "acme.analytics.fct_event", "column": "amount", "transform": "DIRECT_AGGREGATION" }, { "dataset": "acme.analytics.fct_event", "column": "store_id", "transform": "INDIRECT_JOIN" } ]}Each source dataset → target dataset pair must be an edge of the job (an input and an output, or an
explicit edges item). transform is required.
Column transforms
Section titled “Column transforms”| Transform | Meaning |
|---|---|
DIRECT_IDENTITY |
Copied as is. |
DIRECT_TRANSFORM |
Computed from the source, row by row (UPPER(name), amount * 1.1, a cast). |
DIRECT_AGGREGATION |
Aggregated (SUM, COUNT, MAX…). |
INDIRECT_JOIN |
Used as a join key. |
INDIRECT_FILTER |
Used in WHERE / HAVING. |
INDIRECT_GROUP_BY |
Used in GROUP BY. |
INDIRECT_SORT |
Used in ORDER BY. |
INDIRECT_WINDOW |
Used in a window’s PARTITION BY / ORDER BY. |
INDIRECT_CONDITIONAL |
Used in a CASE condition. |
METADATA |
Derived from metadata, not values. |
UNKNOWN |
The relationship is known, its kind is not. |
Indirect sources influence the target without being copied into it; the graph draws them fainter and can hide them.
Job types
Section titled “Job types”AIRFLOW_DAG, AIRFLOW_TASK, DBT_PROJECT, DBT_MODEL, SPARK, STREAM, CDC, EXPORT, SQL, OTHER.
Naming
Section titled “Naming”Use these conventions so lineage links to your monitored tables and to lineage pushed by other tools:
| Engine | Namespace | Name | Case |
|---|---|---|---|
| BigQuery | bigquery |
project.dataset.table |
Case-sensitive; backticks are stripped |
| PostgreSQL | postgres://host:port |
database.schema.table |
Lower-cased |
| Snowflake | snowflake://account |
database.schema.table |
Upper-cased |
| Kafka | kafka://bootstrap-host:port |
Topic name | As is |
| Files | gs://bucket, s3://bucket |
Path or prefix | As is |
| Airflow | airflow://<instance> |
dag_id.task_id (task), dag_id (DAG) |
As is |
| dbt | dbt://<project> |
model.<project>.<model> |
As is |
A PostgreSQL connection to host db.example.com, port 5432 and database shop matches datasets in
namespace postgres://db.example.com:5432 named shop.<schema>.<table>. If your lineage uses another
namespace, for example bq:acme-prod, set the connection’s Lineage namespace to it: the table’s
qualified name must then match the dataset name exactly.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Jobs per request | 5,000 |
| Datasets per request | 20,000 |
| Column mappings per request | 200,000 |
| Body size | 64 MiB after decompression (Content-Encoding: gzip accepted) |
| Requests | One submission each, against your daily quota |
Other endpoints
Section titled “Other endpoints”All accept an API key with lineage:write, and none counts as a submission.
| Method | Path | Purpose |
|---|---|---|
POST |
/api/v1/lineage/jobs/heartbeat |
{ "jobs": [{ "namespace", "name" }] }: mark streaming jobs as alive. |
DELETE |
/api/v1/lineage/jobs/{id} |
Retire one job. |
Version 1 (legacy)
Section titled “Version 1 (legacy)”Requests without version (or with "version": 1) use the earlier format and keep working:
namespace and origin_key (both required), nodes[] (qualified_name, optional namespace,
node_type and metadata) and edges[] (source, target, optional namespaces and column_lineage
items { "source", "target", "transform" } with column names). Each origin_key becomes one job of type
OTHER. Don’t mix version 1 and version 2 fields in one request.