Create or update an ES|QL dataset
- PUT /_query/dataset/{name}
Creates or replaces a dataset that references a data source in ES|QL data federation.
Dataset names participate in the index namespace and must follow index or alias naming rules.
Returns 404 if the referenced data source does not exist.
- Index privileges:
manage
Path Parameters
-
namestring Namerequired -
The dataset name to create or update.
Query Parameters
-
master_timeoutstring Duration · default: 30s Period to wait for a connection to the master node.
-
timeoutstring Duration · default: 30s The time to wait for the request to be completed.
Request
-
data_sourcestring Namerequired -
The name of the referenced data source. The data source must already exist.
-
resourcestringrequired -
The URI that identifies the data to read, resolved against the referenced data source. It can include glob patterns. For example, a recursive pattern can match all Parquet files under the
s3://logs-bucket/accessprefix. -
descriptionstring -
A free-text description of the dataset.
-
mappingsDatasetMapping -
User-declared mapping on the dataset definition
-
dynamicDynamic · default: true -
The policy for columns that are not declared in
properties.true(the default) infers undeclared columns and overlays the declarations;falsemakes the declaration the entire schema, so undeclared columns are not queryable. -
Values:
truefalse -
propertiesmap string to DatasetFieldMapping -
The per-column declarations, keyed by logical column name.
-
<string>DatasetFieldMapping -
typestringrequired -
The declared column type.
-
pathstring -
The underlying file column that this logical column reads from. This is a read-path rename: the physical column becomes this single logical column.
-
formatstring -
The date-parse pattern for a declared
datecolumn, mirroring the index date-fieldformat. -
settingsmap string to object -
Format and parsing-specific settings that configure how the resource is read. Common keys include
format, which explicitly selects a registered format, andpartition_detection, which acceptsauto,hive,template, ornone. Additional keys depend on the format reader. Compression can be inferred from the resource URI.
Response
-
acknowledgedbooleanrequired -
For a successful response, this value is always true. On failure, an exception is returned instead.