db_read_table.Rd
Return data objects stored in tables and views in the Atlas database.
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
)
character
. Name of the table to be accessed.
character
default 'public'. Schema from the database where
the table is located.
Can be either public
, api
, public_api
, or atlas_api
.
Optional. logical
default FALSE
. If TRUE
,
returns an sf
object using the geometry
column from the table.
logical
default TRUE
. If TRUE
, returns a
data.frame
object with nested objects flattened.
Optional. integer
default NULL
. Maximum number of rows to
return. If NULL
, all rows are returned. From the PostgREST API syntax.
Optional. character
default NULL
. List of columns to
return. All columns are returned if NULL
. From the PostgREST API syntax.
Additional parameters to be passed as query to the API table_name.
Optional. integer
default 4
. Number of cores to use for
parallel processing. If 1
, no parallel processing is used. If NULL
, the
function will automatically determine the number of cores to use based on
the number of available cores on the system.
Optional. integer
default NULL
. Number of pages to
download. ' If NULL
, the number of pages is estimated from the number of
rows in the table.
Optional. integer
default 500000
. Maximum number of
rows to download per page. This parameter is used to estimate the number of
pages to download if .n_pages
is NULL
.
tibble
or sf
with rows associated with Atlas data object
This function is designed to interface with a web API deployed with PostgREST.