簡體   English   中英

對 Delta 表的表注釋

[英]Table Comment on Delta Table

我在數據塊中創建了一個增量表,注釋如下。

DROP TABLE IF EXISTS dbtest.test_antony;
CREATE TABLE IF NOT EXISTS dbtest.test_antony(
  db_name STRING COMMENT 'EN: Database Name ',
  table_name STRING COMMENT 'EN: Table Name '
)
USING delta
LOCATION 'dbfs:/mnt/user/antony/test_antony'
COMMENT 'my test table'

我試圖通過使用下面的評論來提取這個表,但是我看不到表評論'my test table'

describe table formatted dbtest.test_antony;
describe detail dbtest.test_antony;
describe dbtest.test_antony;

在此處輸入圖像描述

如何在表格提取中獲取表格注釋? 任何線索表示贊賞!

嗯,也許它取決於 Databricks 運行時版本和/或 Hive 元存儲版本(如果您不使用內置元存儲)。

您的代碼在 DBR 11.1 上非常適合我,並且還describe table extended返回Comment

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM