dbCfg: Parse standard database configuration file format

Description Usage Arguments Details See Also

View source: R/util-dbUtil.R

Description

Read database config file with key=value format: key=value key2=value2 etc. into a named list. Keys must include dbType passed in to DBI::dbDriver to load the appropriate driver (i.e. MySQL, PostgreSQL, SQLite, etc.) and any parameters like host, user, password, dbname that should be passed into the DBI::dbConnect function call for your driver.

Usage

1
dbCfg(filePath)

Arguments

filePath

The file path to the config file to be read in. Must be absolute or relative to the working directory from getwd()

Details

The result of this function call is just a list with named entries. As long as the entries are valid, it can be generated in other ways. Note that the ability to specify a single file that contains database configuration information allows for multiple users to share a code based, but provide their personal credentials in their copy of the relevant cfg file. Due to the inevitability of code conflicts with these files where user names and passwords are different for each user and the fact that it is insecure and unwise to include database credentials in any version control system, this means that such dbCfg files should not be checked into version control.

See Also

conf.dbCon, run.query


ConvergenceDA/visdom documentation built on May 6, 2019, 12:51 p.m.