OHDSI Home | Forums | Wiki | Github

DDL scripts for results.achilles_results_derived etc

(Ambuj) #1


I am able to get the DDL scripts for results schema using http::///WebAPI/ddl/results?dialect=postgresql

But, I am not able to find the ddl scripts for additional tables-

  1. achilles_results_derived
  2. achilles_analysis
  3. achilles_results
  4. achilles_results_dist
  5. achilles_heel_results

Please suggest where to locate the ddl scripts for the above mentioned tables.

Thank You

(Anna Karenina) #2

Hello @ambuj,

These tables are created automatically by Achilles when you run Achilles analysis. You can find more details in Achilles GitHub repository, and inside the “Running Achilles on Your CDM” document (PDF).

(Ambuj) #3

Hello @rookie_crewkie

I ran Achilles analysis using R, but at the end it throws error:
ERROR: relation “results.achilles_results_dist” does not exist.

Unsure at what step it create those tables.

(Anna Karenina) #4


This is strange, normally it’s created under the hood during Achilles run. Quoting the PDF:

The Achilles package should be run sequentially. That is, achilles should be run first to generate the
achilles_results and achilles_results_dist tables, and then optionally, achillesHeel should be run next to
generate the achilles_heel_results and achilles_results_derived tables.

No further ideas, sorry. I’d try to rerun Achilles though, just in case.

(Ambuj) #5

I think the issue has been resolved. I had runHeel=T which is why it was running the achillesHeel along with achilles.
Now, I ran achilles first and it created tables for achilles_analysis and achilles_results.

Next, I executed achillesHeel; and got the error for results.achilles_results_dist.

(Maxim Moinat) #6

I recently had the exact same issue. As a temporary solution I copied an existing achilles_results_dist table. This is not really a nice solution though.

@ambuj What solved the problem for you? Did you just rerun Achilles without Achilles Heel or did you do some other steps first?

(Ambuj) #7

While running Achilles analysis in R using “achilles” function, set runHeel=F and execute. It will create achilles_results and achilles_analysis tables.

For achilles_results_derived and achilles_results_dist, it is said that it will be created while executing ‘achileesHeel’ function which didn’t happened with me too.

So, I did the same like you did of copying existing tables. Really can’t figure out what has been changes from ‘achillesHeel’ fucntion.

(Ajit Londhe) #8

@ambuj – are you still having this issue? If so, can you please post an issue in the Git repo?

(Vojtech Huser) #9

The derived table was created based on Patrick’s call for storing a result and making a rule based on that stored result.

Before paralelization, the sql was easier to find in the code.
here is it in version 1.5.1

(Ajit Londhe) #10

Let’s focus on the errors in execution @ambuj is having. The DDL for these tables is not something anyone should be using manually. The Achilles package should be creating these tables. If the tables aren’t created, something went wrong.

(Tsvi Rozenhauz) #11

Hi I’m not sure it is related to current to current topic, but I also do not have those tables (example achilles_results). I have only WebAPI and Atlas running with Postgres DB … And when I try to generate the cohort getting error that achilles_results is missing …

(Ajit Londhe) #12

You need to run the Achilles R package on your data, see this link for more information: https://ohdsi.github.io/Achilles/.

The achilles function will generate summary statistics which are stored in achilles tables that sit in the results schema. The achillesHeel function will generate data quality checks based on those summary tables.

(Chris Knoll) #13

Just to be clear: WebAPI does not manage any CDM schemas (the standard CDM tables, nor the results schema). You must manually deploy those tables yourself for each CDM you want to deploy.

Achilles creates it’s own tables, on the specified schema. if you configure the Achilles process to write tables into the results schema of your CDM, then webapi (and Atlas by extension) will be able to read the Achilles results under the ‘DataSources’ section of Atlas.

Spread the word: WebAPI does not create schemas in your CDM, that is an activity related to your CDM ETL.