upload_to_azure: Upload a file to Microsoft Azure Data Lake

View source: R/utils.R

upload_to_azureR Documentation

Upload a file to Microsoft Azure Data Lake

Description

This function is for uploading a file resource to the Microsoft Azure Data Lake.

Usage

upload_to_azure(file, sas)

Arguments

file

The file or directory to upload.

sas

A SAS url for the designated destination on Microsoft Azure Data Lake.

Details

Uses the azcopy Command Line Interface to copy a file to Microsoft Azure Data Lake. Assumes azcopy is properly installed and that the azcopy program is in your PATH. The function performs a recursive automatically so it can take a file or directory for upload. The SAS URL is generated on Azure by someone who has permission to the desired destination. Please be sure to use the SAS url and not the SAS token. The sas url can be provided as an argument; if the argument is not provided it will search for a system environment variable 'AZURE_SAS_URL'.

Value

TRUE on success. If the command fails, the function will exit with an error.

Author(s)

Lori Shepherd

Examples

## Not run: 
upload_to_azure("myfile.txt", "https://sasurl")

## End(Not run)

Bioconductor/AnnotationHubData documentation built on Oct. 31, 2024, 8:13 a.m.