I am using 'RMySQL' and 'DBI' for MySQL database connection.
Does anyone know if it is possible to use the
set @variable := something
when sending queries with DBI::dbGetQuery function?
When trying to pass the query, I am getting an error that…
I would like to use dplyr and RMySQL to work with my large data. There is no issues with dplyr code. The problem (I think) is about exporting data out of MySQL to R. My connection is dropped every time even I am using n=Inf in collect.…
My question is pretty much the same as this one. In short, I'm using dplyr (along with RMySQL) to import a MySQL table with a datetime column, and I want to convert it to date in R. In the question linked above, no answer was posted, only a comment…
I'm trying to connect to a microsoft sql database through R on a VM with ubuntu 16.04 as the OS. I have installed DBI, RMySQL, RODBC and odbc packages. I can connect to an oracle database.
Here is the command i tried using:
con <-…
I wrote a data.frame using
dbWriteTable(con, name='db_all', df, overwrite=T, row.names=F)
sucessfully to MySQL using RMySQL.
Now I have a second data frame which has a similar structure and try to use…
I would like to access a MySQL database using dplyr without having to store my database passwords in plane text R code. Hence, I'd prefer to reference my .my.cnf file, but since the src_mysql has default parameters for host, user, and password, the…
I want to be able to add a column into an existing table with its corresponding type.
This is how I tried it:
library("RMySQL")
# Connect to DB
v_db <- dbConnect(MySQL(),
user="USERNAME", password="PASSWORD",
…
My function, contained in a larger function, uses dbConnect(), dbGetQuery(), and dbDisconnect().
When the function errors out, I fix it and try to rerun it. I can't rerun it though, because I get:
Error in mysqlCloseConnection(conn, ...) :
…
I m running the following code block 8 times, but with different queries in three different R scripts. I have already established the connection with the server.
rs<-dbSendQuery(con,"select owner_name, owner_domain, count(*) as avg from…
This for R, DBI package. Is there any options or parameters to limit the SQL query time.
couldn't find any options from
dbConnect(drv, ...)
dbGetQuery(conn, statement, ...)
pool package provides idleTimeout options, but couldn't find options or…
I am using DBI package to insert data to MySQL. Here is the code:
ch <- DBI::dbConnect(MySQL())
dbSendQuery(ch, 'set character set "utf8"')
dbSendQuery(ch, 'SET NAMES utf8')
for (i in 1:nrow(test)) {
query <- paste0("INSERT INTO trade_data…
I have a .R file that contains several functions, one of which is defined as:
get_entry_detail <- function(con, vec_of_entryids){
query <- paste0("select entryId, fieldName, fieldValue
from…
Had a Rscript for inserting a dataframe into MariaDB working ok. Nobody changed anything but suddenly started to fail.
insertconnection <-
dbConnect(RMariaDB::MariaDB(),
user = 'user',
password = 'pwd',
dbname =…
I am trying to use placeholders with my RMySQL queries. For example, I have this table in MySQL,
id name birth color foods cats
1 Sybil 1970-04-13 black lutefisk,fadge,pizza 3
2 Nancy …
I am trying to connect to a MySQL server, which is restricted by being connected to a given server. I am trying to connect through this restricting server while not physically connected.
Through the command line this is doable by creating a SSH…