Meta functions
#
all_tablesall_tables()
returns all tables in the database.
Arguments:
all_tables()
does not require arguments.
Return value:
Returns a table
.
Examples:
- Get all tables in the database
tableName |
---|
table1 |
table2 |
... |
- Get all tables in the database that match 'sales'
tableName |
---|
sales-north |
sales-west |
sales-east |
sales-south |
- Get all tables in reverse alphabetical order
tableName |
---|
table_n |
table_n-1 |
table_n-2 |
... |
#
table_columnstable_columns('tableName')
returns the schema of a table
Arguments:
tableName
is the name of an existing table as a string
Return value:
Returns a table
with two columns:
columnName
- name of the available columns in the tablecolumnType
- type of the column
Examples:
- Get all columns in the table
columnName | columnType |
---|---|
TS | TIMESTAMP |
Name | STRING |
Age | INT |
Sex | SYMBOL |
Grade | DOUBLE |
... | ... |
- Get all columns in the database that match the name 'sales'
columnName |
---|
sales-north |
sales-west |
sales-east |
sales-south |
- Get the count of column types
columnType | count |
---|---|
INT | 4 |
DOUBLE | 8 |
SYMBOL | 2 |