Skip to contents

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 spark_connection.

name

character(1). The name of the database to set the current database to.

Value

A logical(1) vector indicating TRUE if the database exists and FALSE

otherwise.

Examples

if (FALSE) {
sc <- sparklyr::spark_connect(master = "local")
database_exists(sc = sc, name = "default")
database_exists(sc = sc, name = "fake_database")
}