View source: R/hfr_rectify_date.R
hfr_rectify_date | R Documentation |
Without access to change data directly in the database, the only means of changing data is to resubmit a zeroed out version of the original submission. This function replaces any cell with entered data with zero so that it can be resubmitted and processed by Trifacta. The original, correct version should be re-processed after the zeroed dataset has been processes
hfr_rectify_date(subm_file, subm_tab, folderpath_templates = "templates/")
subm_file |
submission file with incorrect dates |
subm_tab |
tab with incorrect dates |
folderpath_templates |
folder path where current HFR templates are located |
exports two files - one with zeroed out data for wrong date and one with corrected date
## Not run:
#store file paths for looping over to read in
df_files_tabs <- list.files(folderpath, full.names = TRUE) %>%
purrr::map_dfr(~ tibble::tibble(file = .x,
tabs = readxl::excel_sheets(.x))) %>%
dplyr::filter(stringr::str_detect(tabs, "HFR"))
#fix date and create zeroed version for wrong date (to clean from DB)
pwalk(df_files_tabs, ~hfr_rectify_date(..1, ..2))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.