Skip to contents

This function combines tables (ATTRIBUTES, FLATXML, KEYS) from multiple worker databases into a single main DuckDB database. It aligns schemas, handles transactions, and logs merge details.

Usage

merge_duckdbs(main_db, worker_dbs, overwrite = FALSE, cleanup = FALSE)

Arguments

main_db

Path to the output DuckDB database (will be created if missing).

worker_dbs

Character vector of worker database file paths.

overwrite

Logical; if TRUE, deletes existing main database before merging.

cleanup

Logical; if TRUE, deletes worker databases after merging.

Value

Invisibly returns the path to the merged database.