Arguments:
all_tables()
does not require arguments.
Return value:
Examples:
- Get all tables in the database
- 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
table_columns
table_columns('tableName')
returns the schema of a table
tableName
is the name of an existing table as a string
Return value:
Returns a with two columns:
columnName
- name of the available columns in the tablecolumnType
- type of the column
columnName | columnType |
---|---|
TS | TIMESTAMP |
Name | STRING |
Age | INT |
Sex | SYMBOL |
Grade | DOUBLE |
… | … |
- Get all columns in the database that match the name ‘sales’
- Get the count of column types
SELECT columnType, count() FROM table_columns('wthr');
columnType | count |
---|---|
INT | 4 |
DOUBLE | 8 |
SYMBOL | 2 |