dbplyr Questions
2
Solved
Suppose I have a connection to an external database called con.
I would like to use dplyr to reproduce this query
SELECT var1, var2, var3 from myTable LIMIT 10
I have tried
qry <- tbl(con, ...
1
Solved
I'm trying to connect to Amazon Athena via JDBC and pool:
What has worked so far:
library(RJDBC)
library(DBI)
library(pool)
library(dplyr)
library(dbplyr)
drv <- RJDBC::JDBC('com.amazonaws.at...
1
Solved
I want to add a column to my table using ALTER TABLE and UPDATE statements not to recreate the full table.
When using a subquery in my UPDATE statement I don't get the output I expect.
build repr...
1
Solved
Here is mtcars data in the MonetDBLite database file.
library(MonetDBLite)
library(tidyverse)
library(DBI)
dbdir <- getwd()
con <- dbConnect(MonetDBLite::MonetDBLite(), dbdir)
dbWriteTable...
Trudytrue asked 8/6, 2018 at 18:59
1
Solved
I have very simple problem that produces error. Example will clear this one.
library(odbc)
library(DBI)
library(dplyr)
library(dbplyr)
con <- dbConnect(odbc(), "myDSN")
tbl_test <- tibble(...
3
I'm using dplyr (0.7.0), dbplyr (1.0.0), DBI 0.6-1, and odbc (1.0.1.9000). I would like to do something like the following:
db1 <- DBI::dbConnect(
odbc::odbc(),
Driver = "SQL Server",
Server...
Octagonal asked 22/6, 2017 at 15:26
1
I have extracted data to a temporary table in SQL Server using DBI::dbGetQuery.
Even though, in the real query (not the play query below), I
select convert(date, date_value) as date_value, the d...
1
The function dbplyr::in_schema() can not connect to tables with uppercase letters.
When I create a table in PostgreSQL.
CREATE TABLE public."OCLOC"
(
cod_ocloc double precision NOT NULL,
lab_o...
Pavel asked 20/7, 2017 at 23:14
1
Solved
Say you have your tables stores in an SQL server DB, and you want to perform multi table actions, i.e. join several tables from that same database.
Following code can interact and receive data fro...
Harrow asked 24/1, 2018 at 7:42
1
Solved
Let's take a look at the example in ?sql_variant:
We define a new translator function for aggregated functions, expanded from the default one:
postgres_agg <- sql_translator(.parent = base_agg...
2
Solved
Is there a way to directly get the field names from a tbl_dbi object (db_mtcars below)?
library(RSQLite)
library(dbplyr)
library(dplyr)
con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbWr...
2
Solved
I'm creating a database using R package dbplyr, using RSQLite, but my database is zero-bytes in size on disk despite my writing (and reading back) a table. Here is my script:
library("RSQLite")
li...
1
Solved
Sparklyr fails when using a case_when with external variables.
Working Example:
test <- copy_to(sc, tibble(column = c(1,2,3,4)))
test %>%
mutate(group = case_when(
column %in% c(1,2) ~ 'g...
1
Solved
My question is how can I use dplyr functions, such as tbl, on SQL Server tables that do not use the default "dbo" schema?
For more context, I am trying to apply the R database example given here t...
1
Solved
0
Normally we do not find any trouble in using the below connection method and run queries from redshift
require("RPostgreSQL")
drv <- dbDriver("PostgreSQL")
conn <- dbConnect(drv, dbname = "r...
© 2022 - 2024 — McMap. All rights reserved.