existsDatabase
Syntax
existsDatabase(dbUrl)
Details
Check if a database exists under the specified folder.
Parameters
dbUrl is a string indicating the path of a database folder.
Returns
A Boolean scalar. true and false represent the
specified database exists/does not exist, respectively.
Examples
To check if a DFS database exists:
n=1000000
ID=rand(10, n)
dates=2017.08.07..2017.08.11
date=rand(dates, n)
x=rand(10.0, n)
t=table(ID, date, x)
db = database("dfs://valueDB", VALUE, 2017.08.07..2017.08.11)
pt = db.createPartitionedTable(t, `pt, `date);
pt.append!(t);
existsDatabase("dfs://valueDB");
// output: true
existsDatabase("dfs://valueDB/20170807");
// output: false
