Datamesh Stage Query
datamesh_stage_queryDry-run a Datamesh query to report result size without downloading data, so you can check if it fits inline retrieval.
Instructions
Dry-run a query: report the result size WITHOUT downloading any data.
Always stage before retrieving data you have not sized. The response says whether the result is small enough for query_data to return inline, and echoes the canonical query. With limit plus time_resolution or aggregate_operations the reported size is that of the unlimited result (limit is applied after resampling), so it is an upper bound.
A variable given as the exact CF standard_name of exactly one of the datasource's variables (e.g. "sea_surface_wave_significant_height" for "hs") is resolved to that variable; the response then includes resolved_variables ({requested: used}) and echoes the resolved names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crs | No | CRS for filter coordinates and returned data (EPSG code or CRS string). | |
| bbox | No | Bounding box [xmin, ymin, xmax, ymax] in WGS84 (or crs units if crs is set). | |
| limit | No | Keep only the last N records (Datamesh semantics: the last N steps along time/ensemble). Combined with time_resolution or aggregate_operations it is applied AFTER resampling/aggregation (by this server, not sent to Datamesh), so stage_query sizes the unlimited result as an upper bound; hosted export_query refuses that combination. | |
| times | No | Discrete times to select (series selection). Mutually exclusive with time_start/time_end. | |
| levels | No | Discrete vertical levels to select (series selection). Mutually exclusive with level_min/level_max. | |
| time_end | No | ISO 8601 end of a time range. Open-ended if omitted. | |
| level_max | No | Maximum vertical level of a range. | |
| level_min | No | Minimum vertical level of a range. | |
| variables | No | List of variable names to select (e.g. ["temperature", "salinity"]). | |
| time_start | No | ISO 8601 start of a time range (e.g. "2023-01-01T00:00:00Z"). Open-ended if omitted. | |
| level_interp | No | Interpolation for level series selection: nearest or linear. | |
| coord_filters | No | Additional coordinate selections, e.g. [{"coord": "station", "values": ["A1", "B2"]}]. | |
| datasource_id | Yes | The datasource to query. | |
| time_resample | No | Resampling method when time_resolution is set: mean, nearest, or linear. | |
| time_resolution | No | Downsample a time range server-side to this resolution (pandas frequency string, e.g. "1h", "6h", "1D", "7D", or "30D" for roughly monthly). Drastically shrinks long time series. Monthly/quarterly/yearly calendar aliases (MS, ME, QS, YS) are not supported until a Datamesh engine fix ships: use "30D", "90D" or "365D". Finer than 1 minute is refused. | |
| geofilter_interp | No | Interpolation for feature selection: nearest or linear (default linear). | |
| aggregate_spatial | No | Aggregate over spatial dimensions (default true). | |
| geofilter_feature | No | GeoJSON Feature object (Point, MultiPoint, or Polygon geometry) for spatial selection/interpolation. Mutually exclusive with bbox. | |
| aggregate_temporal | No | Aggregate over the temporal dimension (default true). | |
| aggregate_operations | No | Aggregations to apply after filtering: mean, min, max, std, sum. | |
| geofilter_resolution | No | Maximum spatial resolution for downsampling, in CRS units. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |