I have build up a postgresql 9.2 database. My table looks like that:
CREATE DATABASE "EURUSD_M1"
WITH OWNER = fadmin
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'German_Germany.1252'
LC_CTYPE =…
I'm not able to connect to my AWS Redshift database using RPostgreSQL.
Does anyone have an example of code that would work?
library (RPostgreSQL)
drv <- dbDriver("PostgreSQL")
conn <- dbConnect(drv, "database.us-east-1.redshift.amazonaws.com", …
I am bridging R and psql, wish to remove vulnerability to sql injection. Looking at documentation, I had hoped that:
postgresqlExecStatement(con, statement, params, ...)
Would allow use of something like:
postgresqlExecStatement(con, "DELETE FROM…
I'd like to import data from a large postgresql table. In order to save space, I'd like to automatically convert textual values to factors.
For instance, the dataset has many string variables such as (eg., "Male," "Female") and if these could be…
I need to write a large data.table to a PostgreSql table on the same computer (Ubuntu 64bit, 16GB RAM).
Before sending the following commands, the System Monitor show 47% Memory used (3% Swap), but in the middle of the long time of running…
I am quite new in R. I am using RPostgreSQL and I would like to utilize a code to automatically write new tables to the DataBAse. I am using this code, but I don't know how I could call it.
ndatatwrit <- list(n25,n28,n29,n31,n32)
lapply (ndatatwrit,…
I use RPostgresql to connect to a local Postgres DB. Usually we send the query as a string using dbGetQuery. Is there any way to print the execution time of the query ?
In postgres \timing prints the query execution time for all the queries. Is…
I have multiple csv files (1 file for each city) having following structure.
An example of two out of many files:
CSV File 1:
City_Name Pop PopDen Lit
MI 45000 280 78
MI 37000 310 89
...
...
CSV File 2:
City_Name Pop PopDen Lit
CH …
I'm using R to connect to a database I have stored in PGAdmin so that I can add data into the database through R. Before adding the data into the database, it has to be normalized.
The dataset consists of employee data. If an employee is a manager,…
I am using sqldf to train some r-users in SQL. Loading RPostgreSQL or RH2 before loading sqldf will change the default SQL used by sqldf. This works fine with h2, but every time I load RPostgreSQL, R will crash on first attempted query. I want to…
I am using the DBI package with the RPostgreSQL driver to query from an amazon redshift database and am able to pull tables with simple queries without issue. By simple queries I mean something like this:
'SELECT * FROM transactions ORDER BY…
I am trying to write my table to a PostgreSQL database then declare a primary key. My data is really huge (includes billions of rows and total size is approximately 150 GB), when I try to create a primary key after writing the table, it takes…
i am facing the following challenge, when i am trying to connect to the Rpostgresql using the DBI package i am getting the following error.
Below is the code used for my…
I have a problem with importing data from edb postgres into R (with RPostgres). I using this code:
library(RPostgres)
conn <- dbConnect(Postgres(), dbname = 'xx', host = 'xx', port = 'xx',
user = 'xx', password = 'xx',
…
I am trying to get data from a PostgreSQL database in a shiny app. The query is not working. Running the following
function(input, output) {
data.df<- eventReactive(input$fetcher, {
qry<-paste0("\'SELECT * FROM bhavcopy WHERE \"TIMESTAMP\"…