powered by
Wrapper function to read table from default or custom schema, and return NA by default if an error is encountered.
NA
db.read_table(con, table, schema = NA, collect = TRUE, error_value = NA)
If the SQL query executes successfully, the return value will be an object of class tibble. If an error is encountered, the return value will be inherited from the error_value argument provided (default is NA).
tibble
error_value
An object that inherits from DBIConnection-class, typically generated by dbConnect()
DBIConnection-class
dbConnect()
A character string specifying the DBMS table name.
A character string specifying the schema in which the table is nested.
A logical specifying whether the query results should be collected into memory or left as a lazy query.
Error value to return if dbReadTable() fails. Default is NA.
dbReadTable()
con <- connect_sqlite(auto_disconnect = FALSE) dplyr::copy_to(con, iris, "df", temporary = FALSE) db.read_table(con = con, table = 'df')
Run the code above in your browser using DataLab