I started to write a dplyr sql-backend for the clickhouse database based on Hannes Mühleisen's DBI-implementation (https://github.com/hannesmuehleisen/clickhouse-r). The connection itself should work, but I receive this strange error, when I use the new src_dbi method in "src_clickhouse":
#' @import methods
#' @importFrom dplyr src_dbi
#' @importFrom DBI dbConnect
#' @export
src_clickhouse <- function(dbname = "default", host = "localhost", port = 8123L, user = "default",
password = "", ...) {
if (!requireNamespace("dplyr", quietly = TRUE)) {
stop("dplyr is required to use src_clickhouse", call. = FALSE)
}
con <- dbConnect(clckhs::Clickhouse(), host = host, dbname = dbname,
user = user, password = password, port = port, ...)
src_dbi(con)
}
(I am using the lastest master-version 0.5.0.9000), but it seems, like src_dbi is not available:
> test_con <- src_clickhouse(host="172.17.0.5", port = 8123L) Error in src_clickhouse(host = "172.17.0.5", port = 8123L) :
could not find function "src_dbi"