View Dynamic Table Structure
Description
By using the DESC or DESCRIBE statement, users can view detailed structural information of a specified dynamic table in the Lakehouse database. Adding the EXTENDED keyword allows users to view the scheduling cycle and refresh attributes of the dynamic table.
Syntax
DESC[RIBE] [TABLE] [EXTENDED] dynamic_table_name;
Parameter Description
- DESC[RIBE]: DESC and DESCRIBE can be used interchangeably, both representing the command to describe the table structure.
- TABLE: Optional parameter, used to specify the type of table structure to view, such as BASE TABLE or VIEW, etc.
- EXTENDED: Optional parameter, when this keyword is added, you can view the scheduling cycle, refresh attributes, scheduling status, base tables used, and the number of rows of the dynamic table.
- dynamic_table_name: Specifies the name of the table whose structure needs to be viewed.
Usage Examples
DESC dt_agg; +-------------+-----------------+---------+ | column_name | data_type | comment | +-------------+-----------------+---------+ | j | int | | | cnt | bigint not null | | +-------------+-----------------+---------+ DESC EXTENDED dt_agg; +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | column_name | data_type | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | j | int | | cnt | bigint not null | | | | | # detailed table information | | | schema | public | | name | dt_agg | | creator | UAT_TEST | | created_time | 2024-07-23 18:02:15.774 | | last_modified_time | 2024-07-24 11:01:11.289 | | comment | | | properties | () | | type | DYNAMIC TABLE | | view_text | SELECT dt_tran.j, `count`(*) AS cnt FROM qingyun.`public`.dt_tran GROUP BY dt_tran.j; | | view_original_text | (select j,count(*) as cnt from dt_tran group by j); | | source_tables | [86:qingyun.public.dt_tran=9063157128606430641] | | refresh_type | on schedule(disabled) | | refresh_start_time | 2024-07-23 18:02:15.725 | | refresh_interval_second | 60 | | refresh_vcluster | qingyun.TEST | | unique_key_is_valid | true | | unique_key_version_info | unique_key_version: 1, explode_sort_key_version: 1, digest: H4sIAAAAAAAAA3NMT9cx0nEP8g8NUHCKVDBUcPb3CfX1C+ZSCE5OzANKBfmHx3u7Riq4Bfn7KqSUxJcUJeZxAQCTzdfANgAAAA==, unique | | format | PARQUET | | statistics | 5 rows 2729 bytes | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Singdata © 2024 Singdata, Inc. All Rights Reserved.