Generic function to access data from tables and views in Atlas database
db_read_table.RdReturn data objects stored in tables and views in the Atlas database.
Usage
db_read_table(
table_name,
schema = "public",
output_geometry = FALSE,
output_flatten = TRUE,
limit = NULL,
select = NULL,
...,
.cores = 4,
.n_pages = NULL,
.page_limit = 10000
)Arguments
- table_name
character. Name of the table to be accessed.- schema
characterdefault 'public'. Schema from the database where the table is located. Can be eitherpublic,api,public_api, oratlas_api.- output_geometry
Optional.
logicaldefaultFALSE. IfTRUE, returns ansfobject using thegeometrycolumn from the table.- output_flatten
logicaldefaultTRUE. IfTRUE, returns adata.frameobject with nested objects flattened.- limit
Optional.
integerdefaultNULL. Maximum number of rows to return. IfNULL, all rows are returned. From the PostgREST API syntax.- select
Optional.
characterdefaultNULL. List of columns to return. All columns are returned ifNULL. From the PostgREST API syntax.- ...
Additional parameters to be passed as query to the API table_name.
- .cores
Optional.
integerdefault4. Number of cores to use for parallel processing. If1, no parallel processing is used. IfNULL, the function will automatically determine the number of cores to use based on the number of available cores on the system.- .n_pages
Optional.
integerdefaultNULL. Number of pages to download. ' IfNULL, the number of pages is estimated from the number of rows in the table.- .page_limit
Optional.
integerdefault500000. Maximum number of rows to download per page. This parameter is used to estimate the number of pages to download if.n_pagesisNULL.