OHDSI Home | Forums | Wiki | Github

Achilles Results Warnings and Export Errors

Hello. I’m trying to get Achilles up an running and keep running into a few errors. When I try to run the following command I get a few warning messages.

achillesResults <- achilles(connectionDetails, cdmDatabaseSchema='omop_v5', resultsDatabaseSchema='results_schema', sourceName='Test', cdmVersion = '5', vocabDatabaseSchema='rz')

Executing multiple queries. This could take a while
  |======================================================================| 100%
Executing SQL took 2 secs
Done. Achilles results can now be found in results_schema
Executing Achilles Heel. This could take a while
  |======================================================================| 100%
Executing SQL took 0.257 secs
Done. Achilles Heel results can now be found in results_schema
Warning messages:
1: In renderSql(parameterizedSql[1], ...) :
  Parameter 'vocab_database_schema' not found in SQL
2: In renderSql(parameterizedSql[1], ...) :
  Parameter 'list_of_analysis_ids' not found in SQL

If I try to run the export process…

exportToJson(connectionDetails, cdmDatabaseSchema = 'omop_v5', resultsDatabaseSchema = 'results_schema', outputPath = '/home/AchillesOutput', cdmVersion = '5', vocabDatabaseSchema = 'rz')

I also get an error message. I’m not sure if they’re related.

DBMS:
postresql

Error:
org.postgresql.util.PSQLException: ERROR: relation "results_schema.cdm_domain_meta" does not exist
  Position: 71

SQL:
select domain_id as AttributeName, description as AttributeValue
from results_schema.cdm_domain_meta
where description is not null
order by domain_id

I am very new to Achilles so any help you can offer would be greatly appreciated.

It appears that one or more of the schemas that you are passing in can not be found or is otherwise misidentified. Please paste the DDL or equivalent description of the database in question.

I think this is just a SQL render warning saying that we’re passing in parameters to do a find-replace on (specifically: vocab_database_schema and list_of_analysis_ids, but in the achilles heel report we don’t need vocabu_database_schema nor list_of_analysis_ids, so you can ignore these warnings, they’re just there to warn you that you might have passed in a parameter that had a typo (because that paramater wasn’t found to replace in the sql file). @schuemie, could you verify this behavior?

The error: relation “results_schema.cdm_domain_meta” is a real error: it shoudln’t be trying to find the ‘cdm_domain_meta’ in the results schema…in fact there should be code checks in the achilles script to not perform the cdm_domain_meta step if the table does not exist. @Ajit_Londhe, can you please look into this error? I think we’ve seen this before…something about the table check not working, but we shouldn’t get an error if the cdm_domain_meta does not exist.

Thanks, all!

-Chris

Yes, the warnings are just to help you identify typos. I would still recommend you fix them, so in this case stop passing the arguments vocab_database_schema and list_of_analysis_ids to renderSql.

Regarding the warnings, they’re not due to typo in this case, but rather the parameters aren’t actually in the SQL to be loaded/translated/rendered with loadRenderTranslate(). ‘vocab_database_schema’ is not in the Achilles_v5.sql file, and ‘list_of_analysis_ids’ is not in the AchillesHeel_v5.sql file. They can be ignored (and removed from those loadRenderTranslateSql function calls).

Regarding cdm_domain_meta, this is a mistake using the try command. try only suppresses warnings, not errors. The exportToJson call to handle cdm_domain_meta should more cleanly check for the existence of the table. I’ll make a PR tomorrow to fix this.

That’s odd, I thought someone added that (or requested it) that we allow a separate vocabulary database schema defined than assume it’s in the cdm_database_schema. I’ll try to lookup where that was.

-Chris

Ok, so the commit that introduced the vocab_database_schema was here: https://github.com/OHDSI/Achilles/commit/3f28b7d235c2e4c9406ce0a16679eb7df43b1c60. but interestingly enough we don’t need the vocab schema in any of the achilles analysis, only in the export. And we only need the list of analysisIds in the achilles() call, but not in the heel() call.

Hi @WCarter – sorry for the delay, I’ve made a PR to fix the CDM_DOMAIN_META table check logic actually work correctly. Once it’s merged in, you can grab the package once more and try running it.

I sure can.

This has been merged.

The error does not show up any more with the updated code. Thanks everyone for your help.

t