OHDSI Home | Forums | Wiki | Github

Error with DatabaseConnector::executeSql

Hi guys,

I’m currently implementing the ETL process for our source data. I encountered a problem with DatabaseConnector::executeSql. When I run a query with it, it keeps sending me:
| | 0%
Error: Error executing SQL:
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
An error report has been created at mydir/errorReportSql.txt".

and the errorReport says:
DBMS:
postgresql

Error:
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.

SQL:
CREATE TABLE omop.person (   person_id      BIGINT    NOT NULL ,   gender_concept_id    INTEGER    NOT NULL ,   year_of_birth     INTEGER    NOT NULL ,   month_of_birth    INTEGER    NULL,   day_of_birth     INTEGER    NULL,   birth_datetime    TIMESTAMP NULL,   death_datetime    TIMESTAMP NULL,   race_concept_id    INTEGER  NOT NULL,   ethnicity_concept_id   INTEGER    NOT NULL,   location_id     BIGINT  NULL,   provider_id     BIGINT  NULL,   care_site_id     BIGINT  NULL,   person_source_value   VARCHAR(50) NULL,   gender_source_value   VARCHAR(50) NULL,   gender_source_concept_id    INTEGER  NOT NULL,   race_source_value    VARCHAR(50) NULL,   race_source_concept_id  INTEGER  NOT NULL,   ethnicity_source_value  VARCHAR(50) NULL,   ethnicity_source_concept_id INTEGER  NOT NULL ) 

R version:
R version 4.0.2 (2020-06-22)

Platform:
x86_64-apple-darwin17.0

Attached base packages:
- stats
- graphics
- grDevices
- utils
- datasets
- methods
- base

Other attached packages:
- ETLSyntheaBuilder (0.1.0)
- DatabaseConnector (4.0.2)

This is very confusing because I was able to run this code correctly. Has anyone had this problem before? Thanks for the help.

Dawei Zhou

The error appears to originate from within the Postgres JDBC driver. Are you able to send other updates via the connection? Maybe the user doesn’t have privileges to create tables?

Hi @schuemie , Thank you for your reply. I’m able to create tables and insert records on the database management software but not for this function.

t