A Tool to Ensure the Validity of Database Writes

A tool to ensure the validity of database writes. It provides a set of utilities to analyze and type check the properties of data frames that are to be written to databases with SQL support.


  1. Generate personal access token PAT through your Github account (https://github.com/settings/tokens)
  • Give it repo, read:repo_hook, read:org, and read:gpg_key rights (if possible)
  1. In RStudio, do:
devtools::install_github('newshipt/dbfaker', auth_token=<put your PAT here>)


# parse cli arguments
option_list <- list(
  make_option(c("-d", "--date"),
              default=as.character(as_date(with_tz(Sys.time(), "GMT"))),
              help="date of execution"),
  make_option(c("-t", "--test"),
              help="execute tests and mask writes to databases")
opt <- parse_args(OptionParser(option_list=option_list))
# execute with parsed arguments
run(opt$date, opt$test)
# main function which encapsulates high level functions of your program
run <- function(date, test) {
  ifelse(test, dbfaker::verifyWrite(...), writeData(...))
# components of your program
readData <- function(...) {}
transformData <- function(...) {}
trainModel <- function(...) {}
writeData <- function(...) {


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.0 by Hari Mohanraj, 4 years ago

Browse source code at https://github.com/cran/dbfaker

Authors: Hari Mohanraj [aut, cre]

Documentation:   PDF Manual  

Task views: Databases with R

MIT + file LICENSE license

Imports parsedate, tidyr, RPostgreSQL, DBI, foreach, dplyr, assertive

Suggests testthat, knitr, rmarkdown, doMC

See at CRAN