dbExistsTable | R Documentation |
Returns logical scalar if the table exists or not. TRUE
if the table exists, FALSE
otherwise.
## S4 method for signature 'AthenaConnection,character' dbExistsTable(conn, name, ...)
conn |
A DBIConnection object, as returned by
|
name |
The table name, passed on to
|
... |
Other parameters passed on to methods. |
dbExistsTable()
returns logical scalar. TRUE
if the table exists, FALSE
otherwise.
dbExistsTable
## Not run: # Note: # - Require AWS Account to run below example. # - Different connection methods can be used please see `RAthena::dbConnect` documnentation library(DBI) # Demo connection to Athena using profile name con <- dbConnect(RAthena::athena()) # Write data.frame to Athena table dbWriteTable(con, "mtcars", mtcars, partition = c("TIMESTAMP" = format(Sys.Date(), "%Y%m%d")), s3.location = "s3://mybucket/data/" ) # Check if table exists from Athena dbExistsTable(con, "mtcars") # Disconnect conenction dbDisconnect(con) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.