Skip to contents

find_address_tables() lists the tables and views in the current schema whose name contains address, with the required columns they lack (person_id, zip5, address_start, address_end, preferred) and their row count. resolve_address_table() chooses the table derive_geography_features() uses, and stops instead of guessing: "auto" takes the one non-empty table with those columns (so a study's own <study>_address_history is found as well as person_address_history), stops naming them when there are several, and falls back to person.location_id (returns NULL) only when some person has a ZIP there; otherwise it stops and lists what it looked at, because every stay would get no SDI / RUCA. A name given explicitly must exist and have the columns. NULL always means person.location_id.

Usage

find_address_tables(con)

resolve_address_table(con, address_table = "auto")

Arguments

con

A DBI connection.

address_table

"auto", a table name, or NULL.

Value

find_address_tables(): data frame table, missing_columns, rows. resolve_address_table(): a table name or NULL.