I am trying to connect to MariaDB server running on Amazon RDS platform using the RMySQL package. Till few days back it was running fine, until I updated my packages to the latest version. Now trying to connect to the DB throws this error:
Error:…
I am using the following code to upload a new table into a mysql database.
library(RMySql)
library(RODBC)
con <- dbConnect(MySQL(),
user = 'user',
password = 'pw',
host = 'amazonaws.com',
dbname = 'db_name')
dbSendQuery(con, "CREATE TABLE…
I would like to connect MySQL with the Shiny (R). I have been trying to run the code since last couple of days but it is not working. Following is my code:
library(shiny)
library(leaflet)
library(DBI)
library(RMySQL)
saveData <-…
am running a R script through cron for example R CMD BATCH myRFILE.R myOutFILE.Rout . When i run this from bash it runs successfully , however when i do this through cron for multiple R files i get the following error :
Error: ReadItem: unknown…
I am trying to use dbWriteTable to store a data frame into MySQL database. Here is the code:
mydb = getDbConnect(courseSlug)
dbWriteTable(mydb, name = table_name, value = dataframe, overwrite = TRUE, row.names = FALSE ,
field.types =…
Background: I am developing a rscript that pulls data from a mysql database, performs a logistic regression and then inserts the predictions back into the database. I want the entire system to be self contained in the script in case of database…
I'm having difficulties passing a value into dbSendQuery.
Below is my code:
Parameter:
date_param <- '2014_02_02'
Query:
pull <- dbSendQuery(test_db, "select distinct product_id, group
from test_table
…
This is a follow up from this question:
Acessing SQL database using shiny with reactive query
I am trying to build a data frame from data fetched from an SQL database using a shiny app. Currently i am able to query the database and return one set of…
I want to use Shiny to let a user build a data frame by accessing an SQL data base. I want it to work in the following way (but open to suggestions):
User types in ID (its a number)
User presses action button
Reactive query is generated
Query is…
I'm working in R with a MySQL database to which I connect with RMySQL (and DBI).
I have a function which read SQL table (and import them as R objects) on the fly, when the user need them. He can read table often or don't send a query to the database…
I have a MySQL table I am attempting to access with R using RMySQL.
There are 1690004 rows that should be returned from
dbGetQuery(con, "SELECT * FROM tablename WHERE export_date ='2015-01-29'")
Unfortunately, I receive the following warning…
We have a database and several columns are of type bit. When querying them using the RMySQL package, the incorrect results are returned. To reproduce, in a SQL prompt:
CREATE TABLE suppliers
( aId varchar(10) not null,
aBit bit not…
I am exporting data to a MySQL database from R using the RMySQL package. A big problem I am facing is duplicates: I have too many entries with same values. The system automatically produces the results and inserts the dataframe into the…
I need to join two tables where the common column-id that I want to use has a different name in each table. The two tables have a "false" common column name that does not work when dplyr takes the default and joins on columns "id".
Here's some of…
With the help of dbConnect, multiple connections were established with SQL DBs (say, DB1 and DB2). How can I write a query that involves tables from DB1 and DB2? Does dbGetQuery allow querying one only one DB? Can sqldf package be leveraged after…