ch_union_query: Build a ClickHouse 'UNION' query from several sub-queries

View source: R/ClickHouse.R

ch_union_queryR Documentation

Build a ClickHouse UNION query from several sub-queries

Description

Wraps each input sub-query as a derived table and combines them with ⁠UNION DISTINCT⁠ or ⁠UNION ALL⁠. A single sub-query is returned wrapped but without any UNION clause.

Usage

ch_union_query(queries, mode = c("DISTINCT", "ALL"))

Arguments

queries

a character vector of SELECT sub-queries to combine

mode

the union mode: "DISTINCT" (default) to deduplicate rows across sub-queries, or "ALL" to keep every row

Value

A character string with the assembled UNION query.

See Also

ch_join_query()


TKCat documentation built on June 29, 2026, 9:06 a.m.