relation_columns

Description

Exposes the column definitions for all relations (streams, changelogs, tables, materialized views) in the organization. This is the programmatic equivalent of DESCRIBE RELATION COLUMNS and can be used to introspect schemas dynamically. Access requires the same privileges as the parent relation.

Syntax

SELECT * FROM deltastream.sys."relation_columns";

Columns

Column
Type
Nullable
Description

relation_name

VARCHAR

No

Name of the relation this column belongs to.

schema_name

VARCHAR

No

Schema containing the relation.

database_name

VARCHAR

No

Database containing the relation.

name

VARCHAR

No

Column name.

type

VARCHAR

No

DeltaStream data type of the column, e.g. VARCHAR, BIGINT, STRUCT<...>.

properties

VARCHAR

No

JSON object of column-level properties.

relation_id

VARCHAR

No

Unique identifier of the parent relation.

organization_id

VARCHAR

No

The unique identifier of the organization this resource belongs to.

Examples

List all columns across all relations:

Filter columns for a specific relation:

See Also

Last updated