Getting data quality in Delta Live Table (bronze, gold, silver..)

Viewed 274

How to check if Delta Live Table is in bronze, gold or silver layer(zone) with python? I have notebook for creating Delta Live Table pipeline, and I need to know what is quality of data(silver, bronze, gold). How to get that information with python?

In SQL exist something like TBLPROPERTIES('BRONZE'), is there anything like that for python?

2 Answers

If you have a sql solution run it directly with

spark.sql('''SHOW TBLPROPERTIES table_name'')

You can do something like this:

@dlt.table(
  comment="Bronze live streaming table for Test data",
  name="bronze_test_table",
  table_properties={
    "quality": "bronze"
  }
)
Related