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

\item{path}{File path for the output CSV file.}

\item{...}{Reserved for future use.}
}
\value{
Invisible \code{NULL}.
}
\description{
For \code{vectra_node} inputs, data is streamed batch-by-batch to disk without
materializing the full result in memory. For \code{data.frame} inputs, the data
is written directly.
}
\examples{
f <- tempfile(fileext = ".vtr")
write_vtr(mtcars[1:5, ], f)
csv <- tempfile(fileext = ".csv")
tbl(f) |> write_csv(csv)
unlink(c(f, csv))

}
