Delta Live Tables @expect compare tables count between two stages

140015
Databricks Partner

Hello,

I'm wondering if there is an option to make an expectation on DLT that will compare the number of records between two stages and e.g. fail if there is a difference between those counts?

I mean something like this:

@dlt.table()

def bronze():

Some transformations

@dlt.expect_or_fail("equal_number_of_records", "bronze_table.count() == silver_table.count()"

@dlt.table()

def silver():

Some transformations