Create the results tables to store characterization results into a database
Source:R/Database.R
createCharacterizationTables.Rd
This function executes a large set of SQL statements to create tables that can store results
Usage
createCharacterizationTables(
connectionDetails,
resultSchema,
targetDialect = "postgresql",
deleteExistingTables = TRUE,
createTables = TRUE,
tablePrefix = "c_",
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema")
)
Arguments
- connectionDetails
The connectionDetails to a database created by using the function
createConnectDetails
in theDatabaseConnector
package.- resultSchema
The name of the database schema that the result tables will be created.
- targetDialect
The database management system being used
- deleteExistingTables
If true any existing tables matching the Characterization result tables names will be deleted
- createTables
If true the Characterization result tables will be created
- tablePrefix
A string appended to the Characterization result tables
- tempEmulationSchema
The temp schema used when the database management system is oracle
See also
Other Database:
createSqliteDatabase()
,
insertResultsToDatabase()
Examples
# create sqlite database
charResultDbCD <- createSqliteDatabase()
# create database results tables
createCharacterizationTables(
connectionDetails = charResultDbCD,
resultSchema = 'main'
)
#> Connecting using SQLite driver
#> Deleting existing tables
#> Creating characterization results tables
#> Executing SQL took 0.00823 secs
#> Migrating data set
#> Migrator using SQL files in Characterization
#> Connecting using SQLite driver
#> Creating migrations table
#> | | | 0% | |======================================================================| 100%
#> Executing SQL took 0.00356 secs
#> Migrations table created
#> Executing migration: Migration_1-v0_3_0_store_version.sql
#> | | | 0% | |=================================== | 50% | |======================================================================| 100%
#> Executing SQL took 0.00349 secs
#> Saving migration: Migration_1-v0_3_0_store_version.sql
#> | | | 0% | |======================================================================| 100%
#> Executing SQL took 0.00307 secs
#> Migration complete Migration_1-v0_3_0_store_version.sql
#> Executing migration: Migration_2-v2_1_1_mean_exposure_time_type.sql
#> | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100%
#> Executing SQL took 0.00586 secs
#> Saving migration: Migration_2-v2_1_1_mean_exposure_time_type.sql
#> | | | 0% | |======================================================================| 100%
#> Executing SQL took 0.00466 secs
#> Migration complete Migration_2-v2_1_1_mean_exposure_time_type.sql
#> Executing migration: Migration_3-v2_2_0_count_as_bigint.sql
#> | | | 0% | |=================================== | 50% | |======================================================================| 100%
#> Executing SQL took 0.00316 secs
#> Saving migration: Migration_3-v2_2_0_count_as_bigint.sql
#> | | | 0% | |======================================================================| 100%
#> Executing SQL took 0.0029 secs
#> Migration complete Migration_3-v2_2_0_count_as_bigint.sql
#> Closing database connection
#> Updating version number
#> Executing SQL took 0.00788 secs