
Declare an explicit PySpark schema for orders with exact decimal money, dates, a nested address struct and nullability, and apply it so bad rows are rejected at creation.
Fix a PySpark typing job that switched ANSI mode off: keep ANSI on, convert string columns with tolerant try_* casts and a per-row reject count, and let the strict cast, integer overflow and division by zero raise their ANSI errors.
Fix a customer null policy in PySpark: a null-safe not-equal filter that keeps customers with no region, defaults filled only in the defined columns, drops only when the defined columns are null, a first-non-null contact in priority order, and a sort that places nulls last.
Build a PySpark typing layer for raw customer orders: an explicit nested landing schema that rejects bad rows at creation, ANSI-safe tolerant and strict conversions with a per-order reject count and rejects summary, and a null policy of null-safe filtering, per-column defaults, a drop rule, a first-non-null contact and nulls-last sorting, with an exact decimal invoice total.