From 93a88d7afcb9d488628fc8ab2a3c52c43d76f36d Mon Sep 17 00:00:00 2001 From: Pranav Anbarasu Date: Wed, 17 Apr 2024 13:56:31 -0700 Subject: [PATCH] Replace underscore with hyphen in date variable value --- scripts/main/sts_synindex_external.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/main/sts_synindex_external.R b/scripts/main/sts_synindex_external.R index 073c318..97f3884 100644 --- a/scripts/main/sts_synindex_external.R +++ b/scripts/main/sts_synindex_external.R @@ -152,7 +152,11 @@ source('~/recover-parquet-external/scripts/deidentification/deidentification.R') # Sync final parquets to bucket ------------------------------------------- -date <- latest_archive %>% stringr::str_extract("[0-9]{4}_[0-9]{2}_[0-9]{2}") +date <- + latest_archive %>% + stringr::str_extract("[0-9]{4}_[0-9]{2}_[0-9]{2}") %>% + stringr::str_replace_all(pattern = "_", replacement = "-") + sync_cmd <- glue::glue('aws s3 --profile service-catalog sync {PARQUET_FINAL_LOCATION} {base_s3_uri_archive}{date}/ --exclude "*owner.txt*" --exclude "*archive*"') system(sync_cmd)