Establishes a connection to the WDFW PostgreSQL database.
Requires either a local config.yml file (default) or a configured ODBC DSN.
The config path uses driver from the RPostgres package and is preferred for performance, particularly during build database writes.
Note: when called in a non-interactive session (scheduled render or automated script), the password prompt will block execution.
Usage
establish_db_con(
conn_type = c("config", "odbc"),
dsn = "creel_estimates",
config_path = "config.yml"
)Value
A DBI connection to a PostgreSQL database management system. Recommend that this object be named "con".
See also
Other internal_data:
fetch_db_table()
