This function get the specified object from an AWS S3 bucket and reads it
using read_excel. It keeps the excel in memory and,
therefore, it avoids the unintended consequences of saving the file in the
disk.
read_excel_datalake(
s3_path,
bucket_name = mfe_datalake_bucket,
version = NULL,
all_sheets = T,
sheet = 1,
...
)The filename of the desired excel in the S3 bucket including the full path
Name of the bucket to connect. By default, it uses the Ministry for the Environment data lake for environmental reporting "mfedlkinput".
VersionId of the object key desired. Can be retrieved using
get_bucket_version_df
If more than one sheet is present, T = read all sheets into a list, F = default to sheet specified
The sheet number to extract. Defaults to 1.
Other arguments passed to the reading_function
A `tibble
if (FALSE) { # \dontrun{
setup_datalake_access()
files <- search_datalake(".x", "land", "2021")$Key
read_excel_datalake(files[2])
read_excel_datalake(files[1], sheet = 2)
} # }