Skip to contents

Update the DuckDB database for a given tax year

Usage

update_db(
  year,
  index,
  path = ".",
  version = "efile_v2_3",
  source_db = NULL,
  ccf = NULL,
  workers = NULL
)

Arguments

year

Integer tax year.

index

Data frame with TaxYear and URL columns.

path

Directory for the temporary and merged database files.

version

S3 version subfolder under duckdb/ (default "efile_v2_3").

source_db

Optional path to a local .duckdb. When given, missing filings are found against it and appended to it in place with append_to_database(); nothing is read from or written to S3.

ccf

Concordance used to label the new filings (passed to build_database()). New filings must carry the same labels as the archive. NULL (default) uses release_concordance() for the archive's release: version for an S3 archive, or the release recorded in source_db's RELABEL_LOG for a local one (falling back to get_concordance() when it has none). A release with no packaged concordance, such as efilepf_v2_3, stops with an error; pass ccf for those.

workers

Passed to build_database().

Value

Invisibly path to merged database or NULL.