Returns logical scalar if the table exists or not. TRUE if the table exists, FALSE otherwise.

# S4 method for AthenaConnection,character
dbExistsTable(conn, name, ...)



A DBIConnection object, as returned by dbConnect().


A character string specifying a DBMS table name.


Other parameters passed on to methods.


dbExistsTable() returns logical scalar. TRUE if the table exists, FALSE otherwise.

See also


if (FALSE) { # 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) }