@gowri_databrick You can adopt a tiered data quality strategy where the Silver layer handles the bulk of the DQ expectations enforcement while Bronze remains raw and unconstrained and Gold stays focused on reporting logic.
Bronze Layer - Raw Ingestion and Auditability
Keep Bronze as an immutable, append only zone. You can avoid filtering or dropping records in it. You can add the incoming data with technical metadata such as _ingested_at and _metadata.file_path for auditing and debugging. Apply expectations only if an issue would cause a pipeline-critical failure, using ON VIOLATION FAIL UPDATE for mandatory system level fields. Preserving raw data ensures you can always replay or reprocess historical records if downstream rules change.
Silver Layer Primary Data Quality Enforcement
You can do the primary data quality and cleansing as a centralized DQ. You can do type casting, standardization, deduplication and enforcing domain specific business rules. You can Use CONSTRAINT ON VIOLATION DROP ROW to filter out malformed or untrusted records and use ON VIOLATION FAIL UPDATE when critical business rules fails. Enforcing quality rules in Silver ensures all downstream consumers query clean, trusted and standardized datasets without duplicating validation logic across pipelines.
Gold Layer Aggregation and Business Metrics
You can keep minimal expectations in Gold layer as Silver already has cleansed data. Avoid re-validating individual row-level schemas here. You can restrict checks to aggregation specific constraints, dimensional integrity such as key uniqueness and reporting threshold validations before data is exposed to BI tools.
Bronze ensures total replayability and auditability, Silver provides a single source of truth for validation rules, Gold remains performant and simple. Data lineage makes it straightforward to trace exactly where and why records were filtered.