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.
@rookie_crewkie
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.
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?
@MaximMoinat
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.
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.
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 âŚ
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.
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.
We have Achilles creating and populating the achilles_xxx tables on the results schema on a local computer.
However, we would like to move these populated tables later to the webApi server which has not R installed.
(or at the moment just copy these from the synpuf5pct_20180710 data)
Shountât it the SQL created by the webAPIâs URL
The WebAPI server doesnât need the CDM databases physically residing on it, it just needs logical access to the CDMs.
So the process flow would be:
Run Achilles using any client with R set up that can access your CDM database (located on a database platform). Achilles, as a consequence, will create and populate the achilles tables. These tables are located in whichever schema in the CDM database you deem as the âresultsâ schema. This can be in the same schema as your CDM tables, or be a separate schema. Once complete, your CDM database now has achilles tables and content stored within.
When you are ready to add the CDM source to WebAPI/Atlas, run the DDL script from WebAPI to ensure all of the other dependency tables are available in the CDM databaseâs âresultsâ schema.
Add the CDM database connection information to WebAPIâs source and source daimon tables.
WebAPI can then talk to the CDM database to execute analytic queries against the clinical tables, pull up summary level stats using the achilles tables, etc.
thanks @Ajit_Londhe,
I will explain my situation better.
I have the CDM in a local airgaped computer on postgress.
I ran the achilles on that CDM and got the achilles_* tables (for this exmaple achilles_results.cvs) .
I extract all tables resutls, vocabularies and CDM encript them and sent the to the server admin wehre the CDM will be installed for users.
On the server side they need to copy the received tables to the database BigQueri. For this they have previously created the schemas by running the the DDL script from WebAPI.
The problem is that, when they tried to copy the tables. The DDL script has not created a table for achilles_results and then they cannot load achilles_results.cvs into the BigQueri.
{{
Im not an expert in databases, correct my solution if wrong:
I think we should change the last steps as follow :
4. Import the .csv files into the BigQueri which will create the tables (is this possible, or will this make the wrong types on colums ?)
5. run the DDL script that will link the tables (will this be inefficient to run this on populated tables?)
}}
Ah I see now. So we would need a method to create the DDLs on your production platform. This isnât handled by WebAPI, and Achilles doesnât actually run any empty create table statements â it creates the tables using CREATE TABLE AS SELECT (CTAS) statements.
@Chris_Knoll â certainly I could add a function to write out Achilles create table scripts that @Javier could then run manually on his production platform, but Iâm wondering if this is something that could be part of the DDL service in WebAPI; perhaps it can create the Achilles tables if they donât already exist in the results schema. That way it wonât affect existing Achilles tables, but will create them if theyâre not found.
I think the DDL for achilles belongs in achilles (so a function that outputs the ddl to a file or a function that returns the long string of the DDL would make sense)âŚbut as far as WebAPI goes, i think it would be possible to have another endpoint under the DDL service for achilles (so, our results schema is ddl/results, achilles could be ddl/achilles). What I worries are:
Anyone who wants to house their DDL for their own database schema for their own app can petntion webAPI to maintain it, which I worry about
youâll have two copies of the ddl (one in webapi and one in R package) unless you encapsulate the DDL generation into a stand-alone object (woudl be java) so that webAPI and Achilles can both refer to the same thing.
Youâll have to take some steps to have achilles versions synchronized with webapi versions if you want to have the change in one reflected in the other. That can be a headache if thereâs not alignment on the release schedule between the two.
I understand Ajitâs point that he doesnât actually have DDL and he does his table creation from CTAS, but I think the pointâs still stand that youâll have the logic in two places and coordinating releases will be problematic.
For @Javier, isnât there a data migration tool that you can leverage to pull data from one database out to another? Many database platforms support this.