View source: R/statswales_get_query.R
| statswales_get_query | R Documentation |
Returns the full configuration of a stored query, including the applied
filters, total row count, column mappings, and the underlying SQL.
The filter_id is returned by any call to statswales_get_dataset() (via
the POST /data step) or statswales_get_pivot().
statswales_get_query(dataset_id, filter_id)
dataset_id |
A dataset UUID string. |
filter_id |
A 12-character query identifier returned by the API. |
To retrieve the filter_id directly, call statswales_create_query().
A list containing the stored query details:
idThe filter ID.
totalLinesTotal number of rows matching the query.
requestObjectThe filter and options that were submitted.
columnMappingMapping between internal column names and display names, per language.
queryA named list of SQL strings keyed by language code.
Returns NULL if the request fails.
## Not run:
datasets <- statswales_list_datasets()
id <- datasets$id[1]
fid <- statswales_create_query(id)
query_info <- statswales_get_query(id, fid)
query_info$totalLines
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.