OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
126 stars 156 forks source link

First time initialization creates 'ohdsi' schema vs using the existing schema 'webapi' #2333

Closed davidhcar closed 6 months ago

davidhcar commented 6 months ago

Expected behavior

API to setup tables/objects in schema named 'webspi' where the property set datasource.ohdsi.schema = webapi

Actual behavior

creating new schema named 'ohdsi'

Steps to reproduce behavior

Initialize 2.13.0 with postgres configurations to initialize schema the first time.

davidhcar commented 6 months ago

@chrisknoll @anthonysena Any clue why it would create a new schema?

chrisknoll commented 6 months ago

This could come from a few places:

The root is here, which is referenced here, but in the webapi-postgresql profile (which is what you're using) it's defined here, This is where I've found the 'ohdsi' schema.

However, in the setup documentation, I don't see it noted that you can change the schema name. So, I think what's happening is you're not overriding it in your settings.xml, and you need to add this to your settings.xml:

<datasource.ohdsi.schema>webapi</datasource.ohdsi.schema>

Then rebuild, and re-deploy.

davidhcar commented 6 months ago

Thank you @chrisknoll you are spot on. I had a environment variables but without settings.xml. was under impression it is optional and overrides pom.xml from the environment settings. Did rebuild with settings.xml everything works as expected. Thank you once again as always for prompt response!!