Skip to content

Instantly share code, notes, and snippets.

@Athospd
Created February 16, 2019 16:39
Show Gist options
  • Save Athospd/5fba61f62465cf2ba6e731abdbc19454 to your computer and use it in GitHub Desktop.
Save Athospd/5fba61f62465cf2ba6e731abdbc19454 to your computer and use it in GitHub Desktop.
library(RSQLite)
library(tidyverse)
library(dbplyr)
con <- RSQLite::dbConnect(RSQLite::SQLite(), "database.sqlite")
nome_das_tabelas <- RSQLite::dbListTables(con)
tabelas <- nome_das_tabelas %>%
map(~dbplyr::db_collect(con, glue::glue("select * from {.x}"))) %>%
set_names(nome_das_tabelas)
writexl::write_xlsx(tabelas, path = "soccer.xlsx")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment