SHOW SEMANTIC MATERIALIZATIONS

Lists materialization declarations for a specific semantic view or across all registered semantic views.

Added in version 0.7.0.

Syntax

SHOW SEMANTIC MATERIALIZATIONS [ LIKE '<pattern>' ] IN <view_name>

SHOW SEMANTIC MATERIALIZATIONS [ LIKE '<pattern>' ]

Statement Variants

SHOW SEMANTIC MATERIALIZATIONS IN <view_name>

Returns materializations declared in the specified semantic view. Returns an error if the view does not exist. Returns an empty result set if the view exists but has no materializations.

SHOW SEMANTIC MATERIALIZATIONS

Returns materializations across all registered semantic views. Returns an empty result set if no views have materializations declared.

Both forms support an optional LIKE '<pattern>' clause before IN (or at the end for the cross-view form) to filter materializations by name.

Parameters

Parameter

Type

Description

<view_name>

Name (unquoted)

The name of the semantic view to list materializations for. Only used with the IN form.

LIKE '<pattern>'

VARCHAR (optional)

Filters materializations by name using SQL LIKE syntax (% matches any sequence, _ matches one character).

Output Columns

Returns one row per materialization with 7 VARCHAR columns:

Column

Type

Description

database_name

VARCHAR

The DuckDB database containing the semantic view (e.g., memory).

schema_name

VARCHAR

The DuckDB schema containing the semantic view (e.g., main).

semantic_view_name

VARCHAR

The name of the semantic view this materialization belongs to.

name

VARCHAR

The materialization name as declared in the MATERIALIZATIONS clause.

table

VARCHAR

The physical table name that the materialization points to.

dimensions

VARCHAR

JSON array of dimension names covered by this materialization (e.g., ["region"]).

metrics

VARCHAR

JSON array of metric names covered by this materialization (e.g., ["revenue","order_count"]).

Sorting Behavior

Single-view form (IN): Results are sorted alphabetically by materialization name.

Cross-view form (no IN): Results are sorted alphabetically by semantic_view_name first, then by materialization name within each view.

Examples

List materializations for a specific view:

CREATE SEMANTIC VIEW order_metrics AS
TABLES (
    o AS orders PRIMARY KEY (id)
)
DIMENSIONS (
    o.region AS o.region
)
METRICS (
    o.revenue     AS SUM(o.amount),
    o.order_count AS COUNT(*)
)
MATERIALIZATIONS (
    region_agg AS (
        TABLE daily_revenue_by_region,
        DIMENSIONS (region),
        METRICS (revenue, order_count)
    )
);

SHOW SEMANTIC MATERIALIZATIONS IN order_metrics;
┌───────────────┬─────────────┬─────────────────────┬────────────┬──────────────────────────────┬────────────┬──────────────────────────────┐
│ database_name │ schema_name │ semantic_view_name  │ name       │ table                        │ dimensions │ metrics                      │
├───────────────┼─────────────┼─────────────────────┼────────────┼──────────────────────────────┼────────────┼──────────────────────────────┤
│ memory        │ main        │ order_metrics       │ region_agg │ daily_revenue_by_region      │ ["region"] │ ["revenue","order_count"]    │
└───────────────┴─────────────┴─────────────────────┴────────────┴──────────────────────────────┴────────────┴──────────────────────────────┘

List materializations across all views:

SHOW SEMANTIC MATERIALIZATIONS;

Filter by name pattern:

SHOW SEMANTIC MATERIALIZATIONS LIKE 'region%' IN order_metrics;

View with no materializations (empty result):

SHOW SEMANTIC MATERIALIZATIONS IN simple_view;

Returns an empty result set with the 7-column schema.

Error Cases

View does not exist:

SHOW SEMANTIC MATERIALIZATIONS IN nonexistent_view;
Error: semantic view 'nonexistent_view' does not exist