Get ES|QL datasets Technical preview

GET /_query/dataset/{name}

All methods and paths for this operation:

GET /_query/dataset

GET /_query/dataset/{name}

Returns one or more datasets used in ES|QL data federation. A concrete-name miss returns 404; a wildcard pattern or list-all request with no match returns 200 with an empty array.

Required authorization

  • Index privileges: manage
ES|QL Data Federation

Path parameters

  • name string | array[string] Required

    A comma-separated list of dataset names or wildcard patterns. Omit to return all datasets.

Query parameters

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • datasets array[object] Required

      The matching datasets.

      Hide datasets attributes Show datasets attributes object

      Represents a dataset definition stored in cluster state. A dataset is a named reference to external data that participates in the index namespace alongside indices, aliases, and views. Datasets inherit credentials from their referenced data source at query time.

      • name string Required

        The dataset name.

      • data_source string Required

        The name of the referenced data source.

      • resource string Required

        The URI that identifies the data to read, resolved against the referenced data source. It can include glob patterns, for example a recursive pattern that matches Parquet files under s3://logs-bucket/access.

      • description string

        A free-text description.

      • settings object

        Format- and parsing-specific settings that configure how the resource is read. Common keys include format and partition_detection. Additional keys depend on the format reader; compression can be inferred from the resource URI.

        Hide settings attribute Show settings attribute object
        • * object Additional properties
      • mappings object

        The user-declared mapping on the dataset definition.

        Hide mappings attributes Show mappings attributes object
        • dynamic string

          The policy for columns that are not declared in properties. true (the default) infers undeclared columns and overlays the declarations; false makes the declaration the entire schema, so undeclared columns are not queryable.

          Values are true or false.

        • properties object

          The per-column declarations, keyed by logical column name.

          Hide properties attribute Show properties attribute object
          • * object Additional properties

            A per-column declaration inside a dataset mapping's properties.

        • _id object

          The _id meta-field configuration, sourcing the document identity from a column.

GET /_query/dataset/{name}
GET /_query/dataset/access_logs
resp = client.esql.get_dataset(
    name="access_logs",
)
const response = await client.esql.getDataset({
  name: "access_logs",
});
response = client.esql.get_dataset(
  name: "access_logs"
)
$resp = $client->esql()->getDataset([
    "name" => "access_logs",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query/dataset/access_logs"
Response examples (200)
The response contains the requested dataset definition.
{
  "datasets": [
    {
      "name": "access_logs",
      "data_source": "prod_s3_logs",
      "resource": "s3://logs-bucket/access/**/*.parquet",
      "description": "Production access logs",
      "settings": {
        "partition_detection": "hive"
      }
    }
  ]
}
A wildcard or list-all request with no matches returns an empty array.
{
  "datasets": []
}