Type: | Package |
Title: | 'Yandex Clickhouse' Interface for R with Basic 'dplyr' Support |
Version: | 0.6.10 |
Encoding: | UTF-8 |
Description: | 'Yandex Clickhouse' (https://clickhouse.com/) is a high-performance relational column-store database to enable big data exploration and 'analytics' scaling to petabytes of data. Methods are provided that enable working with 'Yandex Clickhouse' databases via 'DBI' methods and using 'dplyr'/'dbplyr' idioms. |
License: | GPL-2 |
Imports: | dplyr (≥ 1.1.0), dbplyr (≥ 2.0.0), methods (≥ 3.3.2), DBI (≥ 1.0.0), Rcpp (≥ 0.11.0), bit64, cli |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | yes |
Depends: | R (≥ 3.6.2) |
Suggests: | testthat |
Collate: | 'RcppExports.R' 'RClickhouse.R' 'ClickhouseDriver.R' 'ClickhouseConnection.R' 'ClickhouseResult.R' 'dbplyr-helpers.R' 'dplyr.R' 'zzz.R' |
URL: | https://github.com/IMSMWU/RClickhouse |
BugReports: | https://github.com/IMSMWU/RClickhouse/issues |
LinkingTo: | Rcpp |
Packaged: | 2025-02-26 09:45:50 UTC; chris-office |
Author: | Christian Hotz-Behofsits [aut, cre], Daniel Winkler [aut], Luca Rauchenberger [aut], Peter Knaus [aut], Clemens Danninger [aut], Daria Yudaeva [aut], Simon Stiebellehner [aut], Dan Egnor [aut], Vlad Losev [aut], Keith Ray [aut], Zhanyong Wan [aut], Markus Heule [aut], Oliver Flasch [aut], Google [cph], Yann Collet [cph, aut] (Yann Collet is the author and copyright holder of 'lz4') |
Maintainer: | Christian Hotz-Behofsits <[email protected]> |
Repository: | CRAN |
Date/Publication: | 2025-02-26 12:40:12 UTC |
RClickhouse
Description
provides access to a clickhouse database
Author(s)
Maintainer: Christian Hotz-Behofsits [email protected]
Authors:
Daniel Winkler [email protected]
Luca Rauchenberger [email protected]
Peter Knaus [email protected]
Clemens Danninger [email protected]
Daria Yudaeva [email protected]
Simon Stiebellehner [email protected]
Dan Egnor
Vlad Losev [email protected]
Keith Ray [email protected]
Zhanyong Wan [email protected]
Markus Heule [email protected]
Oliver Flasch [email protected]
Yann Collet (Yann Collet is the author and copyright holder of 'lz4') [copyright holder]
Other contributors:
Google [copyright holder]
See Also
Useful links:
Class ClickhouseConnection
Description
ClickhouseConnection.
objects are usually created by
dbConnect
Usage
## S4 method for signature 'ClickhouseConnection'
show(object)
## S4 method for signature 'ClickhouseConnection'
dbGetInfo(dbObj, ...)
## S4 method for signature 'ClickhouseConnection'
dbIsValid(dbObj, ...)
## S4 method for signature 'ClickhouseConnection'
dbListTables(conn, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbExistsTable(conn, name, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbReadTable(conn, name, row.names = NA, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbRemoveTable(conn, name, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbListFields(conn, name, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbSendQuery(conn, statement, ...)
## S4 method for signature 'ClickhouseConnection'
dbDataType(dbObj, obj, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbQuoteIdentifier(conn, x, ...)
## S4 method for signature 'ClickhouseConnection,SQL'
dbQuoteIdentifier(conn, x, ...)
## S4 method for signature 'ClickhouseConnection,character'
dbQuoteString(conn, x, ...)
## S4 method for signature 'ClickhouseConnection,SQL'
dbQuoteString(conn, x, ...)
## S4 method for signature 'ClickhouseConnection'
dbBegin(conn, ...)
## S4 method for signature 'ClickhouseConnection'
dbCommit(conn, ...)
## S4 method for signature 'ClickhouseConnection'
dbRollback(conn, ...)
## S4 method for signature 'ClickhouseConnection'
dbDisconnect(conn, ...)
Class ClickhouseDriver
Description
This driver never needs to be unloaded and hence dbUnload()
is a
null-op.
Usage
clickhouse()
## S4 method for signature 'ClickhouseDriver'
show(object)
## S4 method for signature 'ClickhouseDriver'
dbGetInfo(dbObj, ...)
## S4 method for signature 'ClickhouseDriver'
dbIsValid(dbObj, ...)
## S4 method for signature 'ClickhouseDriver'
dbUnloadDriver(drv, ...)
loadConfig(CONFIG_PATHS, DEFAULT_PARAMS, pre_config)
## S4 method for signature 'ClickhouseDriver'
dbConnect(
drv,
host = "localhost",
port = 9000,
dbname = "default",
user = "default",
password = "",
compression = "lz4",
config_paths = c("./RClickhouse.yaml", "~/.R/RClickhouse.yaml",
"/etc/RClickhouse.yaml"),
Int64 = c("integer64", "integer", "numeric", "character"),
toUTF8 = TRUE,
...
)
## S4 method for signature 'ClickhouseDriver'
dbDataType(dbObj, obj, ...)
Arguments
drv |
ClickHouse database driver. |
CONFIG_PATHS |
a list of configuration paths |
DEFAULT_PARAMS |
a list of configuration defaults |
pre_config |
initialization set |
host |
name of the host on which the database is running. |
port |
port on which the database is listening. |
dbname |
name of the default database. |
user |
name of the user to connect as. |
password |
the user's password. |
compression |
the compression method for the connection (lz4 by default). |
config_paths |
paths where config files are searched for; order of paths denotes hierarchy (first string has highest priority etc.). |
Int64 |
The R type that 64-bit integer types should be mapped to, default is bit64::integer64, which allows the full range of 64 bit integers. |
toUTF8 |
logical, should character variables be converted to UTF-8. Default is TRUE. |
Value
a merged configuration
A database connection.
Examples
library(DBI)
RClickhouse::clickhouse()
## Not run:
conn <- dbConnect(RClickhouse::clickhouse(), host="localhost")
## End(Not run)
Class ClickhouseResult
Description
Clickhouse's query results class. This classes encapsulates the result of an SQL
statement (either select
or not).
Usage
## S4 method for signature 'ClickhouseResult'
dbFetch(res, n = -1, ...)
## S4 method for signature 'ClickhouseResult'
dbClearResult(res, ...)
## S4 method for signature 'ClickhouseResult'
dbHasCompleted(res, ...)
## S4 method for signature 'ClickhouseResult'
dbGetStatement(res, ...)
## S4 method for signature 'ClickhouseResult'
dbIsValid(dbObj, ...)
## S4 method for signature 'ClickhouseResult'
dbGetRowCount(res, ...)
## S4 method for signature 'ClickhouseResult'
dbGetRowsAffected(res, ...)
## S4 method for signature 'ClickhouseResult'
dbColumnInfo(res, ...)
Get dbplyr to work with Clickhouse
Description
Functions passed to Clickhouse are case sensitive. By default dbplyr converts functions that are not predefined to upper case. This function changes that behavior to leave passed functions as they are.
Usage
dbplyr_case_sensitive()
Value
No return value, called for side effects.
Return to dbplyrs original behavior
Description
Since Clickhouse functions are case sensitive dbplyr behavior was altered to reflect that. This function will set dbplyr back to its original state of converting unknown functions to upper case.
Usage
fix_dbplyr()
Value
No return value, called for side effects.
adapted from dbplyr
Description
adapted from dbplyr
adapted from dbplyr
Usage
sql_aggregate(f)
sql_aggregate_2(f)
Arguments
f |
SQL function name |