getTables
Syntax
getTables(dbHandle)
Details
Return a list of tables saved in the specified database:
-
For an administrator, it returns all DFS tables under the specified database.
-
When executed by a non-admin user, it will return:
-
All DFS tables in databases where the user has any of the following permissions: DB_OWNER, DB_MANAGE, DB_READ, DB_WRITE, DB_INSERT, DB_UPDATE, DB_DELETE.
-
Within the specified database, the DFS tables where the user has any of the following permissions: TABLE_READ, TABLE_INSERT, TABLE_WRITE, TABLE_UPDATE, or TABLE_DELETE.
-
Parameters
dbHandle is a database handle.
Returns
A STRING scalar.
Examples
n=1000000
ID=rand(10, n)
dates=2017.08.07..2017.08.11
date=rand(dates, n)
x=rand(10.0, n)
y=rand(10, n)
t1=table(ID, date, x)
t2=table(ID, date, y)
db = database("dfs://valueDB", VALUE, 2017.08.07..2017.08.11)
pt1 = db.createPartitionedTable(t1, `pt1, `date)
pt1.append!(t1)
pt2 = db.createPartitionedTable(t2, `pt2, `date)
pt2.append!(t2);
getTables(db);
// output: ["pt1","pt2"]
