Load foreign key tables for the CL-PFU database from a spreadsheet
load_fk_tables.RdThe SchemaAndSimpleTables.xlsx file contains a sheet that
represents the schema for the CL-PFU database.
The sheet is designed to enable easy changes to the CL-PFU database schema
for successive versions of the database.
All other tabs (besides readme_sheet) are foreign key tables.
This function reads all foreign key tables from the SchemaAndSimpleTables.xlsx file
and returns a named list of those tables, each in data frame format.
Usage
load_fk_tables(
version,
simple_tables_path = PFUSetup::get_abs_paths(version = version)[["schema_path"]],
readme_sheet = "README",
schema_sheet = "Schema",
.table = PFUPipelineTools::schema_table_colnames$table,
.colname = PFUPipelineTools::schema_table_colnames$colname,
.coldatatype = PFUPipelineTools::schema_table_colnames$coldatatype
)Arguments
- version
The database version for input information.
- simple_tables_path
The path to the file containing simple tables. Default is
PFUSetup::get_abs_paths()[["schema_path"]]- readme_sheet
The name of the sheet in the file at
simple_tables_paththat contains readme information. Default is "README".- schema_sheet
The name of the sheet in the in the file at
simple_tables_paththat contains schema information.` Default is "Schema".- .table, .colname, .coldatatype