This function syncs db tables from a mysql source db and writes the data into a local SQLite3 db using buffering, with chunk size set to 1e4 items per chunk, in order to avoid out of memory exceptions when moving large tables.

db_sync(
  tables_included,
  tables_excluded = c("hcaf_species_native", "occurrencecells_r"),
  con_src,
  con_dest,
  overwrite_existing = FALSE
)

Arguments

tables_included

a vector of table names in the source db to be included, by default all tables are included except those excluded

tables_excluded

a vector of table names in the source db to be excluded, by default a number of tables are excluded, specify NULL to not explicitly exclude any tables

con_src

db connection to source db

con_dest

db connection to destination db

overwrite_existing

logical to indicate if existing tables at destination db should be overwritten, Default: FALSE

Value

invisible result with vector of boolean status flags for synced tables

See also