Hey all,
I'm trying to make a switch between doing my ETL locally within R to SQL server (with SSMS). I first want to start executing my R scripts/ETL within SSMS in the following way:
execute sp_exectue_external_script @langauge = N'R' @script = N' path <- "path of the files is listed here" qvdf <- list.files(path = path, pattern = "*.xlsx", include.dirs = TRUE,full.names = TRUE) %>% lapply(.,read_excel, sheet=1, col_names = TRUE, col_types = "text") %>% lapply(.,slice) ... OutputDataSet <- finaldata %>% as.data.frame() ' GO
Everything is going alright, with no errors at all, but there is one problem. When I try to read all the data, the column names have disappeared. This is probably because I read the data with my R code. How should I procede?