Learn R Programming

dbplyr (version 2.4.0)

remote_name: Metadata about a remote table

Description

remote_name() gives the unescaped name of the remote table, or NULL if it is a query (created by sql()) or already escape (created by ident_q()). remote_table() gives the remote table or the query. remote_query() gives the text of the query, and remote_query_plan() the query plan (as computed by the remote database). remote_src() and remote_con() give the dplyr source and DBI connection respectively.

Usage

remote_name(x, null_if_local = TRUE)

remote_table(x, null_if_local = TRUE)

remote_src(x)

remote_con(x)

remote_query(x, cte = FALSE, sql_options = NULL)

remote_query_plan(x, ...)

Value

The value, or NULL if not remote table, or not applicable. For example, computed queries do not have a "name"

Arguments

x

Remote table, currently must be a tbl_sql.

null_if_local

Return NULL if the remote table is created via tbl_lazy() or lazy_frame()?

cte

[Deprecated] Use the render_otions argument instead.

sql_options

[Experimental] SQL rendering options generated by sql_options().

...

Additional arguments passed on to methods.

Examples

Run this code
mf <- memdb_frame(x = 1:5, y = 5:1, .name = "blorp")
remote_name(mf)
remote_src(mf)
remote_con(mf)
remote_query(mf)

mf2 <- dplyr::filter(mf, x > 3)
remote_name(mf2)
remote_src(mf2)
remote_con(mf2)
remote_query(mf2)

Run the code above in your browser using DataLab