import org.openmetadata.sdk.api.Lineage;// Get lineage by entity type and IDLineage.LineageGraph graph = Lineage.of("table", tableId) .upstream(3) .downstream(2) .fetch();String raw = graph.getRaw();// Get lineage with default depth (1 upstream, 1 downstream)Lineage.LineageGraph graph = Lineage.of("table", tableId).fetch();
# Get lineage by entity type and IDcurl "{base_url}/api/v1/lineage/table/455e3d9d-dbbf-455e-b3be-7191daa825f3" \ -H "Authorization: Bearer {access_token}"# Get lineage with custom depthcurl "{base_url}/api/v1/lineage/table/455e3d9d-dbbf-455e-b3be-7191daa825f3?upstreamDepth=3&downstreamDepth=2" \ -H "Authorization: Bearer {access_token}"# Get lineage by fully qualified namecurl "{base_url}/api/v1/lineage/table/name/sample_data.ecommerce_db.shopify.dim_customer" \ -H "Authorization: Bearer {access_token}"
import org.openmetadata.sdk.api.Lineage;// Get lineage by entity type and IDLineage.LineageGraph graph = Lineage.of("table", tableId) .upstream(3) .downstream(2) .fetch();String raw = graph.getRaw();// Get lineage with default depth (1 upstream, 1 downstream)Lineage.LineageGraph graph = Lineage.of("table", tableId).fetch();
# Get lineage by entity type and IDcurl "{base_url}/api/v1/lineage/table/455e3d9d-dbbf-455e-b3be-7191daa825f3" \ -H "Authorization: Bearer {access_token}"# Get lineage with custom depthcurl "{base_url}/api/v1/lineage/table/455e3d9d-dbbf-455e-b3be-7191daa825f3?upstreamDepth=3&downstreamDepth=2" \ -H "Authorization: Bearer {access_token}"# Get lineage by fully qualified namecurl "{base_url}/api/v1/lineage/table/name/sample_data.ecommerce_db.shopify.dim_customer" \ -H "Authorization: Bearer {access_token}"
import org.openmetadata.sdk.api.Lineage;// Get lineage by entity type and IDLineage.LineageGraph graph = Lineage.of("table", tableId) .upstream(3) .downstream(2) .fetch();String raw = graph.getRaw();// Get lineage with default depth (1 upstream, 1 downstream)Lineage.LineageGraph graph = Lineage.of("table", tableId).fetch();
# Get lineage by entity type and IDcurl "{base_url}/api/v1/lineage/table/455e3d9d-dbbf-455e-b3be-7191daa825f3" \ -H "Authorization: Bearer {access_token}"# Get lineage with custom depthcurl "{base_url}/api/v1/lineage/table/455e3d9d-dbbf-455e-b3be-7191daa825f3?upstreamDepth=3&downstreamDepth=2" \ -H "Authorization: Bearer {access_token}"# Get lineage by fully qualified namecurl "{base_url}/api/v1/lineage/table/name/sample_data.ecommerce_db.shopify.dim_customer" \ -H "Authorization: Bearer {access_token}"
Returns the lineage graph centered on the requested entity, including upstream and downstream edges up to the specified depth.
Response
object
The entity reference for the node at the center of the lineage graph.
Show properties
string
Unique identifier (UUID).
string
Entity type (e.g., table, dashboard, pipeline).
string
Entity name.
string
Fully qualified name of the entity.
boolean
Whether the entity has been soft-deleted.
array
List of entity references for all nodes in the lineage graph (excluding the center entity).
array
Edges pointing into the center entity (data sources).
Show properties
string
UUID of the source entity.
string
UUID of the destination entity.
object
Optional details about the lineage edge.
Show properties
string
SQL query driving the transformation.
array
Column-level lineage mappings.
Show properties
array
List of source column FQNs.
string
Destination column FQN.
object
Entity reference for the pipeline powering the transformation.
array
Edges pointing away from the center entity (data destinations). Same structure as upstreamEdges.
Permissions
Lineage results are filtered to the assets the caller can view. The caller needs ViewBasic on the entity. OpenMetadata drops lineage neighbors the caller cannot view.