OHDSI Home | Forums | Wiki | Github

Common Data model


I am following all the steps to setup CDM is postgresql and started with below link

When I am running as ```
CommonDataModel::buildRelease(“postgresql”, “5.4”, “output”, “YOUR_CDM_SCHEMA”)

I tried it without giving last parameter as below

CommonDataModel::buildRelease(  cdmVersions = "5.4", targetDialects = "postgresql",outputfolder = "C:/OMOPModel/output")

It worked by schemaName is defaulted to @cdmDatabaseSchema . please suggest. I am new to OHDSI and understanding it.


Hi @Chanchal.Dixit welcome! I am so glad you are using our new R package!

What you are running into there is the parameterization of the code. When you specify the name of your schema (“YOUR_CDM_SCHEMA”) the code goes through and finds every instance of @cdmDatabaseSchema and replaces it with the name you gave it (YOUR_CDM_SCHEMA again). This would then allow you to run the code against your instance automatically.

Thank you for quick response.

Actually its not taking whatever i give as YOUR_CDM_SCHEMA. Attched image gives error message

like i am running as below -

CommonDataModel::buildRelease(“postgresql”, “5.4”, “output”, “myschema”)
Error in CommonDataModel::buildRelease(“postgresql”, “5.4”, “output”, :
unused argument (“myschema”)

Ok thank you for the clarification. I see the issue now. The buildRelease function is only meant to build the ddl sql files and does not take the schema name as a parameter. Instead, if you want to execute the ddl against your schema you can use the executeDdl function. This function takes a connectionDetails object to connect to your database and the schema name to set up the tables in your schema.