upload_data: Upload CSV Data to NABat Database

View source: R/nabat_gql_queries.R

upload_dataR Documentation

Upload CSV Data to NABat Database

Description

Gets a preview file, presigned URL, UUID, uploads the CSV to an S3 bucket, and then processes the CSV into the NABat Database.

Usage

upload_data(
  token,
  user_id,
  file_path,
  project_id,
  survey_type,
  file_name = NULL,
  branch = "prod",
  url = NULL,
  aws_gql = NULL,
  aws_alb = NULL,
  docker = FALSE
)

Arguments

token

List token created from get_nabat_gql_token() or get_refresh_token()

user_id

Numeric NABat user Id - from get_user_id_by_email()

file_path

String full path to CSV file for preview

project_id

Numeric or String a project id

survey_type

(optional) String 'bulk_sae' | 'bulk_mae' | 'bulk_hib' | 'bulk_mat'

branch

(optional) String that defaults to 'prod' but can also be 'dev'|'beta'|'local'

url

(optional) String url to use for GQL

aws_gql

(optional) String url to use in aws

aws_alb

(optional) String url to use in aws

docker

(optional) Boolean if being run in docker container or not


usgs/nabatr documentation built on Jan. 28, 2024, 7:10 a.m.