Build query to read in subset table from postgres database.
Source:R/fpr_dbq_subset.R
fpr_dbq_subset.Rd
Build query to read in subset table from postgres database.
Usage
fpr_dbq_subset(
col_partition = "utm_zone",
col_select = "*",
schema = "bcfishpass",
table = "crossings",
num_rows = 100,
randomize = TRUE,
col_order = "aggregated_crossings_id",
...
)
Arguments
- col_partition
String (quoted) name of column to partition table on. See column names of any table with fpr_dbq_lscols
- col_select
String (quoted) name of columns to select from the table. Must include the `col_order` and `col_partition`.
- schema
Character string (quoted) name of target postgres db schema. See names of schemas with fpr_dbq_lstables
- table
Character string (quoted) name of target postgres db table See names of schemas with fpr_dbq_lstables
- num_rows
Number of rows to slice (if available) from each partitioned section of table.
- randomize
Logical (TRUE or FALSE) of whether to choose rows within partitioned subsets optionally. If FALSE `col_order` needs to be specified
- col_order
String (quoted) name of column to order partitioned table subsets before sliced. See column names of any table with fpr_dbq_lscols
Value
Text string to insert into fpr_db_conn call
See also
Other database postgres:
fpr_db_conn()
,
fpr_db_query()
,
fpr_dbq_clip()
,
fpr_dbq_lscols()
,
fpr_dbq_lstables()
Examples
if (FALSE) fpr_db_query(query = fpr_dbq_subset())