{#- Hello-world silver table — replaced by /plan + /build-next -#}
CREATE OR REFRESH STREAMING TABLE {{ catalog }}.default.silver_customers (
  CONSTRAINT valid_id EXPECT (customer_id IS NOT NULL) ON VIOLATION DROP ROW,
  CONSTRAINT valid_name EXPECT (name IS NOT NULL) ON VIOLATION DROP ROW
)
COMMENT "Sample silver: cleaned customer data with quality constraints"
TBLPROPERTIES ("quality" = "silver")
AS SELECT
  customer_id,
  name,
  email,
  age,
  balance,
  risk_score,
  signup_date,
  ingestion_timestamp,
  current_timestamp() AS processed_timestamp
FROM STREAM({{ catalog }}.default.bronze_customers);
