Runs the full QC check suite (QC-01 to QC-16, SC-01, SC-02) against a single dataset snapshot.
Arguments
- df
Character. DuckDB table name as returned by
read_dataset.- config
Named list. Merged configuration as returned by
load_config.- file_path
Character. Path to the source file; used for the
max_file_size_mbcheck. PassNULLto skip the size check.- con
A DuckDB connection from
DBI::dbConnect(duckdb::duckdb()).
Value
A list of dq_result objects.
Examples
# \donttest{
cfg_dir <- system.file("demonstrations/config", package = "dqcheckr")
cfg <- load_config("starwars_csv", config_dir = cfg_dir)
path <- system.file("demonstrations/data/starwars.csv", package = "dqcheckr")
con <- DBI::dbConnect(duckdb::duckdb(), dbdir = ":memory:")
#> Error in (function (cond) .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = "there is no package called ‘duckdb’", call = loadNamespace(x), package = "duckdb", lib.loc = NULL), class = c("packageNotFoundError", "error", "condition"))): error in evaluating the argument 'drv' in selecting a method for function 'dbConnect': there is no package called ‘duckdb’
tbl <- read_dataset(path, cfg, con = con)
#> Error in read_dataset(path, cfg, con = con): unused argument (cfg)
results <- run_qc_checks(tbl, cfg, file_path = path, con = con)
#> Error in run_qc_checks(tbl, cfg, file_path = path, con = con): unused argument (cfg)
DBI::dbDisconnect(con, shutdown = TRUE)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'conn' in selecting a method for function 'dbDisconnect': object 'con' not found
# }