Create a stored query and return its filter ID
Source:R/statswales_create_query.R
statswales_create_query.RdSubmits a set of filters and display options to the API and returns the resulting filter ID. The same inputs always produce the same ID, so this is useful for building shareable, reproducible data requests.
Usage
statswales_create_query(
dataset_id,
filter = NULL,
options = list(use_raw_column_names = FALSE, use_reference_values = FALSE,
data_value_type = "formatted")
)Arguments
- dataset_id
A dataset UUID string. Use
statswales_list_datasets()to find dataset IDs.- filter
Filter criteria in the same format as
statswales_get_dataset().- options
Display options in the same format as
statswales_get_dataset().
Details
Pass the returned filter_id to statswales_get_query() to inspect the
query configuration, or use it directly in statswales_get_dataset() /
statswales_download_dataset() workflows.
Examples
if (FALSE) { # \dontrun{
datasets <- statswales_list_datasets()
id <- datasets$id[1]
fid <- statswales_create_query(id)
statswales_get_query(id, fid)
} # }