ds_search_sql {ckanr} | R Documentation |
Datastore - search or get a dataset from CKAN datastore
Description
Datastore - search or get a dataset from CKAN datastore
Usage
ds_search_sql(
sql,
url = get_default_url(),
key = get_default_key(),
as = "list",
...
)
Arguments
sql |
(character) A single SQL select statement. (required) |
url |
Base url to use. Default: https://data.ontario.ca/ See
also |
key |
A privileged CKAN API key, Default: your key set with
|
as |
(character) One of list (default), table, or json. Parsing with
table option uses |
... |
Curl args passed on to |
Examples
## Not run:
url <- 'https://demo.ckan.org/'
sql <- 'SELECT * from "f4129802-22aa-4437-b9f9-8a8f3b7b2a53" LIMIT 2'
ds_search_sql(sql, url = url, as = "table")
sql2 <- 'SELECT "Species","Genus","Family" from "f4129802-22aa-4437-b9f9-8a8f3b7b2a53" LIMIT 2'
ds_search_sql(sql2, url = url, as = "table")
## End(Not run)
[Package ckanr version 0.7.0 Index]