Closed mvuorre closed 2 years ago
It would be easy to export to CSV by event_name, but it might be easier to just connect R to postgres
library(DBI)
con <- dbConnect(
RPostgres::Postgres(),
dbname = "postgres",
host = "localhost",
port = 5432,
user = "postgres",
password = "postgres"
)
DBI::dbListTables(con)
res <- dbSendQuery(con, "SELECT * FROM pws WHERE \"EventName\" = 'mood_reported'")
res <- dbFetch(res)
head(res)
This is a 5-star solution.
@rpsychologist the exported csv is becoming quite large to import / look at in R (which dummies like me need). Would it make sense / is it possible to e.g. export multiple CSVs by event_name?