Is there an existing issue for this?
Problem statement
https://en.wikipedia.org/wiki/ISO_3166-2 is a widely used standard for encoding country subdivisions (states, provinces, regions), e.g. "US-CA" for California. Although we have is_in_list, using it for a list this size is tedious. The list is clearly defined so this check can be generated and reused directly.
Proposed Solution
Add a dedicated check validating a column against the ISO 3166-2 subdivision code list. Subdivision codes are scoped per country, so the check should account for that (e.g. optionally validating consistency against a country column) rather than treating the list as flat.
Additional Context
No response
Is there an existing issue for this?
Problem statement
https://en.wikipedia.org/wiki/ISO_3166-2 is a widely used standard for encoding country subdivisions (states, provinces, regions), e.g. "US-CA" for California. Although we have
is_in_list, using it for a list this size is tedious. The list is clearly defined so this check can be generated and reused directly.Proposed Solution
Add a dedicated check validating a column against the ISO 3166-2 subdivision code list. Subdivision codes are scoped per country, so the check should account for that (e.g. optionally validating consistency against a country column) rather than treating the list as flat.
Additional Context
No response