Identifies a table in the OJO database from which to query data. Remember to run connect_ojo()
to establish a connection before attempting to query and to close the connection afterwards with disconnect_ojo()
.
Arguments
- table
The name of a table in the OJO database. To get a list of tables, run
ojo_list_tables()
- schema
The name of a schema in the OJO database. To get a list of schemas, run
ojo_list_schemas()
- ...
Placeholder
- .con
The ojodb connection to use
- .source
The source of the table. Options are 'postgres', 'gcs_duckdb', and 'gcs_arrow'. Default is 'postgres'.
Value
A pointer to a table that can be passed to dplyr functions and/or pulled into a dataframe using ojo_collect()
Examples
if (FALSE) { # \dontrun{
# Identifies the table
ojo_tbl("case")
# Pulls down case information data for every Tulsa felony filed in 2020 into a dataframe d
d <- ojo_tbl("case") %>%
filter(district == "TULSA", case_type == "CF", year == 2020) %>%
collect()
} # }