Add table description to iceberg table from pyspark

Viewed 291

I was able to add a table comment to an iceberg table using trino, with this trino command:

comment on table iceberg.table_schema.table_name is 'My Comment'

Also It is possible to read that from pyspark using:

spark.sql("describe extended iceberg.table_schema.table_name")

I couldn't find a way to insert these comments to the table using spark. Is there a way to do so? Thanks a lot

1 Answers

So found out a way to do it like this:

ALTER TABLE catalog.schema.table_name SET TBLPROPERTIES('comment'='a comment')

But i would still like to do that through saveAsTable if possible.

Related