DESCRIBE TABLES¶
The DESCRIBE TABLES
command lets you list information about tables in your database.
Note
DESCRIBE
commands use CPU to increase usability.
Syntax¶
DESC[RIBE] TABLES [ DATABASE <database_name> ] [ SCHEMA <schema_name> ] [ALL | INTERNAL | EXTERNAL] [LIKE 'table_name']
Parameters¶
Parameter |
Parameter Type |
Description |
---|---|---|
|
The name of the database to search within |
|
|
The name of the schema to search within |
|
|
You may define the |
|
|
String pattern to match |
Output¶
Parameter |
Type |
Description |
---|---|---|
|
|
Displays the name of the database |
|
|
Displays the name of the schema |
|
|
Displays the name of the table |
|
|
Displays whether the table is internal or external |
|
|
Displays the amount of rows in the table |
|
|
Displays the table creation timestamp |
|
|
Displays additional table details |
Examples¶
DESCRIBE TABLES DATABASE master SCHEMA public EXTERNAL;
database_name|schema_name|table_name |table_type|row_count|created_on |Additional details |
-------------+-----------+-------------------------+----------+---------+-------------------+--------------------------------------------------------------------------------------------------------+
master |public |AdImpressions |External | |2023-07-05 11:08:48|Format: json, Path: gs://product_sqream/blue_demo/DataSources/ad_impressions.json |
master |public |AdImpressionsCleaned |External | |2023-07-06 06:02:32|Format: parquet, Path: gs://product_sqream/blue_demo/CleanedNValidatedData/adImpressions_cleaned.parquet|
master |public |applications_gold_ml |External | |2023-08-09 11:15:41|Format: parquet, Path: gs://sqream-blue-fintech-demo/storage/applications_gold_ml/ |
master |public |AdImpressionsTransformed |External | |2023-07-06 06:04:42|Format: parquet, Path: gs://product_sqream/blue_demo/TransformedData/adImpressions_transformed.parquet |
master |public |customer |External | |2023-08-10 12:09:09|Format: parquet, Path: gs://delivery-poc-us/demo/customer-9.parquet |
master |public |applications_bronze |External | |2023-08-10 12:10:57|Format: json, Path: gs://sqream-blue-fintech-demo/loan_dataset/json/application_record.json |
master |public |credit_records_bronze |External | |2023-08-10 12:13:53|Format: json, Path: gs://sqream-blue-fintech-demo/loan_dataset/json/credit_record.json |
master |public |applications_silver |External | |2023-08-10 12:16:38|Format: parquet, Path: gs://sqream-blue-fintech-demo/storage/applications_silver/* |
master |public |credit_records_silver |External | |2023-08-10 12:16:41|Format: parquet, Path: gs://sqream-blue-fintech-demo/storage/credit_records_silver/* |
master |public |ClickStream |External | |2023-07-06 06:19:26|Format: json, Path: gs://product_sqream/blue_demo/DataSources/clickstream.json |
master |public |ClickStreamCleaned |External | |2023-07-06 06:20:51|Format: parquet, Path: gs://product_sqream/blue_demo/CleanedNValidatedData/clickstream_cleaned.parquet |
master |public |ClickStreamTransformed |External | |2023-07-06 06:21:20|Format: parquet, Path: gs://product_sqream/blue_demo/TransformedData/clickstream_transformed.parquet |
master |public |ThirdPartyData |External | |2023-07-06 06:22:29|Format: json, Path: gs://product_sqream/blue_demo/DataSources/thirdpartydata.json |
master |public |ThirdPartyDataCleaned |External | |2023-07-06 06:23:10|Format: parquet, Path: gs://product_sqream/blue_demo/CleanedNValidatedData/3rdparty_cleaned.parquet |
master |public |ThirdPartyDataTransformed|External | |2023-07-06 06:23:50|Format: parquet, Path: gs://product_sqream/blue_demo/TransformedData/3rdparty_transformed.parquet |
DESCRIBE TABLES DATABASE master SCHEMA public like '%records%';
database_name|schema_name|table_name |table_type|row_count|created_on |Additional details |
-------------+-----------+---------------------+----------+---------+-------------------+--------------------------------------------------------------------------------------+
master |public |credit_records_bronze|External | |2023-08-10 12:13:53|Format: json, Path: gs://sqream-blue-fintech-demo/loan_dataset/json/credit_record.json|
master |public |credit_records_silver|External | |2023-08-10 12:16:41|Format: parquet, Path: gs://sqream-blue-fintech-demo/storage/credit_records_silver/* |
Permissions¶
This command requires a CONNECT
permission on the database level and a USAGE
permission on the schema level.