Describe a PSA OpenSTAT dataset
describe_psa_datasetRetrieve the dimensions and valid value codes of a PSA OpenDataset to inform subsequent queries.
Instructions
Read the dimensions and valid value codes of one PSA OpenSTAT dataset.
Call this before query_psa_dataset. The query tool needs an explicit value code for every dimension, and those codes live here. total_cells is the size of the full cube. A query must select down to max_cells_per_query or fewer, so pick explicit codes per dimension. Examples:
describe_psa_dataset("1F/FY/0241F3DF013.px") dimensions and value codes for one table
On failure: data_status is "invalid_request" for a rejected argument
and "unavailable" for an OpenSTAT outage. A path
that is not a .px dataset sets validation_error true before any
request goes out. An unreadable dataset sets upstream_error true, with
the real error in caveats. Both return an empty dimensions list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_path | Yes | Relative path to a `.px` dataset, for example "1F/FY/0241F3DF013.px". Take it from the `path` field of a browse_psa_catalog dataset entry. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| title | No | ||
| source | Yes | Upstream data source name. | |
| caveats | Yes | ||
| license | No | ||
| dimensions | Yes | ||
| source_url | Yes | Canonical OpenSTAT URL used. | |
| total_cells | No | Size of the full cube. | |
| dataset_path | Yes | ||
| upstream_error | No | True when OpenSTAT was unreachable. Not an empty result. | |
| time_dimensions | No | ||
| validation_error | No | True when the caller's arguments were rejected before any request. | |
| data_retrieved_at | Yes | ||
| max_cells_per_query | No |