Questions tagged [r-dbi]

DBI is an R package providing a common interface to several databases (currently MySQL, PostgreSQL, SQLite and Oracle are supported, as well as JDBC connections).

DBI is an package providing a common interface to several databases (currently , , and are supported, as well as connections).

Repositories

Other resources

Packages that extend DBI

Users don't often work directly with DBI; you probably want one of these

Related tags

272 questions
-1
votes
2 answers

Missing table in PostgreSQL database

I was able to connect to the database, write the table, read it, but the dbGetQuery command gives an error Error: Failed to prepare query: ERROR: relation "table" does not exist LINE 1: SELECT DISTINCT ym.s.date FROM table. And the dbListTables…
KOs
  • 1
  • 2
-1
votes
2 answers

Safely parametrize WHERE ... IN lists for SQL queries in R

library(DBI) library(RSQLite) library(dplyr) con <- dbConnect(RSQLite::SQLite(), ":memory:") iris_id <- iris |> mutate(id = row_number()) dbWriteTable(con, "iris_id", iris_id) params <- list(id = c(5,6,7)) q <- "SELECT COUNT(*) FROM iris_id…
meow
  • 925
  • 7
  • 22
1 2 3
18
19