Executes one query per module named in the study configuration and returns
the raw tables alongside a manifest of what was pulled. This is the R port
of tp.stXXXX_dwpull.sas.
Arguments
- config
A
study_configfromread_study_config().- conn
A DBI::DBIConnection, typically from
dw_connect().
Value
An object of class pull_result: a list with tables, a named
list of data frames keyed by each module's output name, and manifest,
a data frame with columns module, output, n_rows, n_cols, and
pulled_at.
Details
The port is read-only. The SAS templates also upload a cohort table to the warehouse; that write is deliberately not carried here and is deferred to a later slice with its own review.
A module that returns zero rows is an error unless its definition declares it optional. A silently empty module produces a quietly incomplete dataset, which is the failure this package exists to prevent.