OHDSI Home | Forums | Wiki | Github

Atlas Load data errors

Hi folks,

I set up webapi, configure CDM, achellies and atlas.

So in the postgres DB, I have ‘OHDSI’ for WebAPI and my own database for CDM client data and CDM vocabularies.

I inserted entry in webapi.source and webapi.source_daimon.

In Atlas, I can see my data entry in the data source dropdown list. But when I select reports, it threw out errors. Please see the screenshot.

When I click the F12->Console error mesage link to Person, I got this:

> {"payload":{ "cause":null, "stackTrace":[], "localizedMessage":"An exception occurred: org.springframework.jdbc.BadSqlGrammarException","message":"An exception occurred: org.springframework.jdbc.BadSqlGrammarException","suppressed":[]},"headers":{"id":"7b52666d-1c58-5ce3-4b2d-63616452a604","timestamp":1651256425491}}

Please help,
Ray Zohdsi

Check your log file and look for errors/exceptions. Also, please provide the WebAPI version and Atlas Version you are running.

Thank you, Chris. Do you happen to know what user privileges need for a ‘webapi_sa’ DB user?

Do you mean the user defined in the following settings.xml:

        <datasource.username>USER</datasource.username>
        <datasource.password>PASS</datasource.password>

or:

 <flyway.datasource.username>userWithWritesToOhdsiSchema</flyway.datasource.username>
 <flyway.datasource.password>PASS</flyway.datasource.password>

If it is the datastource user, then that account should have permissions to select/upddate/delete on all tables and read sequences on the webapi schema.

If it is the flyway user, it requires full permissions becuase that is the acount that creates/drops tables and creates sequences.

Hi Chris,

I mean this one in the CDM configuration depicted here. I think webapi_sa should be the same as the users you meant in the xml settings, is that right (in the database preparation part: ohdsi_admin_user and ohdsi_app_user are used. The ohdsi_app_user === webapi_sa here, right?

Thanks,
Ray Z.

Ok: in the documentation you’re referencing, they are talking about setting up the CDM’s result schema. This database that holds the CDM and Results schema is completely distinct from the WebAPI database, so you can ignore the settings found in the .xml files because that is only used to talk to the WebAPI database. Sorry for my confusion, when you said ‘the webapi_sa’ account, i wasn’t understanding that you meant the service account (sa) that is used to talk to the CDM. I understand now.

So, for the privledges for the ‘webapi_sa’ account (the account webapi uses to connect to a CDM), the permissions were shown in the table from your screenshot:

CDM schema: Read Only
Vocabulary schema: Read Only (it is standard practice to have the CDM and Vocabulary schemas the same)
results schema: insert/delete/update/select
temp schema: full control (to create/update tables.)

It may be the case that since these guidelines were written, the results schema may need to have create/drop table permissions too, but I’m not sure. If you get errors staring up webAPI about ‘permission denied creating table’ on your Results schema, then you may have to adjust permissions of webapi_sa.

Hi Chris,
Thank you for making it clear. I’ve learned it. I should have made my question detailed (sorry about that).

Have a good weekend,
Ray

t