% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_check.R
\name{run_dq_check}
\alias{run_dq_check}
\title{Run a full data quality check pipeline}
\usage{
run_dq_check(dataset_name, config_dir = ".", open_report = TRUE)
}
\arguments{
\item{dataset_name}{Character. Name of the dataset; must match a YAML config
file \code{<dataset_name>.yml} in \code{config_dir}.}

\item{config_dir}{Character. Path to the directory containing
\code{dqcheckr.yml} and the dataset YAML file. Defaults to \code{"."}.}

\item{open_report}{Logical. Whether to open the HTML report in the browser
after rendering (only takes effect in interactive sessions).}
}
\value{
Invisibly, a named list with:
  \describe{
    \item{status}{Overall status string: \code{"PASS"}, \code{"WARN"},
      \code{"FAIL"}, or \code{"INFO"}.}
    \item{report_path}{Absolute path to the rendered HTML report.}
    \item{snapshot_id}{Integer row ID of the snapshot written to SQLite,
      or \code{NULL} if the write failed.}
  }
}
\description{
Orchestrates the complete dqcheckr pipeline: loads configuration, detects
files, runs QC and comparison checks, writes a snapshot to SQLite, and
renders an HTML report.
}
\examples{
\donttest{
tmp <- gsub("\\\\\\\\", "/", tempdir())
dat <- system.file("demonstrations/data/starwars.csv", package = "dqcheckr")
writeLines(c(
  paste0('snapshot_db: "',       tmp, '/snap.sqlite"'),
  paste0('report_output_dir: "', tmp, '"'),
  'default_rules:',
  '  max_missing_rate: 0.60',
  '  min_row_count: 80'
), file.path(tmp, "dqcheckr.yml"))
writeLines(c(
  'dataset_name: "starwars_csv"',
  paste0('current_file: "', dat, '"'),
  'format: csv',
  'encoding: "UTF-8"',
  'delimiter: ","'
), file.path(tmp, "starwars_csv.yml"))
result <- run_dq_check("starwars_csv", config_dir = tmp, open_report = FALSE)
result$status
}

}
