IMSMWU/RClickhouse

Working with clickhouse-local

Closed this issue · 3 comments

Any chance this will work with clickhouse-local? That would be awesome.

What features specifically would you have in mind? A full-blown wrapper for clickhouse-local would be well beyond our resources. Especially since clickhouse-local is evolving rapidly and, unlike our package/the R-world, leverages the latest C++ standards. The central idea of this package is to provide a minimal and robust database interface; everything else is not easy to provide/maintain.

I saw on the Clickhouse roadmap that clickhouse is moving toward something embeddable ala DuckDB, but they haven't shared details on how this would happen.

I don't know, I imagine it would not be impossible to do the following: R would open an instance of clickhouse-local (presuming clickhouse-local was in $PATH) but from the directory of getwd(), so that would permit one to do things like

dbGetQuery(con,"select * from file('file_in_this_folder.parquet')")

or whatever operation you wanted to do.

Indeed, it would be possible to create a wrapper around a process. However, from a software engineering point of view, this is neither easy to create nor maintain (system calls are not lightweight, hard to manage/test and highly depend on the OS in use). Consequently, a wrapper on C++ level would be a better way to go. However, we simply don't have the resources for something like this, but you are welcome to contribute.