Dataset$connect_dbi
Dataset$connect_dbi() → DBI::DBIConnection
Returns a DBI connection that can be used by dbplyr and other interfaces that work with DBI. This connection is scoped to the respective dataset, avoiding the need to fully qualify tables.
DBI::dbListTables() returns the tables in the dataset, using the names that you'd use to reference them in SQL (e.g., daily_observations).
See redivis$connect_dbi() for the R functions that can be used within dplyr verbs.
Returns:
Examples
con <- redivis$dataset("demo.ghcn_daily_weather_data")$connect_dbi()
tbl(con, "stations") |> filter(latitude > 0) |> collect()
# Prints a tibble with the relevant weather stationsLast updated
Was this helpful?

