Код: Выделить всё
%python
from pyspark.sql.functions import col
from pyspark import pipelines as dp
@dp.table(
name="orders",
comment="Orders table with data quality constraints"
)
@dp.expect_all_or_fail(
"expect_table_row_count_to_be_between", "COUNT(*) > 100",
"customer_id_not_null", "customer_id IS NOT NULL",
"expect_column_values_to_be_in_set", "currency IN ('USD', 'EUR', 'GBP')"
)
def orders():
return dp.read("Xyntrel_bronze.bronze.orders").filter(
col("customer_id").isNotNull()
)
Подробнее здесь: https://stackoverflow.com/questions/798 ... with-error
Мобильная версия