describe
import { Aside } from ‘@astrojs/starlight/components’;
The describe command queries index metadata, returning field names, data types, and schema information. It must be used as the first command in a PPL query — it cannot appear after a pipe. This is your starting point when exploring an unfamiliar index.
Syntax
Section titled “Syntax”describe [<data-source>.][<schema>.]<table-name>Arguments
Section titled “Arguments”Required
Section titled “Required”| Argument | Description |
|---|---|
<table-name> | The index or index pattern to describe. Supports wildcards (e.g., logs-otel-v1*). |
Optional
Section titled “Optional”| Argument | Default | Description |
|---|---|---|
<data-source> | OpenSearch default | The data source to query. |
<schema> | Default schema | The schema containing the table. |
Output columns
Section titled “Output columns”The describe command returns metadata rows with the following key columns:
| Column | Description |
|---|---|
TABLE_NAME | Name of the index. |
COLUMN_NAME | Name of the field. |
TYPE_NAME | Data type of the field (e.g., string, bigint, timestamp, object, nested). |
Additional columns include TABLE_CAT, TABLE_SCHEM, DATA_TYPE, COLUMN_SIZE, NULLABLE, ORDINAL_POSITION, and others following JDBC metadata conventions.
Usage notes
Section titled “Usage notes”describemust be the first command in the query. You cannot pipe data intodescribe.- Combine
describewithwhereandfieldsto filter and focus on specific columns or types. - Use wildcard index patterns to describe fields across multiple indices at once.
- The output helps you discover the correct field names and types before writing more complex queries — especially useful for OTel indices where field names follow dotted semantic conventions.
Examples
Section titled “Examples”Describe an index
Section titled “Describe an index”List all fields and their types in the OTel logs index:
describe logs-otel-v1*Find fields of a specific type
Section titled “Find fields of a specific type”Filter for all bigint (long) fields:
describe logs-otel-v1*| where TYPE_NAME = 'bigint'Find fields by name pattern
Section titled “Find fields by name pattern”Search for fields containing service in their name:
describe logs-otel-v1*| where like(COLUMN_NAME, '%service%')List all gen_ai fields
Section titled “List all gen_ai fields”Discover GenAI semantic convention fields in your OTel index:
describe logs-otel-v1*| where like(COLUMN_NAME, '%gen_ai%')Describe the trace index
Section titled “Describe the trace index”Explore the span index schema to understand available trace fields:
describe otel-v1-apm-span-*| sort COLUMN_NAMEExtended examples
Section titled “Extended examples”Compare schemas across OTel signal indices
Section titled “Compare schemas across OTel signal indices”Describe both the log and trace indices to find common fields for cross-signal correlation:
describe logs-otel-v1*| where COLUMN_NAME IN ('traceId', 'spanId', 'time', 'severityText', 'body')Then compare with the trace index:
describe otel-v1-apm-span-*| where COLUMN_NAME IN ('traceId', 'spanId', 'startTime', 'endTime', 'serviceName')Discover all nested object fields
Section titled “Discover all nested object fields”Find all object and nested field types to understand the document structure:
describe logs-otel-v1*| where TYPE_NAME = 'object' OR TYPE_NAME = 'nested'| sort COLUMN_NAMESee also
Section titled “See also”- fields — select or exclude fields from query results
- showdatasources — list all configured data sources
- search — retrieve documents from an index