dbpf_sensor_add_xlsx: Adds a new sensors to DB based on Excel file.

View source: R/dbpf_sensor_add_xlsx.R

dbpf_sensor_add_xlsxR Documentation

Adds a new sensors to DB based on Excel file.

Description

Adds a new sensors to DB based on Excel file. See description below for details and look at Atlassian for template.

Usage

dbpf_sensor_add_xlsx(con, file_xlsx, mode = "test")

Arguments

con

Database connection object, as returned by dbpf_con()

file_xlsx

Excel file containing new sensor descriptions and these columns: label, device_id, type_of_measurement, unit_of_measurement, accuracy, precision, height_in_metres, serial_number, sensor_id Column sensor_id is left blank for new sensors.

mode

= 'test' (default, read-only) or 'insert' (will insert into DB)

Details

Run in test mode first. If you have no DB login to write data, run in test mode with your login and then pass to someone who does.

Value

Writes updated Excel file with same name. In the file, test results are reported and, if new sensors were made, their id is given.

Author(s)

Stephan Gruber <stephan.gruber@carleton.ca>

Examples

## Not run: 
con <- dbpf_con()
bpf_sensor_add_xlsx(con, "/Users/stgruber/sensor.xlsx", mode = 'test')
dbDisconnect(con)

## End(Not run)

geocryology/PermafrostDB documentation built on April 17, 2025, 11:54 a.m.