For each table bundle_plan() includes, one table {prefix}{table} in con: the
dataset's rows cut by the plan's rule, geometry and H3 cell columns dropped (latitude and
longitude stay), and readable columns added beside keys so a row reads without a join:
Arguments
- con
a DuckDB connection
- plan
the data frame from
bundle_plan()- dataset_key
the dataset
- from_sql
named character, table -> a
FROMexpression for the release table (read_parquet('…'), or a parenthesised view such as the catalog'sobs)- prefix
name prefix of the tables written
Value
A data frame, one row per table written (presentation order): table, rows,
n_columns, dropped (comma-separated columns left out), added (comma-separated
columns added). A companion table with no rows is dropped and not listed.
Details
beside
sample_key:site_key,line,station(fromsample;lineandstationparsed from asite_keyof the form090.0 060.0, empty otherwise);beside
site_keyonsampleitself:line,station;beside
taxon_key:scientific_name,common_name(fromtaxon);beside
measurement_type:units(frommeasurement_type).
A column is only added to a table that does not already carry one by that name, and never
to the table it comes from. Rows are stored under ORDER BY ALL, so a table's order is a
function of its content (the zips are hashed). Intermediate tables are dropped.