I refer to all tbl_*
class object as tbls (which I pronounce the same way I do "tibble" because I'm not able to make whatever noise would otherwise constitute tbl
, and for most intents and purposes, they act the same way— excepting for the fact that it's a remote source. By analogy, I might refer to a tbl
as a data.frame
more generically.
With what limited understanding of classes that I have, my understanding is as follows:
tbl_dbi
is the S3 class that returns when you use tbl()
with dbplyr (as you've done there); it is still a tbl (hence the class cascade — or whatever the word for that is), but has extra information associated with it re. the database source, etc.
Lifting from the docs here:
flights_db <- tbl(con, "flights")
When you print it out, you’ll notice that it mostly looks like a regular tibble:
flights_db
#> Source: table<flights> [?? x 19]
#> Database: sqlite 3.11.1 []
#>
#> # S3: tbl_dbi
#> year month day dep_time sched_dep_time dep_delay arr_time
#> <int> <int> <int> <int> <int> <dbl> <int>
#> 1 2013 1 1 517 515 2 830
#> 2 2013 1 1 533 529 4 850
#> 3 2013 1 1 542 540 2 923
#> 4 2013 1 1 544 545 -1 1004
#> 5 2013 1 1 554 600 -6 812
#> 6 2013 1 1 554 558 -4 740
#> # ... with more rows, and 12 more variables: sched_arr_time <int>,
#> # arr_delay <dbl>, carrier <chr>, flight <int>, tailnum <chr>,
#> # origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>, hour <dbl>,
#> # minute <dbl>, time_hour <dbl>
The main difference is that you can see that it’s a remote source in a SQLite database.
Is an unevalutated blob of SQL a tbl? Not until you make it so… If it's unexecuted, it's like potential energy— or an egg, or something that hasn't actually become what it will ultimately become yet… Or, to borrow from Sortals by way of Elijah Meeks (whom I pointed to sortals, so whose knowledge is it, really?!)
https://twitter.com/Elijah_Meeks/status/990103435205722112
Actually, this is totally a sortal question— not the pronunciation part, but (let's be real) you veered off from the pronunciation bit at the end, too…