clickhouse: DBI database connector for external clickhouse databases

Description Usage Details Value See Also Examples

View source: R/clickhouse.R

Description

clickhouse creates a new DBI driver that can be used to connect and interact with external clickhouse databases.

Usage

1

Details

The clickhouse() function creates the R object which can be used to a call dbConnect which actually creates the connection. Since it has no parameters, it is most commonly used inline with the dbConnect call.

Value

Returns a driver object that can be used in calls to dbConnect with an external clickhouse database.

See Also

dbConnect for documentation how to invoke the driver

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(DBI)
con <- dbConnect(clickhouse::clickhouse(), host="localhost", port=8123L, user="default", password="")
dbWriteTable(con, "mtcars", mtcars)
dbListTables(con)
dbGetQuery(con, "SELECT COUNT(*) FROM mtcars")
d <- dbReadTable(con, "mtcars")
dbDisconnect(con)

## End(Not run)

hannesmuehleisen/clickhouse-r documentation built on May 17, 2019, 2:28 p.m.