If your target table is in a database, the
is a handy way of accessing it. This function simplifies the process of
tbl_dbi object, which usually involves a combination of building
a connection to a database and using the
dplyr::tbl() function with the
connection and the table name (or a reference to a table in a schema). A
better option is to use this function as the
read_fn parameter in
create_informant(). This can be done by using a
read_fn = ~db_tbl(...)).
The username and password are supplied though environment variables. If
desired, these can be supplied directly by enclosing those values in
db_tbl(db, dbname, table, user, password, host = NULL, port = NULL)
Either an appropriate driver function (e.g.,
The database name.
The name of the table, or, a reference to a table in a schema
(two-element vector with the names of schema and table). Alternatively,
this can be supplied as a data table to copy into an in-memory database
connection. This only works if: (1) the
The environment variables used to access the username and password for the database.
The database host and optional port number.