Table Comment missing on Azure Delta Table

Viewed 54

I have created a delta table in azure databricks with COMMENT as below.

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'

I tried to take extract of this table by using below comments, but no where I could see the table comment 'my test table'.

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

enter image description here

Also when I run SHOW CREATE TABLE I am not able to see COMMENT for the table. I tried with cluster versions 10.4 and 11.2

How Could I get the table comment in table extract ? Any leads appreciated!

1 Answers

Hmmm, maybe it's dependent on the Databricks Runtime version and/or on the Hive metastore version (if you're not using built-in metastore).

Your code works perfectly for me on DBR 11.1, and describe table extended returns Comment row as well

enter image description here

Related