For any ship codes that remain unmatched after match_ships(), inserts
interim placeholder rows into the ship table with ship_nodc = "?SK?"
(where SK is the 2-letter ship_key). This allows downstream operations
(cruise_key derivation, FK joins) to proceed without errors. Placeholder
ships are flagged via the "?" markers for later resolution via
metadata/ship_renames.csv.
Arguments
- con
DBI connection to DuckDB with a
shiptable- match_result
Tibble from
match_ships()withmatch_typeandship_codecolumns. Rows withmatch_type == "unmatched"get interim entries.- ship_tbl
Name of ship table (default:
"ship")
Examples
if (FALSE) { # \dontrun{
result <- match_ships(unmatched, reference)
n_interim <- ensure_interim_ships(con, result)
} # }