Database access occurs inside THIP. This may request column metadata; records are fetched only when the lazy query is printed or collected. Multiple compatible tables are stacked with UNION ALL, preserving duplicates. Column order is aligned explicitly. Base types must match; Nullable and LowCardinality wrappers may differ. No clinical harmonization is performed. Use separate datasets for different kinds of records (e.g. vaccinations and admissions). Metadata checks cannot establish semantic compatibility.
Usage
thip_table(
con,
tables = NULL,
.id = NULL,
table = NULL,
dates = NULL,
date_format = NULL,
datetimes = NULL,
datetime_format = NULL,
timezone = NULL
)Arguments
- con
A connection returned by [thip_connect()].
- tables
One or more unique distributed table names.
- .id
Optional new column containing the source table name.
- table
Deprecated singular argument, accepted for compatibility.
- dates, datetimes
Named character mappings `new_column = "source_column"`. Originals are retained. NULL (default) performs no conversion.
- date_format, datetime_format
Explicit source format: one string for each mapping group, or a named vector keyed by output column. Supported formats are ` ` set of R-style formats, not arbitrary strptime syntax.
- timezone
Required IANA zone (e.g. "UTC") for datetimes. No zone is inferred from source text or the server. Ambiguous DST times should be resolved upstream; offset-bearing strings are not accepted.
Details
Conversion stays lazy. Dates use Date32 and retain the source calendar date, explicitly discarding any clock time. Datetimes use DateTime64(3) and preserve milliseconds. Blank, NULL, malformed, impossible or out-of-range values become SQL NULL (R NA); original text remains available for auditing. Supported calendar years are 1900-2299. Timestamp DST gaps that fail a clock round-trip become NULL. No best-effort format guessing is performed.