db_sync: Sync a MariaDB/MySQL database to a local SQLite3 db

Description Usage Arguments Value See Also

View source: R/db.R

Description

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.

Usage

1
2
3
4
5
6
7
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

Other admin: am_custom_query(), am_db_duckdb(), am_db_sqlite(), am_use_offline_db(), con_am(), db_disco(), db_minify_path(), db_minify(), default_db(), http_ping()


raquamaps/aquamapsdata documentation built on Feb. 25, 2021, 10:28 p.m.