export_personnel: Connect to metabase and query for personnel list.

View source: R/export_personnel.R

export_personnelR Documentation

Connect to metabase and query for personnel list.

Description

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 = "10.157.18.83",
  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.


atn38/BLE-LTER-utils documentation built on May 5, 2024, 12:30 p.m.