OHDSI Home | Forums | Wiki | Github

Characterization uses wrong schema to query the vocabulary

When trying to run a cohort characterization we are seeing that the vocabulary tables are not being properly qualified with the vocabulary schema name, and are instead being qualified with the cdm schema name.

We generally keep around 2 versions of our CDM and the execution is successful on the older version but not on the new one. There are both setup identically, in terms of entries in the source and source daimon tables (apart from the id’s)

We are running version 2.14 of both Atlas and the WebAPI.

The system logs don’t seem to give any information other then the query and what error it runs into.

Any help or suggestions would be greatly appreciated.

Thanks!

I think the issue is that the underlying library, FeatureExtraction doesn’t support specifying a vocabulary schema, so it’s going to try to find the tables in the cdm schema. Is that the error you are getting, that the tables like ‘concept’ are not found?

To work around this, are you able to create views in your CDM schema that query from the vocabulary schema’s tables? These views will act as a ‘proxy’ to your vocab schema, and that should let those queries that expect the cdm schema tables to work.

Hey Chris,

Yeah that’s the exact error, it queries cdm.concept and it can’t find it.

We created the views and that solved the issue. Is this just a part of the system and should be our practice going forward if we want to keep the two schemas separate?

Thank you so much.

Best,
Alex

Glad you got it working.

The idea about having a dedicated vocabulary schema came out of some feature requests in Atlas/WebAPI that never propagated across all the other OHDSI tools, and I’m not sure it should go that far… the CDM schema is a very specific, documented thing, which specifies the vocabulary tables being part of it. If there are sites that want to have a ‘shared’ vocabulary across multiple CDM instances, I think the view approach is the correct way to do it (or just pay the cost of copying vocabulary tables across the CDM instances).

t