Closed gowthamrao closed 11 months ago
@gowthamrao please provide the steps you used to create the data model - changes to support subsetted cohorts were added in this migration but this will require updating any data models.
To execute run:
CohortDiagnostics::migrateDataModel(connectionDetails, databaseSchema, tablePrefix = tablePrefix)
If this is a fresh database instance can you check if the "migrations" table is created and, if so, which migrations were executed. To get the migrations that have been previously executed run:
mm <- CohortDiagnostics::getDataMigrator(connectionDetails, databaseSchema, tablePrefix)
mm$getStatus()
It looks like for postgres i have to use a two step process
CohortDiagnostics::createResultsDataModel(connectionDetails = connectionDetails,
databaseSchema = resultsSchema)
CohortDiagnostics::migrateDataModel(connectionDetails = connectionDetails,
databaseSchema = resultsSchema)
With the two step process above, i am now able to upload data into postgres.
https://github.com/OHDSI/CohortDiagnostics/blob/73120fe7e7736b3e3c1391a2607f4e17261cb5c5/inst/sql/sql_server/CreateResultsDataModel.sql#L107-L114
while CohortDiagnostics output does