R/bulk_uploads.R
bulk_reference_generation.Rd
The function will first run run_input_validation
on the supplied .txt of information and enforce data validation. All errors must be resolved before the function will proceed.
bulk_reference_generation(
path = getwd(),
filename = "DSbulkUploadR_input.xlsx",
sheet,
max_file_upload = 500,
max_data_upload = 10,
dev = TRUE
)
String. Path to the file.
String. The name of the file with information on what will be uploaded. Defaults to "DSbulkUploadR_input.xlsx". Must be an xlsx.
String. Name of the sheet within the .xlsx to read data from.
Integer. The maximum allowable number of files to upload. Defaults to 500.
Integer. The maximum allowable amount of data to upload (in GB). Defaults to 100.
Logical. Whether the reference creation/file uploads will occur on the development server (TRUE) or the production server (FALSE). Defaults to TRUE.
Dataframe
The function will inform the user of the total number of references to be created, the number of files to be uploaded, and the total volume of data to be uploaded (in GB) and ask the user if they are sure they want to proceed.
The function then creates a draft reference on DataStore for each line in the input .txt and uses the information provided in the .txt to populate the Reference. Finally, all files in the given path for a reference in the .txt will be uploaded to the appropriate reference.
The original dataframe generated from the .txt is returned to the user with a single column added: the DataStore reference ID for each newly created reference.
if (FALSE) { # \dontrun{
bulk_reference_generation(sheet = "AudioRecording")} # }