Create an empty instance of the geom_template in a given schema in PostGIS
createGeomInstanceTable.Rd
Create an empty instance of the geom_template in a given schema in PostGIS
Arguments
- connectionDetails
(list) An object of class connectionDetails as created by the createConnectionDetails function
- schema
(character) The name of the schema in PostGIS where the empty geom_X should be created
- name
(character) The suffix for the table name to be created; will be appended to "geom_"
Examples
if (FALSE) {
variableSourceId <- 157
variableTable <- DatabaseConnector::dbGetQuery(conn, paste0("SELECT * FROM backbone.variable_source WHERE variable_source_id = ", variableSourceId))
dataSourceRecord <- getDataSourceRecord(conn, variableTable$data_source_uuid)
geomIndex <- getGeomIndexByDataSourceUuid(conn, dataSourceRecord$geom_dependency_uuid)
createGeomInstanceTable(conn = conn, schema = geomIndex$database_schema, name = geomIndex$table_name)
}