描述表Describe Table

描述表Describe Table

DESCRIBE [EXTENDED] [db_name.]table_name

Azure Databricks 上的 Delta LakeDelta Lake on Azure Databricks

DESCRIBE [EXTENDED] delta.`<path-to-table>`

返回现有表的元数据(列名称、数据类型和注释)。Return the metadata of an existing table (column names, data types, and comments). 如果该表不存在,则会引发异常。If the table does not exist, an exception is thrown.

EXTENDED

显示有关表的详细信息,包括父数据库、表类型、存储信息和属性。Display detailed information about the table, including parent database, table type, storage information, and properties.

描述分区Describe Partition

DESCRIBE [EXTENDED] [db_name.]table_name PARTITION partition_spec

Azure Databricks 上的 Delta LakeDelta Lake on Azure Databricks

DESCRIBE [EXTENDED] delta.`<path-to-table>` PARTITION partition_spec

返回指定分区的元数据。Return the metadata of a specified partition. partition_spec 必须提供所有分区列的值。The partition_spec must provide the values for all the partition columns.

EXTENDED

显示有关表和分区特定存储信息的基本信息。Display basic information about the table and the partition-specific storage information.

描述列Describe Columns

DESCRIBE [EXTENDED] [db_name.]table_name column_name

Azure Databricks 上的 Delta LakeDelta Lake on Azure Databricks

DESCRIBE [EXTENDED] delta.`<path-to-table>`

返回指定列的元数据。Return the metadata of a specified column.

EXTENDED

显示有关指定列的详细信息,包括命令 ANALYZE TABLE table_name COMPUTE STATISTICS FOR COLUMNS column_name [column_name, ...] 收集的列统计信息。Display detailed information about the specified columns, including the column statistics collected by the command ANALYZE TABLE table_name COMPUTE STATISTICS FOR COLUMNS column_name [column_name, ...].

描述格式Describe Formatted

DESCRIBE FORMATTED [db_name.]table_name

Azure Databricks 上的 Delta LakeDelta Lake on Azure Databricks

DESCRIBE FORMATTED delta.`<path-to-table>`

返回表格式。Return the table format.

描述详细信息(Azure Databricks 上的 Delta Lake)Describe Detail (Delta Lake on Azure Databricks)

DESCRIBE DETAIL [db_name.]table_name

DESCRIBE DETAIL delta.`<path-to-table>`

返回架构、分区、表大小等方面的信息。Return information about schema, partitioning, table size, and so on. 例如,你可以查看表的当前读取器和编写器的版本For example, you can see the current reader and writer versions of a table.