Thanks for sharing the issue you're facing with your DLT pipeline. You're trying to load validated data from a bronze table into a silver table using dlt.except_all("rules"), and route invalid data to a reject table.
In DLT, when using , _dlt.except_all("rules") _the dlt_valid column is generated but not always accessible in the silver layer for filtering. To fix this, use _.withColumn("dlt_valid", . . .) or _selectExpr("*", "dlt_valid") after applying expect_all. This ensures _dlt__valid is retained in the schema and usable for filtering or routing to reject tables.
If you have any further questions or need additional help, feel free to reach out. Have a great day!