% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tables.R
\name{table_sink}
\alias{table_sink}
\title{Create a table sink for row-group or partitioned outputs}
\usage{
table_sink(
  schema,
  mode = c("row_groups", "partitioned"),
  path = NULL,
  format = c("auto", "rds", "native")
)
}
\arguments{
\item{schema}{A \code{shard_schema}. If NULL, a schema-less sink is created (RDS
format only). This is primarily intended for doShard/foreach compatibility
where output schemas may not be known in advance.}

\item{mode}{\code{"row_groups"} (temp, managed) or \code{"partitioned"} (persistent path).}

\item{path}{Directory to write row-group files. If NULL, a temp dir is created.}

\item{format}{Storage format for partitions: \code{"rds"} (data.frame RDS),
\code{"native"} (columnar encoding with string offsets+bytes), or \code{"auto"}
(selects \code{"native"} if the schema contains \code{string_col()}; otherwise \code{"rds"}).}
}
\value{
A \code{shard_table_sink} object.
}
\description{
A table sink supports variable-sized outputs without returning large
data.frames to the master. Each shard writes a separate row-group file.
}
\details{
v1.1 implementation notes:
\itemize{
\item Storage format is per-shard RDS (portable, CRAN-friendly).
\item This guarantees bounded master memory during execution; final collection
may still be large if you materialize.
}
}
\examples{
\donttest{
s <- schema(x = float64(), label = string_col())
sink <- table_sink(s, mode = "row_groups")
}
}
