Data Sources and Credentials
Source:vignettes/data_sources_and_credentials.Rmd
data_sources_and_credentials.Rmd
Usernames, passwords, and other private information will usually be
needed in order to access the data sources required to generate reports.
By default these are retrieved from environment variables. You can
either set these system-wide, or set up an .Renviron
file
as described in https://support.posit.co/hc/en-us/articles/360047157094-Managing-R-with-Rprofile-Renviron-Rprofile-site-Renviron-site-rsession-conf-and-repos-conf.
Note that this is just for convenience, you can also just pass everything as arguments to your function calls.
If you do set environment variables with private information, make sure that these values are not checked into git or otherwise unintentionally exposed.
The environment variables consulted by functions in this package are shown in the table below.
Variable | Description |
---|---|
RP_ODBC_NAME | name of the ODBC data source used to connect to Versatrans databases |
RP_DATABASE | name of the RP database to use |
OS_DATABASE | name of the Onscreen database to use |
OTP_UNCOVERED_ID | URL of a google sheet containing uncovered trips list (required) |
MAIL_TO | comma separated list of email addresses to send notifications to. (required) |
MAIL_FROM | gmail address from which notifications should be sent (required) |
TZ | time zone, defaults to “America/New_York”, |
CURL_SSL_BACKEND | this should always be set to “openssl” (required) |
ZONAR_CUSTOMER | Zonar customer ID (required) |
ZONAR_USER | Zonar user name (required) |
ZONAR_PASS | ZOnar password (required) |
OTP_REPORT_ID | ID of google sheet to write OTP report data to cf. OTP_SHEET |
OTP_REPORT_INTERNAL_ID | ID of google sheet to write internal OTP report data to |
OTP_UNCOVERED_ID | URL of a google sheet containing uncovered trips list (required) |
OTP_AM_RAW_ID | ID of google sheet to write raw AM data to |
OTP_PM_RAW_ID | ID of google sheet to write raw PM data to |
OTP_SHEET | Name of worksheet to write OTP report data to, cf. OTP_REPORTID |
———————— | —————————————————————————- |