database_exists {catalog} | R Documentation |
Check If A Database Exists
Description
Check if the database with the specified name exists. This will check the list of hive databases in the current session to see if the database exists.
Usage
database_exists(sc, name)
Arguments
sc |
A |
name |
|
Value
A logical(1)
vector indicating TRUE
if the database exists and FALSE
otherwise.
See Also
current_database()
, set_current_database()
, list_databases()
Examples
## Not run:
sc <- sparklyr::spark_connect(master = "local")
database_exists(sc = sc, name = "default")
database_exists(sc = sc, name = "fake_database")
## End(Not run)
[Package catalog version 0.1.1 Index]