executeDdl | R Documentation |
This function will generate the DDL for a specific dbms and CDM version and then execute the DDL on a database.
executeDdl(
connectionDetails,
cdmVersion,
cdmDatabaseSchema,
executeDdl = TRUE,
executePrimaryKey = TRUE,
executeForeignKey = TRUE,
...
)
connectionDetails |
An object of class connectionDetails as created by the DatabaseConnector::createConnectionDetails function. |
cdmVersion |
The version of the CDM you are creating, e.g. 5.3, 5.4 |
cdmDatabaseSchema |
The schema of the CDM instance where the DDL will be run. For example, this would be "ohdsi.dbo" when testing on sql server. |
executeDdl |
Should the DDL be executed? TRUE or FALSE |
executePrimaryKey |
Should the primary keys be added? TRUE or FALSE |
executeForeignKey |
Should the foreign keys be added? TRUE or FALSE |
... |
Other arguments passed on to DatabaseConnector::executeSql. (This allows the user to set the path to errorReportFile.) |
Writes the fully specified DDLs, primary keys, foreign keys, and indices to a file and then executes on a database.
## Not run:
executeDdl(connectionDetails = connectionDetails,
cdmVersion = "5.4",
cdmDatabaseSchema = "myCdm")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.