dbAdd_device_model: Add device models to 'device_model' table

Description Usage Arguments Value See Also Examples

View source: R/db_write.R

Description

dbWriteTable_device_model requires a correct device type id and, optionally, a correct device manufacturer id while dbAdd_device_model derives that from the device type and the device manufacturer name, respectively.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
dbAdd_device_model(
  conn,
  devmod_name,
  devtype_name,
  devman_name = NULL,
  devmod_comment = NULL
)

dbWriteTable_device_model(
  conn,
  devmod_name,
  devtype_id,
  devman_id = NULL,
  devmod_comment = NULL
)

Arguments

conn

Database connection.

devmod_name

String vector of name of model.

devtype_name

String vector of name of device type.

devman_name

String vector of name of device manufacturer.

devmod_comment

String vector of additional comments.

devtype_id

Integer vector of device_type IDs.

devman_id

Integer vector of device_manufacturer IDs.

Value

Data frame of newly added rows.

See Also

Other custom dbWriteTable functions: dbAddCorrection_station_adlershof(), dbAddCorrection_station_patagonia(), dbAdd_calibration_state(), dbAdd_device(), dbAdd_integration(), dbAdd_measurand(), dbAdd_physical_quantity(), dbAdd_station_adlershof(), dbAdd_station_patagonia(), dbWriteTable_device_manufacturer(), dbWriteTable_device_type(), dbWriteTable_integration_type(), dbWriteTable_person(), dbWriteTable_quality_flag(), dbWriteTable_site()

Examples

1
2
3
4
5
6
7
8
## Not run: 
con <- dbConnect_klimageo()
dbWriteTable_device_manufacturer(con, "TSI")
dbWriteTable_device_type(con, "thermometer")
dbWriteTable_device_model(con, "THERMO1000", 1, 1)
dbDisconnect(con)

## End(Not run)

sebschub/klimageodb documentation built on Sept. 25, 2021, 4:16 p.m.