> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# OLAP table OpenLineage

> Export the schema of a native OLAP table as a standard OpenLineage DatasetEvent.

Use an existing table name to export design-time metadata without scanning data or changing the catalog:

```sql theme={null}
EXPLAIN OPENLINEAGE [BRIEF | VERBOSE | FULL] [<catalog>.][<db>.]<table>;
```

The default is BRIEF. Shared-nothing OLAP and shared-data native tables are supported. SELECT permission on the target is required. All three modes return the same single DatasetEvent for a physical table because it is a lineage leaf.

```sql theme={null}
CREATE TABLE orders (id BIGINT, amount DECIMAL(12,2))
DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num'='1');
EXPLAIN OPENLINEAGE FULL orders;
```

Each SQL result row is a standard OpenLineage JSON event, with `eventTime`, `producer`, `schemaURL`, and `dataset`. The Dataset identity uses the cluster/catalog namespace and the database/table name. Standard `schema` and `datasetType` facets describe its visible base columns and table kind.

There is no invented Job, Run, or column dependency: stored table metadata does not retain the history of INSERT, load, or CTAS inputs. A schema-only leaf does **not** assert that the table never had upstream producers. This command does not export ingestion/runtime lineage.

Save the event with the MySQL client (adjust connection parameters):

```bash theme={null}
mysql -h 127.0.0.1 -P 9030 -u root --batch --skip-column-names --raw \
  -e 'EXPLAIN OPENLINEAGE FULL example_db.orders' > orders.ndjson
```

See also [Semantic View OpenLineage](/documents/4.2/using_starrocks/semantic_view_openlineage.md) for declared computation lineage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.