% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write.R
\name{append_vtr}
\alias{append_vtr}
\title{Append rows to an existing .vtr file}
\usage{
append_vtr(x, path, ...)
}
\arguments{
\item{x}{A \code{vectra_node} (lazy query) or a \code{data.frame}.}

\item{path}{File path of an existing \code{.vtr} file to append to.}

\item{...}{Additional arguments passed to methods.}
}
\value{
Invisible \code{NULL}.
}
\description{
Appends one or more new row groups to the end of an existing \code{.vtr} file
without touching or recompressing existing row groups. The schema of \code{x}
must exactly match the schema of the target file (same column names and
types, in the same order).
}
\details{
The operation is not fully atomic: if the process is interrupted after
new row groups are written but before the header is patched, the file
will be in a corrupted state. Use \code{write_vtr()} for safety-critical
write-once workloads.
}
\examples{
f <- tempfile(fileext = ".vtr")
write_vtr(mtcars[1:10, ], f)
append_vtr(mtcars[11:20, ], f)
result <- tbl(f) |> collect()
stopifnot(nrow(result) == 20L)
unlink(f)

}
