This backend supports databases accessed via JDBCConnection created by
RJDBC::JDBC() and DBI::dbConnect(). dbplyr automatically detects the
underlying database type from the JDBC connection class and uses the
appropriate SQL dialect.
The following databases are recognized via their JDBC connection class:
PostgreSQL (
org.postgresql.*):dialect_postgres()MySQL (
com.mysql.*):dialect_mysql()MariaDB (
org.mariadb.*):dialect_mariadb()SQLite (
org.sqlite.*):dialect_sqlite()Oracle (
oracle.*):dialect_oracle()SQL Server (
com.microsoft.sqlserver.*):dialect_mssql()SAP HANA (
com.sap.db.*):dialect_hana()Teradata (
com.teradata.*):dialect_teradata()Apache Hive (
org.apache.hive.*):dialect_hive()Apache Spark (
org.apache.spark.*orcom.simba.spark.*):dialect_spark_sql()Snowflake (
net.snowflake.*):dialect_snowflake()Impala (
com.cloudera.impala.*):dialect_impala()Amazon Redshift (
com.amazon.redshift.*):dialect_redshift()
If your database is not recognized, dbplyr will fall back to a generic ODBC dialect. Please file an issue if you'd like support for additional databases.
See vignette("translation-function") and vignette("translation-verb") for
details of overall translation technology.
See also
with_dialect() to use a different dialect if dbplyr guesses
incorrectly, or a more specific translation is available.
Examples
# JDBC connections require the RJDBC package and a JDBC driver JAR file.
# Once connected, dbplyr automatically detects the database type:
#
# library(RJDBC)
# library(dplyr, warn.conflicts = FALSE)
#
# drv <- JDBC("org.postgresql.Driver", "postgresql.jar")
# con <- dbConnect(drv, "jdbc:postgresql://localhost/mydb", "user", "password")
# tbl(con, "my_table") |> filter(x > 1)
