Skip to contents

Inserts the rows from a temporary "update" database (built by build_database() with is_update = TRUE) into a base database in place, aligning schemas. This is the local counterpart of merge_databases(): pair it with download_s3_database() to update a large archive without streaming the whole thing through httpfs.

Usage

append_to_database(
  target_db,
  temp_db_path,
  tables = base::c("KEYS", "FLATXML", "ATTRIBUTES")
)

Arguments

target_db

Path to the base DuckDB to append into (modified in place).

temp_db_path

Path to the temporary DuckDB with the new filings.

tables

Character vector of tables to append (default c("KEYS", "FLATXML", "ATTRIBUTES")).

Value

Invisibly, target_db.