Whichever account you run Achilles with will be the one that creates the tables. An alternative would be to set the createTable parameter to FALSE and create the tables ahead of time with a different owner if you preferred to control table ownership in that way.
In the error you’re describing it appears that analysis 1203 failed and caused an issue when merging results. There will be an error in the log for debugging 1203 that would help resolve your issue.
It turn out 'cdmVersion=‘5.4’ caused this issue in my case. I set it to 'cdmVersion=‘5’ resolved this issue (running many time with different accounts). I am still not sure whether the cdm data was not on cdm5.4. The error message was not very informative.
I have a similar issue with my cdm 5.4 data. I set to cdmversion=5 as suggested but it gives me these errors.
Error 1203: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name ‘discharge_to_concept_id’.
Error 1900:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name ‘admitting_source_concept_id’.
Error 2004:
com.microsoft.sqlserver.jdbc.SQLServerException: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
In the end, the procedure fails with error
Error:
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot find the object “OMOP.dbo.achilles_results” because it does not exist or you do not have permissions.