OHDSI / Broadsea

Broadsea deploys the core OHDSI technology stack (Atlas & R Hades), using cross-platform Docker container technology.
http://ohdsi.github.io/Broadsea/
Apache License 2.0
76 stars 59 forks source link

Atlas 500 errors: achilles tables not present #19

Closed lopsided closed 4 years ago

lopsided commented 4 years ago

Hi,

I'm having a few problems getting this set up. I have 2 schemas in my database, the omop database (with vocab etc) is "ark" and I created a new blank one called "ohdsi".

I've edited the docker-compose.yml as follows:

environment:
      - WEBAPI_URL=http://localhost:8080
      - env=webapi-postgresql

      - datasource_driverClassName=org.postgresql.Driver
      - datasource_url=jdbc:postgresql://pgdb:5432/ark
      - datasource.cdm.schema=cdm
      - datasource.ohdsi.schema=ohdsi
      - datasource_username=postgres
      - datasource_password=postgres

      - spring.jpa.properties.hibernate.default_schema=ohdsi
      - spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
      - spring.batch.repository.tableprefix=ohdsi.BATCH_

      - flyway_datasource_driverClassName=org.postgresql.Driver
      - flyway_datasource_url=jdbc:postgresql://pgdb:5432/ark
      - flyway_schemas=ohdsi
      - flyway.placeholders.ohdsiSchema=ohdsi
      - flyway_datasource_username=postgres
      - flyway_datasource_password=postgres
      - flyway.locations=classpath:db/migration/postgresql

Bringing the containers up the first time populates the ohdsi schema. As per instructions, I modify the sql and run against the ohdsi schema. Modified sql:

TRUNCATE ohdsi.source CASCADE;
TRUNCATE ohdsi.source_daimon CASCADE;

-- OHDSI CDM source
INSERT INTO ohdsi.source(source_id, source_name, source_key, source_connection, source_dialect)
VALUES (1, 'ARK', 'ark', 'jdbc:postgresql://pgdb:5432/ark?user=postgres&password=postgres', 'postgresql');

-- CDM daimon
INSERT INTO ohdsi.source_daimon(source_daimon_id, source_id, daimon_type, table_qualifier, priority) 
VALUES (1, 1, 0, 'ark', 2);

-- VOCABULARY daimon
INSERT INTO ohdsi.source_daimon(source_daimon_id, source_id, daimon_type, table_qualifier, priority) 
VALUES (2, 1, 1, 'ark', 2);

-- RESULTS daimon
INSERT INTO ohdsi.source_daimon(source_daimon_id, source_id, daimon_type, table_qualifier, priority) 
VALUES (3, 1, 2, 'ohdsi', 2);

-- EVIDENCE daimon
INSERT INTO ohdsi.source_daimon(source_daimon_id, source_id, daimon_type, table_qualifier, priority) 
VALUES (4, 1, 3, 'ohdsi', 2);

Now bringing the containers back online and loading http://127.0.0.1:8080/atlas/ works and I can see ARK on the data sources page.

However, when I select any report (ie, http://127.0.0.1:8080/atlas/#/datasources/ark/dashboard) it says "Error loading report". Looking at the json response in firefox shows:

...nested exception is org.postgresql.util.PSQLException: ERROR: relation \"ohdsi.achilles_analysis\" does not exist\n Position: 95...

Sure enough, I have no odhsi.achilles* tables in my database.

Is there anything else I need to do to make this work? I can see the Achilles project (which also provides a docker image), do I need to configure and run this first?

Many thanks

leeevans commented 4 years ago

@lopsided yes, this error should be resolved when you run Achilles. You can follow the instructions here: https://github.com/OHDSI/Achilles

I will update the Broadsea instructions to add the Achilles execution step.