Skip to contents

Connect to instance of LTER-core-metabase and query for personnel list with years associated (BLE LTER Core Program data package requirement).

Usage

export_personnel(
  dbname = "ble_metabase",
  schema = "pkg_mgmt",
  dataset_ids,
  host = "localhost",
  port = 5432,
  user = NULL,
  password = NULL,
  write_to_file = TRUE,
  file_dir = getwd(),
  file_name = NULL
)

Arguments

dbname

(character) name of database. Defaults to "ble_metabase".

schema

(character) name of schema containing views. Defaults to 'pkg_mgmt'.

dataset_ids

(numeric) Number or numeric vector of dataset IDs to query.

host

(character) host name or IP address. Defaults to 'localhost'.

port

(numeric) port number. Defaults to 5432.

user

(character) (optional) username to use in connecting to database. Use to save time. If not supplied, the R console will prompt you to enter a username.

password

(character) (optional) password to user. Use to save time. If not supplied, the R console will prompt you to enter a password.

write_to_file

(logical) Whether to write to file. Defaults to TRUE.

file_dir

(character) Full path of directory to write file to. Defaults to current working directory.

file_name

(character) File name, will default to "BLE_LTER_(dataset_ids)_personnel.csv" if not specified.

Value

(data.frame) A data frame of personnel associated with specified dataset IDs as queried from metabase.