View source: R/addDataSource.R
addDataSource | R Documentation |
addDataSource
adds a data source to the datasource.json file used by AchillesWeb.
addDataSource(jsonFolderPath, dataSourcesFilePath, dataSourceName)
jsonFolderPath |
Folder path of the Json files generated by |
dataSourcesFilePath |
The full file path where datasource file will be saved. |
dataSourceName |
The human readable name of the new data source |
Used to update the datasources file with the reference to a specified datasource. This makes the new datasource findable for OHDSI tools. If the datasources file exists, the data source will be added to the file. If the datasources file does not exist, a new file wil be initialized with the specified data source.
none
## Not run: jsonFolderPath <- "your/output/path" dataSourcesFilePath <- "/path/to/datasources.json" dataSourceName <- "My New CDM" connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server", server = "yourserver") exportToJson(connectionDetails, cdmDatabaseSchema = "cdm5", resultsDatabaseSchema = "results", outputPath = jsonFolderPath) addDataSource(jsonFolderPath, dataSourcesFilePath, dataSourceName) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.