add_time_map_keys_parallel: Add time_map keys to remote database (in parallel)

add_time_map_keys_parallelR Documentation

Add time_map keys to remote database (in parallel)

Description

This function adds time_map keys, created by 'build_time_map_keys()' to a remote database. Keys can be added temporarily and/or overwritten. This function will first check if outpatient or inpatient keys already exist, and if overwite is set to FALSE it will not proceed. NOTE: This function generally only needs to be run once, after the mini database has been constructed.

Usage

add_time_map_keys_parallel(
  collect_tab = collect_table(),
  db_path,
  db_con,
  num_cores = NULL,
  overwrite = FALSE,
  temporary = TRUE
)

Arguments

collect_tab

a collection table to build time_map from. By default all years will be used

db_path

Path to the database

db_con

a connection to a database

num_cores

The number of worker cores to use. If not specified will use 10. If NULL is specified then it will determine the number of cores based on the which ever is the smallest value between number of rows in for collect_tab or detected number of cores - 1

overwrite

a logical indicator. If TRUE the existing inpatient_keys and/or outpatient_keys tables will be overwritten

temporary

a logical indicator. If TRUE the tables will only be added temporarilly to the database.

Value

Nothing will be returned, but tables may be added to the remote database


aarmiller/smallDB documentation built on March 29, 2024, 9:37 a.m.