Attempts to create a dplyr::tbl() object. If that fails, then odbc::dbConnect() to re-connect.
odbcReConnect(con, on_table = dbplyr::in_schema("pg_catalog", "pg_type"))
An established DBI/odbc connection object
The DB table, possibly in a schema, to use for test.
odbc::IsValid does not check the connection is actually still live, which
is why we use
dplyr::tbl() to test.
Will throw error Could not re-establish connection., if new connection is not
identical() to original.
The original, or re-estbalished, connection.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.