Created
June 15, 2022 16:22
-
-
Save gadenbuie/e5260521b64fb85a15cb02d81809d8c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(dbplyr) | |
library(starwarsdb) | |
con <- starwars_connect() | |
tbl(con, sql("select * from films")) | |
#> # Source: SQL [?? x 6] | |
#> # Database: duckdb_connection | |
#> title episode_id opening_crawl director producer release_date | |
#> <chr> <int> <chr> <chr> <chr> <date> | |
#> 1 A New Hope 4 "It is a per… George … Gary Ku… 1977-05-25 | |
#> 2 The Empire Strikes Ba… 5 "It is a dar… Irvin K… Gary Ku… 1980-05-17 | |
#> 3 Return of the Jedi 6 "Luke Skywal… Richard… Howard … 1983-05-25 | |
#> 4 The Phantom Menace 1 "Turmoil has… George … Rick Mc… 1999-05-19 | |
#> 5 Attack of the Clones 2 "There is un… George … Rick Mc… 2002-05-16 | |
#> 6 Revenge of the Sith 3 "War! The Re… George … Rick Mc… 2005-05-19 | |
(films <- tbl(con, "films")) | |
#> # Source: table<films> [?? x 6] | |
#> # Database: duckdb_connection | |
#> title episode_id opening_crawl director producer release_date | |
#> <chr> <int> <chr> <chr> <chr> <date> | |
#> 1 A New Hope 4 "It is a per… George … Gary Ku… 1977-05-25 | |
#> 2 The Empire Strikes Ba… 5 "It is a dar… Irvin K… Gary Ku… 1980-05-17 | |
#> 3 Return of the Jedi 6 "Luke Skywal… Richard… Howard … 1983-05-25 | |
#> 4 The Phantom Menace 1 "Turmoil has… George … Rick Mc… 1999-05-19 | |
#> 5 Attack of the Clones 2 "There is un… George … Rick Mc… 2002-05-16 | |
#> 6 Revenge of the Sith 3 "War! The Re… George … Rick Mc… 2005-05-19 | |
films %>% | |
remote_con() %>% | |
tbl(sql("select * from films")) | |
#> # Source: SQL [?? x 6] | |
#> # Database: duckdb_connection | |
#> title episode_id opening_crawl director producer release_date | |
#> <chr> <int> <chr> <chr> <chr> <date> | |
#> 1 A New Hope 4 "It is a per… George … Gary Ku… 1977-05-25 | |
#> 2 The Empire Strikes Ba… 5 "It is a dar… Irvin K… Gary Ku… 1980-05-17 | |
#> 3 Return of the Jedi 6 "Luke Skywal… Richard… Howard … 1983-05-25 | |
#> 4 The Phantom Menace 1 "Turmoil has… George … Rick Mc… 1999-05-19 | |
#> 5 Attack of the Clones 2 "There is un… George … Rick Mc… 2002-05-16 | |
#> 6 Revenge of the Sith 3 "War! The Re… George … Rick Mc… 2005-05-19 | |
# https://gist.github.com/e5260521b64fb85a15cb02d81809d8c3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment