sync_flds: Synchornize fields in dataframe to match a database table

View source: R/populate_template.R

sync_fldsR Documentation

Synchornize fields in dataframe to match a database table

Description

This function accepts a dataframe, a database name and a table name and adds and optionally removes fields from the dataframe to match the names in the target table. If drop_col=FALSE, extra fields in

Usage

sync_flds(df, targ_db, tablename, drop_cols = TRUE)

Arguments

df
  • a dataframe

targ_db
  • path to our target accdb file

tablename
  • the table name in the target database to query against

drop_cols
  • Boolean, Should extra names in the dataframe be dropped?

Details

the dataframe will remain, if drop_cols=TRUE, extra fields in the dataframe will be removed.

Value

dataframe

Author(s)

Adam Cottrill adam.cottrill@ontario.ca

See Also

get_trg_table_names


AdamCottrill/glfishr documentation built on Aug. 9, 2024, 5:47 p.m.