Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
74 views

I have a table in PostgreSQL database, hosted on Azure cloud. In this table, I have created foreign key constraints on multiiple columns. I have a script in R which tries to push the contents of a ...
Moohoo's user avatar
  • 19
0 votes
1 answer
167 views

I am new to the concept of containerising R shiny apps using Docker and I was trying to deploy my R shiny application on Azure cloud environment by deploying a docker container image. This R shiny app ...
Moohoo's user avatar
  • 19
0 votes
0 answers
19 views

I have a code that looks like this: con <- connect_to_my_postgres_database() dbClearResult(dbExecute(con, "select function_that_returns_void()") postgresqlCloseConnection(con) This is ...
Mefitico's user avatar
  • 1,176
0 votes
0 answers
53 views

When I run a simple count(*) using dbplyr, I get anywhere from 40k to 70k at a result: > tbl(con,sql("select count(*) from app_public.members")) # Source: SQL [1 x 1] # Database: ...
colej1390's user avatar
  • 382
0 votes
1 answer
29 views

Let's say I have mtcars in a postgres server. library("RODBC") library("odbc") library("RPostgres") con = dbConnect(RPostgres::Postgres(),dbname="example_db",...
User981636's user avatar
  • 3,689
1 vote
1 answer
116 views

I would like to pass some parameter keywords (specifically keepalives, keepalives_idle, keepalives_count , or connect_timeout) using the R package RPostgreQSL to connect to my DB. I have searched the ...
Chris's user avatar
  • 199
0 votes
2 answers
171 views

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 ... ... ...
Michael_Brun's user avatar
1 vote
0 answers
202 views

Can connect to the database from psql and DBeaver but when using RpostgreSQL package in RSudio I receive the following error: RPosgreSQL error: could not connect user@hostname on dbname "database&...
Ct14's user avatar
  • 11
7 votes
2 answers
2k views

I am trying to connect to my localhost postgres DB and I get the following error. library("RPostgreSQL") drv <- dbDriver("PostgreSQL") connec <- dbConnect(drv, dbname = "...
User981636's user avatar
  • 3,689
1 vote
0 answers
789 views

Why is keeping your password, port, host, and all secrets of a database (e.g. PostgreSQL) in the .Renviron file safe for Shiny apps and R scripts? I have a question about the .Renviron file and its ...
Carlos Zarzar's user avatar
1 vote
0 answers
157 views

The error messages I get from RPostgreSQL contain nonsense characters where there should be some informative text. Here are two examples: Example 1: Querying a non-existent table > library("...
Molly's user avatar
  • 13.7k
0 votes
1 answer
84 views

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 ...
amatof's user avatar
  • 195
1 vote
1 answer
34 views

I am currently trying to download a large database using RPostgres - however, when I try to write the results to csvs in batches, it writes the same data over and over (always the first 1M records). ...
mhohaus's user avatar
  • 11
2 votes
1 answer
240 views

I've been having trouble connecting to an Azure Postgres database via RPostgres using RStudio. When I try to connect using dbConnect(RPostgres::Postgres(), dbname = db, host=host_db, port=db_port, ...
adriank's user avatar
  • 31
1 vote
1 answer
465 views

I'm trying to install plumber and RPostgreSQL into my docker image. Here's my dockerFile: FROM rocker/r-base RUN R -e "install.packages('plumber')" RUN R -e "install.packages('...
Benjamin Talisman's user avatar
2 votes
2 answers
455 views

I'm running a postgreSQL query based on an automated list of ID's stored in an R list. I'm trying to determine how to include that R list in my query so I don't have to hard-code the ID's each time I ...
spencergadd's user avatar
2 votes
0 answers
579 views

I am trying to connect to redshift database using R. Since I upgraded my mac to Monterey I receive a message in R as " R Session Aborted -R encountered a fatal error - the session was terminated&...
user17783243's user avatar
2 votes
0 answers
495 views

I am trying to connect to my localhost Postgres DB within R to further read/write tables. The server is running in the background which I'm monitoring in the background. I'm using the RPostgreSQL ...
Coon's user avatar
  • 97
10 votes
2 answers
992 views

I'm trying to use the large object (https://www.postgresql.org/docs/10/largeobjects.html) feature of PostgreSQL in R, and I have some trouble writing and reading using {DBI}/{RPostgres}. Here is what ...
Colin FAY's user avatar
  • 5,129
0 votes
1 answer
318 views

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 ...
Joe's user avatar
  • 3,836
0 votes
2 answers
146 views

How does it work to aggregate a variable in a postgres db backend table to its unique value? For example, I have the following table: library(tidyverse) library(dbplyr) dbplyr::memdb_frame(a=c(2,2,2),...
werN's user avatar
  • 149
0 votes
1 answer
125 views

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 ...
nerrez's user avatar
  • 15
1 vote
1 answer
123 views

Is there a way to use custom functions within a summaries statement when using dplyr to pull data from an external database? I can’t make usable dummy data because this is specific to databases, but ...
Karley's user avatar
  • 62
2 votes
2 answers
742 views

I'm wondering if there's a way to import PostgreSQL dump through R (RPostgreSQL) into a PostgreSQL database. I understand this is the way we write csv or a datatable from R into PostgreSQL through ...
codedancer's user avatar
  • 1,664
1 vote
0 answers
237 views

I am facing an awkward issue connecting to a Postgres database deployed on AWS Aurora. Connection attempts from R on Mac OS, using the DBI and RPostgres frameworks are rejected with the message: ...
Pierre Erwan Saouter's user avatar
2 votes
1 answer
884 views

I have a problem with my R program querying a PostgreSQL database. Here is the code ### Here we assume that myuser, mypassword, db, host_db and db_port ### have been defined in previous lines in the ...
user17911's user avatar
  • 1,471
1 vote
1 answer
377 views

I need to extract data from a BYTEA field of a postgeSQL database. In the BYTEA field, the data is stored in the RDS format (it is the contents of a .rds file created by the command saveRDS ...
Laurent's user avatar
  • 21
0 votes
1 answer
2k views

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 ...
Samet Sökel's user avatar
  • 2,730
2 votes
2 answers
1k views

I have a dataframe in a database with a date dimension that I pulled using RPostgres. Each 'date' is in the format 'YYYY-MM-DD. I'd like to add a new column of dates (labeled 'lookback_date') that are ...
NoCaresBear's user avatar
1 vote
1 answer
1k views

I am trying to append or cbind a new column from R to a postgresql table. So, I have created a new column in the postgresql table where I want to put my dataframe column, i.e ALTER TABLE schema.table ...
Bryan Castillo's user avatar
1 vote
0 answers
237 views

I'm new to stackoverflow, so please forgive me if this is not the right place for my question. When I set up a connectin with PostgreSQL via RPostgreSQL package i get the following error: error in ....
F Black's user avatar
  • 19
0 votes
1 answer
253 views

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 connections install.packages(&...
Aftab Udaipurwala's user avatar
2 votes
2 answers
11k views

I am attempting to connect to a local postgres 13 server using the RPostgreSQL package in R studio. I am receiving the error below. I am able to connect to a remote postgres 9 server using the exact ...
hammoire's user avatar
  • 361
2 votes
2 answers
764 views

I try connect to my table in postgres. Here screen of my db. So i need dbo.social and table profiles. So to do this, i try library(RPostgres) library(DBI) pw<- { "1234" } con <- ...
psysky's user avatar
  • 3,205
0 votes
0 answers
91 views

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', ...
user8795501's user avatar
1 vote
1 answer
70 views

I try to drop tables in an scheme their names begin with digits from R. The tables exist in a postgress data bank. library(RPostgreSQL) library(DBI) pg = dbDriver("PostgreSQL") con = ...
maniA's user avatar
  • 1,469
1 vote
2 answers
269 views

I am writing an application in Shiny in R. Global.R is described as below to connect to PostgresSQL. library(shiny) library(DBI) library(RPostgres) library(RPostgreSQL) library(pool) pool <- ...
Tim Ikata's user avatar
  • 231
0 votes
1 answer
152 views

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<-...
Asitav Sen's user avatar
1 vote
0 answers
156 views

I've 2 tables in my postegreSQL database CREATE TABLE touriste ( idclient BIGSERIAL PRIMARY KEY, numclient INT, nameclient VARCHAR(500), codepost INT, departement VARCHAR(500), pays VARCHAR(100) ); ...
Abdoulaye DIALLO's user avatar
0 votes
0 answers
840 views

I want to update a table in PostgreSQL table from a newData dataframe in local through a loop when the id matches in both tables. However, I encountered issues that the text values do not update ...
chichi's user avatar
  • 41
0 votes
0 answers
783 views

I'm trying to connect from RStudio on my Mac to a PostgreSQL database. The following code chunk works successfully on the Windows and Mac RStudio installs of my colleagues. blah.blah.rds.amazonaws....
N.A.K's user avatar
  • 35
2 votes
2 answers
559 views

I am trying to import a dataset (with many csv files) into r and afterwards write the data into a table in a postgresql database. I successfully connected to the database, created a loop to import ...
Gonny's user avatar
  • 37
7 votes
2 answers
4k views

Below is a snippet of my code that I use in R to extract IDs from a PostgreSQL database. When I run the function I get the following warning message from R: In result_create(conn@ptr, statement) : ...
cnburger's user avatar
  • 109
0 votes
1 answer
158 views

I have the following dataframe: library(rpostgis) library(RPostgreSQL) library(glue) df<-data.frame(elevation=c(450,900), id=c(1,2)) Now I try to upload this to a table in my ...
Johannes42's user avatar
0 votes
0 answers
356 views

I connect to a PostgreSQL DB via RPostgres to perform queries. My current workflow is the following: In the terminal, I create a tunnel via ssh. ssh -L PORT:host:25060 On top of my R script, I ...
chopin_is_the_best's user avatar
0 votes
0 answers
351 views

at work we have a database to which the following series of commands connected me from R. library(RPostgreSQL) drv <- dbDriver("PostgreSQL") con <- DBI::dbConnect( drv = drv, host = "...
Fernando's user avatar
0 votes
1 answer
107 views

I am trying to write a table into my data warehouse using the RPostgreSQL package library(DBI) library(RPostgreSQL) pano = dbConnect(dbDriver("PostgreSQL"), host = 'db.panoply.io', ...
Jacky's user avatar
  • 758
0 votes
1 answer
760 views

I've been trying to solve a problem with the RPostgreSQL package for quite some time. My code: path_ene <- "C:/Users/omen03/ENE" nene <- "ene_2010_02_efm.csv" drv <- dbDriver("PostgreSQL") ...
Héctor Garrido's user avatar
0 votes
0 answers
128 views

Im currently working on my shiny app, and what im dealing with now is viewing return message from SQL function on shiny app, after using this function. Here is my function: CREATE OR REPLACE ...
tadejow's user avatar
0 votes
0 answers
73 views

I have the following query: query <- 'SELECT field1, field2 from mytable where field1 IN $1 AND field2 <= $2 ORDER BY field1 ASC, field2 DESC;' params <- list(list('A','B'), as.character(as....
Mittenchops's user avatar

1
2 3 4 5