I’ve been having some trouble connecting my postgres db to Achilles, and tracked down my woes to the OHDSI database connector.
I’m currently using R 3.2.0 and Java 1.8.0_45
I’ve followed the instructions listed on the github page. When I execute:
connectionDetails <- createConnectionDetails(dbms=“postgresql”, server=“localhost/odhsi”, port=“5432”, user=“snkasthu”, password=“duh”, schema=“odhsi”)
conn <- connect(connectionDetails)
I get:
Connecting using PostgreSQL driver
However, when I try to execute a command, such as:
dbGetQueryPostgreSql(conn, query = “select * from person”)
I get:
Error in rJava::.jcall(s, “Ljava/sql/ResultSet;”, “executeQuery”, as.character(query)[1]) :
org.postgresql.util.PSQLException: ERROR: relation “person” does not exist
Position: 15
The full error report reads as:
DBMS:
postgresql
Error:
org.postgresql.util.PSQLException: ERROR: relation “person” does not exist
Position: 22
SQL:
SELECT COUNT(*) FROM person
R version:
R version 3.2.0 (2015-04-16)
Platform:
x86_64-apple-darwin13.4.0
Attached base packages:
- stats
- graphics
- grDevices
- utils
- datasets
- methods
- base
Other attached packages:
- Achilles (1.0)
- RPostgreSQL (0.4)
- rjson (0.2.15)
- DatabaseConnector (1.2.1)
- RJDBC (0.2-5)
- rJava (0.9-6)
- DBI (0.3.1)
- SqlRender (1.1.2)
- devtools (1.8.0)