Create an empty instance of the attr_template in a given schema in PostGIS
createAttrInstanceTable.Rd
Create an empty instance of the attr_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 attr_X should be created
- name
(character) The suffix for the table name to be created; will be appended to "attr_"
Examples
if (FALSE) {
variableSourceId <- 157
variableTable <- DatabaseConnector::dbGetQuery(conn, paste0("SELECT * FROM backbone.variable_source WHERE variable_source_id = ", variableSourceId))
attrIndex <- DatabaseConnector::dbGetQuery(conn, paste0("SELECT * FROM backbone.attr_index WHERE data_source_id = ", variableTable$data_source_uuid,";"))
createAttrInstanceTable(conn, schema = attrIndex$database_schema, name = attrIndex$table_name)
}