Skip to contents

ClickHouseHTTP

CRAN_Status_Badge R-CMD-check

ClickHouse (https://clickhouse.com/) is an open-source, high performance columnar OLAP (online analytical processing of queries) database management system for real-time analytics using SQL. This DBI backend relies on the ‘ClickHouse’ HTTP interface and support HTTPS protocol.

This package has been developed as an alternative to the excellent RClickhouse to provide secured connection through SSL using HTTPS (unfortunately SSL connection is not yet supported by RClickhouse).

The ClickHouseHTTP R package is licensed under GPL-3.

Installation

From CRAN

install.packages("ClickHouseHTTP")

Dependencies

The following R packages available on CRAN are required:

  • methods: Formal Methods and Classes
  • DBI: R Database Interface
  • httr2: Perform HTTP Requests and Process the Responses
  • jsonlite: A Simple and Robust JSON Parser and Generator for R
  • arrow: Integration to ‘Apache’ ‘Arrow’
  • data.table: Extension of data.frame
  • stats: The R Stats Package

And those are suggested:

  • knitr: A General-Purpose Package for Dynamic Report Generation in R
  • rmarkdown: Dynamic Documents for R
  • dplyr: A Grammar of Data Manipulation
  • dbplyr: A ‘dplyr’ Back End for Databases
  • stringi: Fast and Portable Character String Processing Facilities
  • stringr: Simple, Consistent Wrappers for Common String Operations
  • testthat: Unit Testing for R
  • withr: Run Code ‘With’ Temporarily Modified Global State

From github

pak::pkg_install("github::patzaw/ClickHouseHTTP")

Documentation

For detailed guides on using ClickHouseHTTP, please refer to the following vignettes:

To access vignettes from R, use:

browseVignettes("ClickHouseHTTP")

Alternatives

  • RClickhouse is another DBI backend for the ClickHouse database. It provides basic dplyr support by auto-generating SQL-commands using dbplyr and is based on this C++ Clickhouse Client.

  • clickhouse-r is another DBI backend for the ClickHouse database relying on HTTP protocol. It provides SSL support but without peer verification for the moment.

Acknowledgments

This work was supported by UCB Pharma (Early Solutions department).