I am trying to run Achilles analysis and kept getting the following error:
org.postgresql.util.PSQLException: ERROR: failed to find conversion function from unknown to text
An error report has been created at /usr/errorReport.txt
Below is part of the error report:
DBMS:
postgresql
Error:
org.postgresql.util.PSQLException: ERROR: failed to find conversion function from unknown to text
SQL:
CREATE TEMP TABLE s_tmpheel_25
AS
SELECT
analysis_id, stratum_1, stratum_2, sum(count_value) as statistic_value, measure_id
FROM(
–100000+analysis_id,
select
NULL as analysis_id,
stratum_2 as stratum_1,
cast(null as varchar(255)) as stratum_2,
count_value,
CAST(concat(‘ach_’,CAST(analysis_id as VARCHAR), ‘:GlobalCnt’) as varchar(255)) as measure_id
from result_cdm_synpuf_5_2_2.ACHILLES_results
where analysis_id in (1805,705,605,805,405)
) Q
group by analysis_id, stratum_1, stratum_2, measure_id
R version:
R version 3.5.0 (2018-04-23)
Platform:
x86_64-redhat-linux-gnu
Here is the command that I used to run Achilles:
achilles(connectionDetails,
cdmDatabaseSchema = “cdm”,
resultsDatabaseSchema=“result”,
vocabDatabaseSchema = “cdm”,
sourceName = “SUNPUF_1K”,
cdmVersion = “5.2.2”,
runHeel = TRUE,
runCostAnalysis = FALSE)
Does anybody know what went wrong? Thanks in advance!
Thank you for your reply. It was able to create 3 tables, achilles_analysis, achilles_results and achilles_results_dist, before raising this error. I am running this analysis in a CentOS environment, but I didn’t encounter this error when I ran it in a Windows environment a while ago. Not sure what went wrong. I’d look forward to your update. Thank you so much!
Thank you! It seems the bug has been fixed. How can I update the code? Should I uninstall the old Achilles and reinstall it by running the install_github(“OHDSI/Achilles”) command?
Thanks for your reply. All I did was running the following command, and I don’t find a place that needs a qualifier:
achilles(connectionDetails,
cdmDatabaseSchema = “cdm”,
resultsDatabaseSchema=“result”,
vocabDatabaseSchema = “cdm”,
sourceName = “SUNPUF_1K”,
cdmVersion = “5.2.2”,
runHeel = TRUE,
runCostAnalysis = FALSE)
And I found that this command also generated a table called “s_tmpach_1832” in my cdm schema. Is this intended?
Thanks again.
By “qualifiers” I meant the schema names (e.g. resultsDatabaseSchema). Obviously .tmpach_ch_condition is missing a schema, so I thought that schema might be missing from the function invocation. It appears that this is not the case, so this may just be a bug in the query. Can you open an issue here and include the same information. We will address it.
In multithreaded mode, achilles can create temporary tables. Based on your response however you meant to run this in single threaded mode and therefore this is probably unexpected behavior. Again please open and issue.