1+ version : 2
2+
3+ models :
4+ - name : int_customer_location
5+ description : |
6+ Cleans and standardizes customer geographic information for downstream
7+ analytical models. This model resolves common data quality issues such as
8+ missing values, inconsistent capitalization, typographical errors in city
9+ names, invalid state abbreviations, malformed ZIP codes, and inconsistent
10+ country values. It provides a reliable and consistent customer location
11+ dimension for business reporting and analytics.
12+
13+ columns :
14+ - name : customer_id
15+ description : |
16+ Unique identifier for each customer. Used as the primary key for
17+ customer location records.
18+ tests :
19+ - not_null
20+ - unique
21+
22+ - name : address
23+ description : |
24+ Standardized customer street address. Missing or blank values are
25+ replaced with 'Unknown', while valid addresses are converted to
26+ Title Case and trimmed of leading and trailing whitespace.
27+ tests :
28+ - not_null
29+
30+ - name : city
31+ description : |
32+ Standardized customer city name. Common spelling mistakes are corrected,
33+ text is converted to Title Case, and missing or blank values are
34+ replaced with 'Unknown'.
35+ tests :
36+ - not_null
37+
38+ - name : state_abbr
39+ description : |
40+ Two-letter uppercase state abbreviation. Invalid, blank, null, or
41+ incorrectly formatted values are replaced with 'Unknown'.
42+ tests :
43+ - not_null
44+
45+ - name : state
46+ description : |
47+ Full state name for the customer's location. Leading and trailing
48+ whitespace is removed, and missing or blank values are replaced
49+ with 'Unknown'.
50+ tests :
51+ - not_null
52+
53+ - name : zip_code
54+ description : |
55+ Five-digit ZIP code. Invalid, non-numeric, null, or incorrectly
56+ formatted ZIP codes are replaced with 0.
57+ tests :
58+ - not_null
59+
60+ - name : country
61+ description : |
62+ Standardized country name. Multiple representations of the United
63+ States (USA, US, U.S.A., United States) are normalized to
64+ 'United States'. All other values are categorized as 'Unknown'.
65+ tests :
66+ - not_null
67+ - accepted_values :
68+ arguments :
69+ values : ['United States', 'Unknown']
70+
71+ - name : region
72+ description : |
73+ Customer geographic region. Missing or blank values are replaced
74+ with 'Unknown'.
75+ tests :
76+ - not_null
77+ - accepted_values :
78+ arguments :
79+ values : ['Midwest', 'Northeast', 'South', 'West']
0 commit comments