This function allows you to extract unique values from a table's column to use as partitions.
Internally, this function does "SELECT DISTINCT(mycolumn
) FROM mytable
;"
Arguments
- conn
A
DBIConnection
object, as return byDBI::dbConnect
- table
a DB table name
- column
a column name for the table passed in param
Examples
dbi_connection <- DBI::dbConnect(RSQLite::SQLite(),
system.file("extdata","iris.sqlite",package = "parquetize"))
get_partitions(dbi_connection, "iris", "Species")
#> [1] "setosa" "versicolor" "virginica"