TPC-DS

We display the source tables from the data warehouses to model.

call_center (first 100 rows)

CC_CALL_CENTER_SK CC_CALL_CENTER_ID CC_REC_START_DATE CC_REC_END_DATE CC_CLOSED_DATE_SK CC_OPEN_DATE_SK CC_NAME CC_CLASS CC_EMPLOYEES CC_SQ_FT CC_HOURS CC_MANAGER CC_MKT_ID CC_MKT_CLASS CC_MKT_DESC CC_MARKET_MANAGER CC_DIVISION CC_DIVISION_NAME CC_COMPANY CC_COMPANY_NAME CC_STREET_NUMBER CC_STREET_NAME CC_STREET_TYPE CC_SUITE_NUMBER CC_CITY CC_COUNTY CC_STATE CC_ZIP CC_COUNTRY CC_GMT_OFFSET CC_TAX_PERCENTAGE
0 1 AAAAAAAABAAAAAAA 1998-01-01 None NaN 2450952 NY Metro large 2 1138 8AM-4PM Bob Belcher 6 More than other authori Shared others could not count fully dollars. New members ca Julius Tran 3 pri 6 cally 730 Ash Hill Boulevard Suite 0 Midway Williamson County TN 31904 United States -5 0.11
1 2 AAAAAAAACAAAAAAA 1998-01-01 2000-12-31 NaN 2450806 Mid Atlantic medium 6 2268 8AM-8AM Felipe Perkins 2 A bit narrow forms matter animals. Consist Largely blank years put substantially deaf, new others. Question Julius Durham 5 anti 1 ought 984 Center Hill Way Suite 70 Midway Williamson County TN 31904 United States -5 0.12

catalog_page (first 100 rows)

CP_CATALOG_PAGE_SK CP_CATALOG_PAGE_ID CP_START_DATE_SK CP_END_DATE_SK CP_DEPARTMENT CP_CATALOG_NUMBER CP_CATALOG_PAGE_NUMBER CP_DESCRIPTION CP_TYPE
0 1 AAAAAAAABAAAAAAA 2450815 2450996.0 DEPARTMENT 1 1.0 In general basic characters welcome. Clearly lively friends conv bi-annual
1 2 AAAAAAAACAAAAAAA 2450815 2450996.0 DEPARTMENT 1 2.0 English areas will leave prisoners. Too public countries ought to become beneath the years. bi-annual
2 3 AAAAAAAADAAAAAAA 2450815 2450996.0 DEPARTMENT 1 3.0 Times could not address disabled indians. Effectively public ports c bi-annual
3 4 AAAAAAAAEAAAAAAA 2450815 NaN None 1 NaN None bi-annual
4 5 AAAAAAAAFAAAAAAA 2450815 2450996.0 DEPARTMENT 1 5.0 Classic buildings ensure in a tests. Real years may not receive open systems. Now broad m bi-annual
5 6 AAAAAAAAGAAAAAAA 2450815 2450996.0 DEPARTMENT 1 6.0 Exciting principles wish greatly only excellent women. Appropriate fortunes shall not bi-annual
6 7 AAAAAAAAHAAAAAAA 2450815 2450996.0 DEPARTMENT 1 7.0 National services must not come at least into a girls bi-annual
7 8 AAAAAAAAIAAAAAAA 2450815 2450996.0 DEPARTMENT 1 8.0 Areas see early for a pounds. New goods study too serious women. Unwittingly sorry incentives shall bi-annual
8 9 AAAAAAAAJAAAAAAA 2450815 2450996.0 DEPARTMENT 1 9.0 Intensive, economic changes resist bloody of course simple economies; bi-annual
9 10 AAAAAAAAKAAAAAAA 2450815 2450996.0 DEPARTMENT 1 10.0 Careful, intense funds balance perhaps boys. Romantic chips remove legs. Direct birds get bi-annual
10 11 AAAAAAAALAAAAAAA 2450815 2450996.0 DEPARTMENT 1 11.0 At least national countries live by an sales. Weap bi-annual
11 12 AAAAAAAAMAAAAAAA 2450815 2450996.0 DEPARTMENT 1 12.0 Girls indicate so in a countries. Natural, emotional weeks try a bi-annual
12 13 AAAAAAAANAAAAAAA 2450815 2450996.0 DEPARTMENT 1 13.0 Miles see mainly clear hands. Villages finish there blue figures. Moreover wide students travel poo bi-annual
13 14 AAAAAAAAOAAAAAAA 2450815 2450996.0 DEPARTMENT 1 14.0 Rooms would say ago economic sections. Essential properties might not support groups. Ago rare eye bi-annual
14 15 AAAAAAAAPAAAAAAA 2450815 2450996.0 DEPARTMENT 1 15.0 Legal, required ends may not improve in the pictures. Really social structur bi-annual
15 16 AAAAAAAAABAAAAAA 2450815 2450996.0 DEPARTMENT 1 16.0 Schools must know now empty legs; generally daily children use sharp, loca bi-annual
16 17 AAAAAAAABBAAAAAA 2450815 2450996.0 DEPARTMENT 1 17.0 More than true carers can ensure at a officers. Candidates s bi-annual
17 18 AAAAAAAACBAAAAAA 2450815 2450996.0 DEPARTMENT 1 18.0 Shops end problems. Urban experiences play new stores. Institutions order as residential places. bi-annual
18 19 AAAAAAAADBAAAAAA 2450815 2450996.0 DEPARTMENT 1 19.0 Poor, hostile guidelines could hope alone early things. Secret, bi-annual
19 20 AAAAAAAAEBAAAAAA 2450815 2450996.0 DEPARTMENT 1 20.0 Appropriate years kill. Probably male units come perhaps between the minutes. bi-annual
20 21 AAAAAAAAFBAAAAAA 2450815 2450996.0 DEPARTMENT 1 21.0 Gentle fields understand forward high parental faciliti bi-annual
21 22 AAAAAAAAGBAAAAAA 2450815 2450996.0 DEPARTMENT 1 22.0 Square, good women can refuse. Women allow over courses. Entire, dail bi-annual
22 23 AAAAAAAAHBAAAAAA 2450815 2450996.0 DEPARTMENT 1 23.0 Level, ordinary names would change institutional principles. Fe bi-annual
23 24 AAAAAAAAIBAAAAAA 2450815 2450996.0 DEPARTMENT 1 24.0 For once public conditions could help even single, free vehicles. Soldi bi-annual
24 25 AAAAAAAAJBAAAAAA 2450815 2450996.0 DEPARTMENT 1 25.0 Dimensions ensure by a enquiries. Special times may practise much full, bad books; l bi-annual
25 26 AAAAAAAAKBAAAAAA 2450815 2450996.0 DEPARTMENT 1 26.0 Nervously reasonable sanctions would not supply often structures. National dangers relieve never bi-annual
26 27 AAAAAAAALBAAAAAA 2450815 2450996.0 DEPARTMENT 1 27.0 Ready restaurants can represent previously perfectly educational thanks; adjacent quantities t bi-annual
27 28 AAAAAAAAMBAAAAAA 2450815 2450996.0 DEPARTMENT 1 28.0 Also new funds must not find in addition essential poor friends; now bi-annual
28 29 AAAAAAAANBAAAAAA 2450815 2450996.0 DEPARTMENT 1 29.0 Small circumstances enter almost potentially spare individuals. Residential women launch bi-annual
29 30 AAAAAAAAOBAAAAAA 2450815 2450996.0 DEPARTMENT 1 30.0 Western, legislative courses cause truly else strange costs. Only grey windows come without a depo bi-annual
30 31 AAAAAAAAPBAAAAAA 2450815 2450996.0 DEPARTMENT 1 31.0 Differences would complete previously at a notes. Important bi-annual
31 32 AAAAAAAAACAAAAAA 2450815 2450996.0 DEPARTMENT 1 32.0 Quickly industrial trousers remember poor, practica bi-annual
32 33 AAAAAAAABCAAAAAA 2450815 2450996.0 DEPARTMENT 1 33.0 Here divine knees could not recall then before a meals. Resources use commercial, bi-annual
33 34 AAAAAAAACCAAAAAA 2450815 2450996.0 DEPARTMENT 1 34.0 Old, essential demonstrations watch absolutely; never woo bi-annual
34 35 AAAAAAAADCAAAAAA 2450815 2450996.0 DEPARTMENT 1 35.0 Simple blocks feel now whole police. Available meanings must shine clearly real, good departmen bi-annual
35 36 AAAAAAAAECAAAAAA 2450815 2450996.0 DEPARTMENT 1 36.0 Dead rats contain central, interesting years. Classes go. bi-annual
36 37 AAAAAAAAFCAAAAAA 2450815 2450996.0 DEPARTMENT 1 37.0 Approaches demonstrate requirements. Public views can need hard. Almost alone bi-annual
37 38 AAAAAAAAGCAAAAAA 2450815 2450996.0 DEPARTMENT 1 38.0 Ready perceptions close only with a conservatives. bi-annual
38 39 AAAAAAAAHCAAAAAA 2450815 2450996.0 DEPARTMENT 1 39.0 Vastly favorite systems may not imply manufacturing, new facilities. Eventually wo bi-annual
39 40 AAAAAAAAICAAAAAA 2450815 2450996.0 DEPARTMENT 1 40.0 Social, full questions learn already cautiously unemployed solicitors. Alone, close s bi-annual
40 41 AAAAAAAAJCAAAAAA 2450815 2450996.0 DEPARTMENT 1 41.0 True friends may not pay once at first good issues. Girls ought to grow t bi-annual
41 42 AAAAAAAAKCAAAAAA 2450815 2450996.0 DEPARTMENT 1 42.0 Fine animals may expect solidly. Highest extra vessels take here simila bi-annual
42 43 AAAAAAAALCAAAAAA 2450815 2450996.0 DEPARTMENT 1 43.0 Relatively darling limits must not forgive. Rural, dry folk h bi-annual
43 44 AAAAAAAAMCAAAAAA 2450815 2450996.0 DEPARTMENT 1 44.0 More likely movements shall identify badly other sensitive ideas. Fully other views could not bi-annual
44 45 AAAAAAAANCAAAAAA 2450815 2450996.0 DEPARTMENT 1 45.0 Full heads imply unfortunately good policies. However different periods will not avoid highly in bi-annual
45 46 AAAAAAAAOCAAAAAA 2450815 2450996.0 DEPARTMENT 1 46.0 Old beings used to raise. Curtains cannot enable just sites. Cells can say western talks; bi-annual
46 47 AAAAAAAAPCAAAAAA 2450815 2450996.0 DEPARTMENT 1 47.0 Dangerous, desirable relations might forget always free activities. Values ough bi-annual
47 48 AAAAAAAAADAAAAAA 2450815 2450996.0 DEPARTMENT 1 48.0 Moving, parliamentary women seal only glad, little damages. Electoral ways bi-annual
48 49 AAAAAAAABDAAAAAA 2450815 2450996.0 DEPARTMENT 1 49.0 Old, extensive months cannot write political numbers. Minor lips know as usual f bi-annual
49 50 AAAAAAAACDAAAAAA 2450815 2450996.0 DEPARTMENT 1 50.0 Now metropolitan prices survive institutions. Internal cheeks bi-annual
50 51 AAAAAAAADDAAAAAA 2450815 2450996.0 DEPARTMENT 1 51.0 Superior, pink men should plant also recent, very fears. Purposes see other men. Tough, particular bi-annual
51 52 AAAAAAAAEDAAAAAA 2450815 2450996.0 DEPARTMENT 1 52.0 Urban, large girls could go. Actions might guard about key ot bi-annual
52 53 AAAAAAAAFDAAAAAA 2450815 2450996.0 DEPARTMENT 1 53.0 Relevant, major backs fly just private findings. New workers must not keep l bi-annual
53 54 AAAAAAAAGDAAAAAA 2450815 2450996.0 DEPARTMENT 1 54.0 Rights should reassure as to a borders; difficult, efficient servants might no bi-annual
54 55 AAAAAAAAHDAAAAAA 2450815 2450996.0 DEPARTMENT 1 55.0 Male requirements can make. Catholic results load maybe common ba bi-annual
55 56 AAAAAAAAIDAAAAAA 2450815 2450996.0 DEPARTMENT 1 56.0 Men talk even like a days. Still large feelings see new, quick hotels. Far black relations should bi-annual
56 57 AAAAAAAAJDAAAAAA 2450815 2450996.0 DEPARTMENT 1 57.0 Expressly local horses shall undertake perhaps able, co bi-annual
57 58 AAAAAAAAKDAAAAAA 2450815 2450996.0 DEPARTMENT 1 58.0 Tasks work fun trees. Old employees make colonial, good signs. Famous emo bi-annual
58 59 AAAAAAAALDAAAAAA 2450815 2450996.0 DEPARTMENT 1 59.0 Free, like figures will not leave once similar, eas bi-annual
59 60 AAAAAAAAMDAAAAAA 2450815 2450996.0 DEPARTMENT 1 60.0 Teachers would choose always average investments. Unable, illegal sorts see. Shadows sha bi-annual
60 61 AAAAAAAANDAAAAAA 2450815 2450996.0 DEPARTMENT 1 61.0 Glad developments improve still unable, invisible communications. High processes ru bi-annual
61 62 AAAAAAAAODAAAAAA 2450815 2450996.0 DEPARTMENT 1 62.0 Indeed poor enemies change so to a hours. Either public circumstan bi-annual
62 63 AAAAAAAAPDAAAAAA 2450815 2450996.0 DEPARTMENT 1 63.0 Possible, general practitioners must mate in a companies. Small developments per bi-annual
63 64 AAAAAAAAAEAAAAAA 2450815 2450996.0 DEPARTMENT 1 64.0 New, other men would hear secret costs. Major lines might think. Modern hands shall bi-annual
64 65 AAAAAAAABEAAAAAA 2450815 2450996.0 DEPARTMENT 1 65.0 Otherwise vast titles could comprehend just, strong forms. Historic, european owners enha bi-annual
65 66 AAAAAAAACEAAAAAA 2450815 2450996.0 DEPARTMENT 1 66.0 Simple types stir oddly. More head depths could tak bi-annual
66 67 AAAAAAAADEAAAAAA 2450815 2450996.0 DEPARTMENT 1 67.0 Other developments shall not race in order objective wings. Nearby departments bi-annual
67 68 AAAAAAAAEEAAAAAA 2450815 2450996.0 DEPARTMENT 1 68.0 More big police cannot give important, difficult clients. Black, early vessels use bi-annual
68 69 AAAAAAAAFEAAAAAA 2450815 2450996.0 DEPARTMENT 1 69.0 More basic colleagues should shift; muscles make however legal authorities. bi-annual
69 70 AAAAAAAAGEAAAAAA 2450815 2450996.0 DEPARTMENT 1 70.0 Visual, major matters witness together so-called days. Obviously sharp men spend meanwhile els bi-annual
70 71 AAAAAAAAHEAAAAAA 2450815 2450996.0 DEPARTMENT 1 71.0 Numbers may create now concerned families. Machines must bi-annual
71 72 AAAAAAAAIEAAAAAA 2450815 2450996.0 DEPARTMENT 1 72.0 Sometimes lexical police shall affect women. Personal banks could not cost e bi-annual
72 73 AAAAAAAAJEAAAAAA 2450815 2450996.0 DEPARTMENT 1 73.0 Journalists develop civil, open methods. Very normal vehicles used t bi-annual
73 74 AAAAAAAAKEAAAAAA 2450815 2450996.0 DEPARTMENT 1 74.0 Cheap problems obtain national, new organisations. Certain, suitable words bi-annual
74 75 AAAAAAAALEAAAAAA 2450815 2450996.0 DEPARTMENT 1 75.0 Specifically russian plans must use neither grand shares. Harsh, french results increase bi-annual
75 76 AAAAAAAAMEAAAAAA 2450815 2450996.0 DEPARTMENT 1 76.0 Entirely normal thousands cannot rely just important ti bi-annual
76 77 AAAAAAAANEAAAAAA 2450815 2450996.0 DEPARTMENT 1 77.0 American years swallow only, nice thanks. Obvious materials might not discuss just. bi-annual
77 78 AAAAAAAAOEAAAAAA 2450815 2450996.0 DEPARTMENT 1 78.0 Intelligent buildings might not keep here new cases. Sole bi-annual
78 79 AAAAAAAAPEAAAAAA 2450815 2450996.0 DEPARTMENT 1 79.0 Complaints release views. Really internal interpretations used to make funny, important bi-annual
79 80 AAAAAAAAAFAAAAAA 2450815 2450996.0 DEPARTMENT 1 80.0 Words know difficult, lucky areas. Over red parts need extr bi-annual
80 81 AAAAAAAABFAAAAAA 2450815 2450996.0 DEPARTMENT 1 81.0 Vital findings come more about convincing firms. Hor bi-annual
81 82 AAAAAAAACFAAAAAA 2450815 2450996.0 DEPARTMENT 1 82.0 Colonial interests reach also. Results will not pursue seconds. Labour other bi-annual
82 83 AAAAAAAADFAAAAAA 2450815 2450996.0 DEPARTMENT 1 83.0 In order compatible schools float particular families. Briefly strong words used bi-annual
83 84 AAAAAAAAEFAAAAAA 2450815 2450996.0 DEPARTMENT 1 84.0 Industrial cars exist workers. Dependent pages should consider straig bi-annual
84 85 AAAAAAAAFFAAAAAA 2450815 2450996.0 DEPARTMENT 1 85.0 Minutes ought to keep marginal states. New, financial nurses become later. Legally engl bi-annual
85 86 AAAAAAAAGFAAAAAA 2450815 2450996.0 DEPARTMENT 1 86.0 Talks draw totally manufacturers. Lines evolve very; conditions see mi bi-annual
86 87 AAAAAAAAHFAAAAAA 2450815 2450996.0 DEPARTMENT 1 87.0 Away dramatic letters say slightly for a advisers. Severe, difficult points entail h bi-annual
87 88 AAAAAAAAIFAAAAAA 2450815 2450996.0 DEPARTMENT 1 88.0 Particular projects involve always final lakes. Subjects must move bi-annual
88 89 AAAAAAAAJFAAAAAA 2450815 2450996.0 DEPARTMENT 1 89.0 More responsible bands pursue then including a tasks; extremely traditional numbe bi-annual
89 90 AAAAAAAAKFAAAAAA 2450815 2450996.0 DEPARTMENT 1 90.0 Enough real studies should not appear weekends. Rich, bi-annual
90 91 AAAAAAAALFAAAAAA 2450815 2450996.0 DEPARTMENT 1 91.0 Safe prices grow there enough private boys. Priorities come eventually forces. Regi bi-annual
91 92 AAAAAAAAMFAAAAAA 2450815 2450996.0 DEPARTMENT 1 92.0 Years can know. Available, dead degrees may begin ever. Docto bi-annual
92 93 AAAAAAAANFAAAAAA 2450815 2450996.0 DEPARTMENT 1 93.0 Perfectly mild differences must visit deaf years. Attractive, interesting women might not tie to t bi-annual
93 94 AAAAAAAAOFAAAAAA 2450815 2450996.0 DEPARTMENT 1 94.0 Equal, other calls maintain simply. Newspapers cannot touch f bi-annual
94 95 AAAAAAAAPFAAAAAA 2450815 2450996.0 DEPARTMENT 1 95.0 Bonds include completely critical principles. Charges walk just forms. Subsequent, ti bi-annual
95 96 AAAAAAAAAGAAAAAA 2450815 2450996.0 DEPARTMENT 1 96.0 Then other details will stop nuclear officers. Capital expenses carve far options. Stru bi-annual
96 97 AAAAAAAABGAAAAAA 2450815 2450996.0 DEPARTMENT 1 97.0 Trees help far also ideal debts. Old, outstanding forces bi-annual
97 98 AAAAAAAACGAAAAAA 2450815 2450996.0 DEPARTMENT 1 98.0 Still fine services would surrender urban results; mean, serious considerations may say bi-annual
98 99 AAAAAAAADGAAAAAA 2450815 2450996.0 DEPARTMENT 1 99.0 Useful, white courts leave almost high fingers. Popular, basic words plan bi-annual

catalog_returns (first 100 rows)

CR_RETURNED_DATE_SK CR_RETURNED_TIME_SK CR_ITEM_SK CR_REFUNDED_CUSTOMER_SK CR_REFUNDED_CDEMO_SK CR_REFUNDED_HDEMO_SK CR_REFUNDED_ADDR_SK CR_RETURNING_CUSTOMER_SK CR_RETURNING_CDEMO_SK CR_RETURNING_HDEMO_SK CR_RETURNING_ADDR_SK CR_CALL_CENTER_SK CR_CATALOG_PAGE_SK CR_SHIP_MODE_SK CR_WAREHOUSE_SK CR_REASON_SK CR_ORDER_NUMBER CR_RETURN_QUANTITY CR_RETURN_AMOUNT CR_RETURN_TAX CR_RETURN_AMT_INC_TAX CR_FEE CR_RETURN_SHIP_COST CR_REFUNDED_CASH CR_REVERSED_CHARGE CR_STORE_CREDIT CR_NET_LOSS
0 2450926 45816 952 601 797995.0 6189.0 583.0 601.0 797995.0 4703.0 583.0 2.0 106 2.0 1.0 1.0 2 47 3888.31 233.29 4121.60 91.23 1348.90 3577.24 186.64 124.43 1673.42
1 2450946 74710 404 601 797995.0 6189.0 583.0 809.0 665550.0 991.0 832.0 2.0 17 2.0 1.0 1.0 2 49 2490.18 99.60 2589.78 52.54 1867.39 323.72 931.57 1234.89 2019.53
2 2451065 71104 1820 383 3755.0 2480.0 652.0 311.0 700704.0 5571.0 485.0 2.0 7 13.0 1.0 1.0 4 12 64.32 4.50 68.82 22.97 78.60 1.28 55.47 7.57 106.07
3 2450955 28638 988 801 90299.0 3797.0 495.0 681.0 1168758.0 7154.0 197.0 1.0 9 12.0 1.0 1.0 5 20 829.40 49.76 879.16 60.00 308.00 622.05 176.24 31.11 417.76
4 2451024 44538 1783 351 528859.0 5567.0 122.0 27.0 737861.0 54.0 647.0 1.0 78 12.0 1.0 1.0 6 6 403.08 36.27 439.35 4.58 199.44 354.71 27.57 20.80 240.29
5 2450993 10904 374 351 528859.0 5567.0 122.0 8.0 1289384.0 1410.0 436.0 1.0 54 7.0 1.0 1.0 6 7 23.17 1.85 25.02 19.85 7.07 6.25 9.64 7.28 28.77
6 2451018 60162 1844 674 NaN NaN NaN 994.0 NaN NaN 335.0 NaN 2 NaN NaN NaN 9 3 413.94 0.00 NaN NaN NaN 318.73 35.22 59.99 185.36
7 2450929 30343 721 731 1046123.0 5715.0 107.0 927.0 865466.0 4658.0 697.0 2.0 65 14.0 1.0 1.0 11 17 1283.67 51.34 1335.01 71.97 58.31 449.28 183.56 650.83 181.62
8 2451061 53881 1094 731 1046123.0 5715.0 107.0 53.0 1827904.0 2936.0 968.0 2.0 42 11.0 1.0 1.0 11 9 29.79 1.19 30.98 91.16 59.67 0.00 20.85 8.94 152.02
9 2451042 11891 835 748 83584.0 2773.0 362.0 188.0 1816862.0 2974.0 286.0 1.0 11 2.0 1.0 1.0 12 61 2119.75 84.79 2204.54 30.32 271.45 1441.43 529.08 149.24 386.56
10 2451038 37877 1760 22 1502404.0 6833.0 662.0 294.0 1764552.0 4145.0 491.0 2.0 18 3.0 1.0 1.0 13 27 54.81 0.00 54.81 7.04 146.07 12.05 40.19 2.57 153.11
11 2450870 64669 370 22 1502404.0 6833.0 662.0 573.0 1482438.0 6726.0 614.0 2.0 43 18.0 1.0 1.0 13 18 100.44 5.02 105.46 70.47 196.92 9.03 82.26 9.15 272.41
12 2450956 64639 110 957 189998.0 3839.0 327.0 61.0 1639056.0 2195.0 287.0 2.0 56 17.0 1.0 1.0 16 40 407.60 32.60 440.20 2.01 296.40 362.76 19.72 25.12 331.01
13 2450944 15515 1762 957 189998.0 3839.0 327.0 292.0 1218513.0 1645.0 377.0 2.0 75 13.0 1.0 1.0 16 44 2157.76 43.15 2200.91 46.29 1280.84 1834.09 51.78 271.89 1370.28
14 2450991 44014 1582 3 599432.0 3708.0 937.0 895.0 1075366.0 3615.0 511.0 1.0 9 12.0 1.0 1.0 18 10 339.60 30.56 370.16 25.06 157.70 196.96 45.64 97.00 213.32
15 2451002 16008 1045 3 599432.0 3708.0 937.0 809.0 452924.0 4311.0 451.0 1.0 33 5.0 1.0 1.0 18 44 2618.44 235.65 2854.09 83.74 5117.64 968.82 65.98 1583.64 5437.03
16 2450989 38620 916 389 27132.0 4828.0 171.0 287.0 326203.0 512.0 421.0 2.0 100 8.0 1.0 1.0 19 44 6201.80 186.05 6387.85 29.08 1162.48 5891.71 173.65 136.44 1377.61
17 2451073 22065 722 751 1766792.0 2633.0 674.0 993.0 517281.0 2882.0 283.0 2.0 100 6.0 1.0 1.0 21 50 1654.00 82.70 1736.70 83.07 1034.00 1223.96 391.33 38.71 1199.77
18 2450986 71718 1936 242 541252.0 6015.0 978.0 550.0 640677.0 6379.0 728.0 1.0 30 14.0 1.0 1.0 22 3 12.87 0.90 13.77 84.18 124.62 0.90 9.45 2.52 209.70
19 2451003 73516 1738 242 541252.0 6015.0 978.0 346.0 125760.0 4274.0 988.0 1.0 45 3.0 1.0 1.0 22 30 2822.70 28.22 2850.92 25.25 1266.60 1072.62 122.50 1627.58 1320.07
20 2450869 71183 1430 242 541252.0 6015.0 978.0 328.0 1893150.0 6361.0 172.0 1.0 21 18.0 1.0 1.0 22 2 64.64 5.17 69.81 66.56 77.08 1.93 52.04 10.67 148.81
21 2450918 10436 992 703 600082.0 6661.0 87.0 371.0 178127.0 666.0 805.0 1.0 73 9.0 1.0 1.0 23 8 85.92 1.71 87.63 0.94 50.00 65.29 13.61 7.02 52.65
22 2451063 64648 200 764 1379528.0 6492.0 56.0 473.0 487719.0 1868.0 817.0 1.0 61 11.0 1.0 1.0 26 17 1603.95 128.31 1732.26 92.88 1262.08 914.25 517.27 172.43 1483.27
23 2450908 35973 1171 42 643025.0 4008.0 791.0 519.0 445572.0 6601.0 383.0 1.0 52 3.0 1.0 1.0 28 43 793.35 63.46 856.81 97.48 582.65 476.01 193.57 123.77 743.59
24 2451074 54503 1549 262 511666.0 7070.0 274.0 422.0 1020642.0 2223.0 357.0 2.0 82 13.0 1.0 1.0 31 28 1098.16 98.83 1196.99 51.07 299.32 680.85 208.65 208.66 449.22
25 2450993 7690 343 388 174162.0 3089.0 663.0 393.0 1678181.0 4527.0 73.0 1.0 22 5.0 1.0 1.0 32 13 419.25 37.73 456.98 27.33 259.87 234.78 184.47 0.00 324.93
26 2450906 74103 805 486 1309701.0 1516.0 378.0 488.0 1596473.0 703.0 286.0 1.0 35 9.0 1.0 1.0 33 1 7.80 0.31 8.11 57.79 7.22 3.51 2.35 1.94 65.32
27 2450983 83387 832 919 717893.0 914.0 888.0 899.0 733587.0 4279.0 571.0 2.0 54 7.0 1.0 1.0 35 32 5100.48 306.02 5406.50 83.98 377.60 5100.48 0.00 0.00 767.60
28 2450938 36423 946 988 467550.0 5112.0 321.0 221.0 1235634.0 3167.0 500.0 2.0 86 19.0 1.0 1.0 36 2 88.24 0.88 89.12 6.73 33.22 1.76 78.69 7.79 40.83
29 2450977 47666 1072 988 467550.0 5112.0 321.0 75.0 1897118.0 4028.0 538.0 2.0 52 1.0 1.0 1.0 36 69 1440.72 100.85 1541.57 2.22 0.00 720.36 36.01 684.35 103.07
30 2450963 75037 640 817 785079.0 1788.0 250.0 849.0 3803.0 6272.0 388.0 2.0 7 9.0 1.0 1.0 37 14 377.58 30.20 407.78 95.44 684.32 332.27 19.93 25.38 809.96
31 2450887 20595 560 61 1286495.0 4976.0 457.0 250.0 349487.0 5628.0 816.0 2.0 103 13.0 1.0 1.0 38 68 9568.28 669.77 10238.05 71.11 2192.32 2105.02 3433.09 4030.17 2933.20
32 2451012 37487 1036 898 1785329.0 2560.0 991.0 876.0 1456966.0 2056.0 99.0 2.0 26 15.0 1.0 1.0 39 39 4710.03 0.00 4710.03 53.59 2302.56 3815.12 635.38 259.53 2356.15
33 2450965 37170 1522 283 157402.0 4874.0 146.0 523.0 1865664.0 3345.0 426.0 1.0 74 9.0 1.0 1.0 40 40 1108.40 55.42 1163.82 77.46 408.80 1030.81 76.03 1.56 541.68
34 2450975 65871 1309 159 1915909.0 7059.0 962.0 338.0 488417.0 5969.0 168.0 2.0 72 11.0 1.0 1.0 42 10 815.70 65.25 880.95 24.41 674.50 40.78 23.24 751.68 764.16
35 2451040 77649 1220 183 1623252.0 3721.0 390.0 385.0 187670.0 4723.0 129.0 1.0 58 8.0 1.0 1.0 44 16 405.60 16.22 421.82 22.13 89.44 324.48 55.16 25.96 127.79
36 2450946 31349 1612 183 1623252.0 3721.0 390.0 971.0 1481620.0 29.0 38.0 1.0 108 11.0 1.0 1.0 44 20 1854.60 37.09 1891.69 51.41 927.20 1075.66 646.52 132.42 1015.70
37 2451061 54565 1400 305 527683.0 6708.0 486.0 217.0 252890.0 3009.0 728.0 2.0 98 18.0 1.0 1.0 45 1 9.89 0.09 9.98 5.19 16.60 5.43 2.14 2.32 21.88
38 2450858 74844 361 305 527683.0 6708.0 486.0 422.0 1717248.0 6779.0 510.0 2.0 27 10.0 1.0 1.0 45 38 1472.50 103.07 1575.57 84.52 17.10 265.05 386.38 821.07 204.69
39 2450949 54638 1717 871 830328.0 6585.0 842.0 7.0 853051.0 4346.0 994.0 2.0 78 12.0 1.0 1.0 46 50 1329.50 79.77 1409.27 30.45 52.00 1076.89 166.72 85.89 162.22
40 2450967 36814 1820 871 830328.0 6585.0 842.0 246.0 1490672.0 3850.0 581.0 2.0 36 8.0 1.0 1.0 46 70 6902.00 207.06 7109.06 42.78 1401.40 5107.48 1740.68 53.84 1651.24
41 2451006 18610 1837 722 553976.0 3877.0 331.0 648.0 1555212.0 401.0 143.0 2.0 74 10.0 1.0 1.0 47 49 3888.64 0.00 3888.64 43.74 3295.74 2605.38 667.29 615.97 3339.48
42 2450968 52092 166 375 1166269.0 3010.0 504.0 422.0 1491876.0 7131.0 339.0 1.0 43 10.0 1.0 1.0 48 10 892.10 26.76 918.86 75.24 1040.80 811.81 72.26 8.03 1142.80
43 2450993 56863 1405 786 196899.0 2059.0 219.0 658.0 678147.0 7063.0 932.0 1.0 53 13.0 1.0 1.0 52 14 288.82 5.77 294.59 84.41 151.76 66.42 204.60 17.80 241.94
44 2451038 23109 829 786 196899.0 2059.0 219.0 627.0 1013398.0 1201.0 404.0 1.0 84 7.0 1.0 1.0 52 33 292.05 5.84 297.89 69.38 15.18 122.66 64.36 105.03 90.40
45 2450927 46513 1322 643 1592501.0 4159.0 664.0 188.0 1308684.0 1449.0 567.0 2.0 11 2.0 1.0 1.0 55 1 21.25 0.85 22.10 94.74 2.39 17.21 0.20 3.84 97.98
46 2450983 71731 1214 127 1346606.0 6038.0 270.0 897.0 1493518.0 3358.0 445.0 2.0 92 12.0 1.0 1.0 56 4 6.04 0.06 6.10 23.32 260.68 2.53 0.42 3.09 284.06
47 2450944 44105 410 732 677128.0 5571.0 567.0 757.0 1779943.0 862.0 28.0 1.0 34 5.0 1.0 1.0 57 34 3039.60 60.79 3100.39 61.21 719.78 1215.84 291.80 1531.96 841.78
48 2450943 15203 818 732 677128.0 5571.0 567.0 948.0 89333.0 5045.0 957.0 1.0 85 6.0 1.0 1.0 57 21 82.95 4.14 87.09 57.08 62.16 47.28 15.33 20.34 123.38
49 2451039 45152 1687 940 1030863.0 6139.0 62.0 177.0 42517.0 4863.0 762.0 1.0 92 20.0 1.0 1.0 58 37 509.86 0.00 509.86 78.85 963.11 163.15 41.60 305.11 1041.96
50 2450909 69632 1342 363 683276.0 4942.0 55.0 719.0 1594118.0 4137.0 203.0 1.0 30 20.0 1.0 1.0 62 14 346.64 10.39 357.03 95.78 186.20 336.24 6.13 4.27 292.37
51 2451044 37030 520 363 683276.0 4942.0 55.0 393.0 1322943.0 2774.0 452.0 1.0 47 19.0 1.0 1.0 62 11 126.94 0.00 126.94 71.55 112.75 49.50 56.53 20.91 184.30
52 2450919 69296 631 363 683276.0 4942.0 55.0 799.0 1828157.0 6005.0 453.0 1.0 44 3.0 1.0 1.0 62 33 218.79 17.50 236.29 23.13 464.64 94.07 115.98 8.74 505.27
53 2450863 46270 1735 758 1148029.0 2853.0 124.0 919.0 1126300.0 3007.0 314.0 1.0 5 2.0 1.0 1.0 63 54 2701.08 162.06 2863.14 3.08 2132.46 594.23 1896.16 210.69 2297.60
54 2450986 37706 1928 758 1148029.0 2853.0 124.0 122.0 1718117.0 3509.0 748.0 1.0 105 5.0 1.0 1.0 63 8 171.20 6.84 178.04 83.12 29.52 20.54 58.75 91.91 119.48
55 2450987 42160 680 621 1225267.0 960.0 53.0 750.0 1014769.0 971.0 373.0 2.0 93 19.0 1.0 1.0 64 11 434.17 26.05 460.22 55.21 248.05 347.33 86.84 0.00 329.31
56 2450925 54924 1316 336 785982.0 3228.0 874.0 856.0 1134477.0 4252.0 980.0 2.0 78 18.0 1.0 1.0 66 3 181.65 9.08 190.73 98.27 0.00 56.31 82.72 42.62 107.35
57 2450936 19990 1736 336 785982.0 3228.0 874.0 131.0 1110002.0 2615.0 75.0 2.0 64 8.0 1.0 1.0 66 23 458.85 36.70 495.55 35.46 305.90 293.66 165.19 0.00 378.06
58 2450920 68157 727 214 1227752.0 1090.0 181.0 436.0 1862046.0 4849.0 205.0 2.0 102 13.0 1.0 1.0 67 42 7.14 0.57 7.71 30.38 3.78 2.07 1.41 3.66 34.73
59 2450949 17521 596 214 1227752.0 1090.0 181.0 304.0 1378959.0 4311.0 910.0 2.0 63 13.0 1.0 1.0 67 39 721.11 64.89 786.00 45.74 484.38 7.21 35.69 678.21 595.01
60 2451014 60949 1262 214 1227752.0 1090.0 181.0 612.0 1195468.0 3695.0 522.0 2.0 17 10.0 1.0 1.0 67 28 182.00 12.74 194.74 11.87 49.28 127.40 3.27 51.33 73.89
61 2450909 27281 394 907 163011.0 3515.0 819.0 807.0 15782.0 1929.0 629.0 1.0 79 3.0 1.0 1.0 68 14 732.90 0.00 732.90 24.07 586.32 622.96 107.74 2.20 610.39
62 2451035 72342 1262 376 1694169.0 6315.0 708.0 985.0 398527.0 5033.0 92.0 2.0 42 10.0 1.0 1.0 71 18 547.02 38.29 585.31 58.57 40.14 54.70 443.08 49.24 137.00
63 2450991 20519 1159 24 589162.0 653.0 144.0 744.0 1117994.0 786.0 531.0 1.0 1 13.0 1.0 1.0 73 64 2634.24 210.73 2844.97 91.85 1114.24 2370.81 134.34 129.09 1416.82
64 2450942 86370 1520 448 1738817.0 4139.0 661.0 880.0 698232.0 4263.0 494.0 1.0 48 14.0 1.0 1.0 74 5 125.20 10.01 135.21 23.50 262.90 1.25 97.92 26.03 296.41
65 2450940 4395 1016 543 1096330.0 7070.0 457.0 572.0 900814.0 578.0 542.0 1.0 76 7.0 1.0 1.0 75 3 101.04 4.04 105.08 46.13 74.91 83.86 6.35 10.83 125.08
66 2450987 60432 1813 543 1096330.0 7070.0 457.0 637.0 1169478.0 2888.0 651.0 1.0 48 14.0 1.0 1.0 75 2 117.34 9.38 126.72 89.84 50.88 28.16 8.91 80.27 150.10
67 2450915 43293 274 674 1087861.0 448.0 635.0 74.0 1540251.0 1673.0 448.0 2.0 80 20.0 1.0 1.0 77 3 20.61 0.82 21.43 44.76 18.42 18.34 1.43 0.84 64.00
68 2450970 82263 1345 674 NaN NaN 635.0 NaN NaN 6513.0 NaN 2.0 89 NaN NaN 1.0 77 10 839.90 50.39 NaN NaN 425.70 NaN NaN 196.55 NaN
69 2450926 62016 187 674 1087861.0 448.0 635.0 247.0 1603603.0 380.0 757.0 2.0 39 15.0 1.0 1.0 77 36 197.28 9.86 207.14 39.53 146.52 71.02 47.97 78.29 195.91
70 2450958 34973 278 641 1516877.0 960.0 596.0 8.0 1059029.0 5992.0 108.0 1.0 44 3.0 1.0 1.0 80 40 3567.60 0.00 3567.60 96.68 2583.60 3103.81 398.85 64.94 2680.28
71 2450899 73899 1528 641 1516877.0 960.0 596.0 63.0 1206262.0 2807.0 752.0 1.0 63 7.0 1.0 1.0 80 52 2883.40 0.00 2883.40 55.61 1086.80 634.34 787.17 1461.89 1142.41
72 2450957 54159 218 942 1441792.0 4242.0 139.0 208.0 109514.0 3643.0 619.0 1.0 32 13.0 1.0 1.0 83 2 129.04 5.16 134.20 98.47 52.36 43.87 44.28 40.89 155.99
73 2451018 34791 1402 942 1441792.0 4242.0 139.0 137.0 1385649.0 6797.0 192.0 1.0 97 3.0 1.0 1.0 83 12 406.92 28.48 435.40 81.31 197.64 236.01 111.09 59.82 307.43
74 2451002 51666 1346 224 47350.0 5629.0 508.0 515.0 274687.0 2921.0 755.0 1.0 55 4.0 1.0 1.0 86 17 1077.29 43.09 1120.38 11.03 1179.97 441.68 603.82 31.79 1234.09
75 2450889 82535 1094 224 47350.0 5629.0 508.0 133.0 1494396.0 7123.0 403.0 1.0 25 17.0 1.0 1.0 86 70 5176.50 207.06 5383.56 45.50 1293.60 5072.97 92.14 11.39 1546.16
76 2451005 76680 862 224 47350.0 5629.0 508.0 617.0 398869.0 6573.0 277.0 1.0 16 2.0 1.0 1.0 86 4 623.60 24.94 648.54 12.61 95.24 56.12 380.21 187.27 132.79
77 2451050 73402 871 977 1492959.0 5894.0 829.0 464.0 1002026.0 1035.0 997.0 2.0 67 17.0 1.0 1.0 89 15 763.80 0.00 763.80 4.63 361.80 114.57 253.19 396.04 366.43
78 2450979 48909 181 24 552511.0 1551.0 838.0 912.0 1698770.0 416.0 462.0 2.0 84 7.0 1.0 1.0 92 72 5989.68 539.07 6528.75 69.34 5682.24 1497.42 4402.41 89.85 6290.65
79 2450851 76961 1850 24 552511.0 1551.0 838.0 397.0 1886218.0 6642.0 219.0 2.0 81 17.0 1.0 1.0 92 3 159.63 7.98 167.61 75.26 32.46 0.00 1.59 158.04 115.70
80 2451054 38828 128 204 1098811.0 5665.0 872.0 204.0 1098811.0 1191.0 872.0 1.0 77 10.0 1.0 1.0 93 11 648.56 38.91 687.47 70.54 108.02 142.68 318.70 187.18 217.47
81 2451058 40911 494 93 1871653.0 1166.0 126.0 834.0 469308.0 147.0 633.0 1.0 13 11.0 1.0 1.0 95 54 3159.00 31.59 3190.59 1.50 519.48 1200.42 1468.93 489.65 552.57
82 2451007 31416 220 951 1504890.0 3382.0 721.0 951.0 1504890.0 429.0 721.0 1.0 107 11.0 1.0 1.0 97 33 0.00 0.00 0.00 83.44 2611.62 0.00 0.00 0.00 2695.06
83 2451026 61592 806 659 400535.0 811.0 887.0 768.0 714707.0 1762.0 417.0 2.0 197 15.0 1.0 1.0 99 15 91.65 2.74 94.39 68.20 40.80 52.24 24.82 14.59 111.74
84 2450909 69684 1448 659 400535.0 811.0 887.0 553.0 1079964.0 6880.0 596.0 2.0 91 4.0 1.0 1.0 99 26 48.10 1.44 49.54 6.32 214.24 23.56 1.47 23.07 222.00
85 2451012 48520 559 651 896753.0 655.0 357.0 147.0 609116.0 985.0 701.0 1.0 10 15.0 1.0 1.0 100 13 352.69 14.10 366.79 52.43 4.29 193.97 80.94 77.78 70.82
86 2450963 36885 1784 623 351944.0 218.0 139.0 172.0 1026902.0 1465.0 75.0 2.0 36 11.0 1.0 1.0 101 21 119.49 0.00 119.49 72.97 2033.01 46.60 69.24 3.65 2105.98
87 2451018 3015 476 623 351944.0 218.0 139.0 469.0 1395145.0 4004.0 216.0 2.0 162 12.0 1.0 1.0 101 10 290.10 17.40 307.50 90.31 77.30 168.25 52.39 69.46 185.01
88 2450973 66374 820 410 698752.0 4094.0 836.0 924.0 615789.0 900.0 164.0 1.0 33 10.0 1.0 1.0 102 33 1898.82 151.90 2050.72 94.21 976.47 1253.22 464.83 180.77 1222.58
89 2450923 4412 440 410 698752.0 4094.0 836.0 410.0 698752.0 881.0 836.0 1.0 26 14.0 1.0 1.0 102 1 10.39 0.41 10.80 49.12 14.84 10.39 0.00 0.00 64.37
90 2450868 29430 1369 111 1835190.0 5916.0 195.0 957.0 1480884.0 1910.0 936.0 1.0 214 14.0 1.0 1.0 103 9 61.11 3.66 64.77 74.43 48.87 8.55 33.63 18.93 126.96
91 2450921 62646 316 648 421422.0 6643.0 217.0 102.0 175256.0 5750.0 44.0 1.0 84 6.0 1.0 1.0 104 26 70.46 4.22 74.68 4.70 264.94 56.36 2.96 11.14 273.86
92 2450908 36699 502 648 421422.0 6643.0 217.0 261.0 1383491.0 1012.0 133.0 1.0 20 9.0 1.0 1.0 104 5 5.30 0.05 5.35 39.83 39.80 4.45 0.84 0.01 79.68
93 2450930 23430 1810 7 621140.0 4826.0 959.0 210.0 248712.0 4060.0 808.0 2.0 24 12.0 1.0 1.0 105 12 1153.32 92.26 1245.58 89.75 29.52 542.06 48.90 562.36 211.53
94 2450886 77970 1258 481 663720.0 3159.0 551.0 438.0 519045.0 5508.0 171.0 2.0 21 20.0 1.0 1.0 107 21 1340.22 26.80 1367.02 64.34 1235.01 1018.56 192.99 128.67 1326.15
95 2450979 59967 766 770 285795.0 5220.0 645.0 902.0 92062.0 5189.0 916.0 2.0 18 17.0 1.0 1.0 108 42 776.16 69.85 846.01 58.69 161.70 69.85 289.58 416.73 290.24
96 2450989 73597 1160 615 947475.0 288.0 148.0 782.0 17546.0 4351.0 709.0 2.0 111 10.0 1.0 1.0 109 35 6849.15 273.96 7123.11 21.77 3311.70 4040.99 673.95 2134.21 3607.43
97 2450922 72030 802 450 1173022.0 2394.0 366.0 518.0 458253.0 950.0 847.0 2.0 51 18.0 1.0 1.0 110 50 403.00 32.24 435.24 81.15 76.00 120.90 104.37 177.73 189.39
98 2450979 71329 289 450 1173022.0 2394.0 366.0 518.0 1494517.0 158.0 199.0 2.0 166 2.0 1.0 1.0 110 11 840.40 58.82 899.22 69.08 336.16 344.56 476.00 19.84 464.06

catalog_sales (first 100 rows)

CS_SOLD_DATE_SK CS_SOLD_TIME_SK CS_SHIP_DATE_SK CS_BILL_CUSTOMER_SK CS_BILL_CDEMO_SK CS_BILL_HDEMO_SK CS_BILL_ADDR_SK CS_SHIP_CUSTOMER_SK CS_SHIP_CDEMO_SK CS_SHIP_HDEMO_SK CS_SHIP_ADDR_SK CS_CALL_CENTER_SK CS_CATALOG_PAGE_SK CS_SHIP_MODE_SK CS_WAREHOUSE_SK CS_ITEM_SK CS_PROMO_SK CS_ORDER_NUMBER CS_QUANTITY CS_WHOLESALE_COST CS_LIST_PRICE CS_SALES_PRICE CS_EXT_DISCOUNT_AMT CS_EXT_SALES_PRICE CS_EXT_WHOLESALE_COST CS_EXT_LIST_PRICE CS_EXT_TAX CS_COUPON_AMT CS_EXT_SHIP_COST CS_NET_PAID CS_NET_PAID_INC_TAX CS_NET_PAID_INC_SHIP CS_NET_PAID_INC_SHIP_TAX CS_NET_PROFIT
0 2450815.0 38212.0 2450886 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 62.0 3.0 1.0 1286 1 1 47 27.70 44.32 42.99 62.51 2020.53 1301.90 2083.04 101.02 0.00 1041.52 2020.53 2121.55 3062.05 3163.07 718.63
1 2450815.0 38212.0 2450846 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 31.0 8.0 1.0 476 3 1 20 87.55 260.89 153.92 2139.40 3078.40 1751.00 5217.80 71.41 1292.92 1356.60 1785.48 1856.89 3142.08 3213.49 34.48
2 2450815.0 38212.0 2450868 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 76.0 2.0 1.0 1558 1 1 19 69.86 88.72 29.27 1129.55 556.13 1327.34 1685.68 33.36 0.00 168.53 556.13 589.49 724.66 758.02 -771.21
3 2450815.0 38212.0 2450851 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 89.0 15.0 1.0 961 2 1 50 70.00 205.10 188.69 820.50 9434.50 3500.00 10255.00 377.38 0.00 4307.00 9434.50 9811.88 13741.50 14118.88 5934.50
4 2450815.0 29485.0 2450904 601.0 797995 6189.0 583 601.0 797995 6189 583 2 64.0 18.0 1.0 115 2 2 56 67.54 166.82 18.35 8314.32 1027.60 3782.24 9341.92 0.00 0.00 3736.32 1027.60 1027.60 4763.92 4763.92 -2754.64
5 2450815.0 29485.0 2450890 601.0 797995 6189.0 583 601.0 797995 6189 583 2 75.0 8.0 1.0 110 2 2 88 20.08 60.03 20.41 3486.56 1796.08 1767.04 5282.64 13.82 1598.51 1056.00 197.57 211.39 1253.57 1267.39 -1569.47
6 2450815.0 29485.0 2450849 601.0 797995 6189.0 583 601.0 797995 6189 583 2 39.0 4.0 1.0 146 3 2 31 40.88 51.91 6.22 1416.39 192.82 1267.28 1609.21 11.56 0.00 321.78 192.82 204.38 514.60 526.16 -1074.46
7 2450815.0 29485.0 2450889 601.0 797995 6189.0 583 601.0 797995 6189 583 2 49.0 8.0 1.0 1744 3 2 100 49.56 137.77 5.51 13226.00 551.00 4956.00 13777.00 0.00 0.00 3306.00 551.00 551.00 3857.00 3857.00 -4405.00
8 2450815.0 29485.0 2450868 601.0 797995 6189.0 583 601.0 797995 6189 583 2 69.0 17.0 1.0 236 3 2 30 72.82 88.84 71.07 533.10 2132.10 2184.60 2665.20 21.32 0.00 133.20 2132.10 2153.42 2265.30 2286.62 -52.50
9 2450815.0 29485.0 2450831 601.0 797995 6189.0 583 601.0 797995 6189 583 2 64.0 1.0 1.0 482 1 2 40 94.56 277.06 2.77 10971.60 110.80 3782.40 11082.40 2.21 0.00 664.80 110.80 113.01 775.60 777.81 -3671.60
10 2450815.0 29485.0 2450839 601.0 797995 6189.0 583 601.0 797995 6189 583 2 108.0 8.0 1.0 646 2 2 40 25.96 54.51 15.80 1548.40 632.00 1038.40 2180.40 22.75 176.96 1090.00 455.04 477.79 1545.04 1567.79 -583.36
11 2450815.0 29485.0 2450825 601.0 797995 6189.0 583 601.0 797995 6189 583 2 14.0 20.0 1.0 1762 2 2 45 5.95 12.97 8.81 187.20 396.45 267.75 583.65 3.96 0.00 17.10 396.45 400.41 413.55 417.51 128.70
12 2450815.0 29485.0 2450837 601.0 797995 6189.0 583 601.0 797995 6189 583 2 13.0 7.0 1.0 400 1 2 34 43.69 105.29 82.12 787.78 2792.08 1485.46 3579.86 55.84 0.00 930.58 2792.08 2847.92 3722.66 3778.50 1306.62
13 2450815.0 29485.0 2450822 601.0 797995 6189.0 583 601.0 797995 6189 583 2 106.0 16.0 1.0 952 3 2 59 78.90 84.42 82.73 99.71 4881.07 4655.10 4980.78 292.86 0.00 1444.32 4881.07 5173.93 6325.39 6618.25 225.97
14 2450815.0 29485.0 2450895 601.0 797995 6189.0 583 601.0 797995 6189 583 2 17.0 19.0 1.0 404 2 2 94 41.36 105.88 50.82 5175.64 4777.08 3887.84 9952.72 191.08 0.00 497.26 4777.08 4968.16 5274.34 5465.42 889.24
15 2450815.0 29485.0 2450892 601.0 797995 6189.0 583 601.0 797995 6189 583 2 74.0 18.0 1.0 781 2 2 38 26.96 51.22 35.85 584.06 1362.30 1024.48 1946.36 108.98 0.00 642.20 1362.30 1471.28 2004.50 2113.48 337.82
16 2450815.0 29485.0 2450862 601.0 797995 6189.0 583 601.0 797995 6189 583 2 23.0 16.0 1.0 727 2 2 45 9.54 23.37 21.50 84.15 967.50 429.30 1051.65 21.76 725.62 294.30 241.88 263.64 536.18 557.94 -187.42
17 2450815.0 29485.0 2450834 601.0 797995 6189.0 583 601.0 797995 6189 583 2 63.0 5.0 1.0 596 1 2 41 39.04 108.92 75.15 1384.57 3081.15 1600.64 4465.72 215.68 0.00 1964.72 3081.15 3296.83 5045.87 5261.55 1480.51
18 2450815.0 10687.0 2450864 572.0 437897 6622.0 147 572.0 437897 6622 147 2 28.0 5.0 1.0 1198 2 3 99 75.88 178.31 156.91 2118.60 15534.09 7512.12 17652.69 1398.06 0.00 6884.46 15534.09 16932.15 22418.55 23816.61 8021.97
19 2450815.0 10687.0 2450905 572.0 437897 6622.0 147 572.0 437897 6622 147 2 47.0 10.0 1.0 1435 3 3 90 34.57 89.53 68.04 1934.10 6123.60 3111.30 8057.70 428.65 0.00 1449.90 6123.60 6552.25 7573.50 8002.15 3012.30
20 2450815.0 10687.0 2450846 572.0 437897 6622.0 147 572.0 437897 6622 147 2 7.0 2.0 1.0 886 2 3 75 8.44 14.43 6.34 606.75 475.50 633.00 1082.25 33.28 0.00 10.50 475.50 508.78 486.00 519.28 -157.50
21 2450815.0 10687.0 2450900 572.0 437897 6622.0 147 572.0 437897 6622 147 2 67.0 7.0 1.0 1537 3 3 45 45.24 59.26 53.33 266.85 2399.85 2035.80 2666.70 191.98 0.00 479.70 2399.85 2591.83 2879.55 3071.53 364.05
22 2450815.0 10687.0 2450893 572.0 437897 6622.0 147 572.0 437897 6622 147 2 31.0 4.0 1.0 1826 2 3 33 89.04 217.25 52.14 5448.63 1720.62 2938.32 7169.25 68.82 0.00 3584.46 1720.62 1789.44 5305.08 5373.90 -1217.70
23 2450815.0 10687.0 2450904 572.0 437897 6622.0 147 572.0 437897 6622 147 2 52.0 18.0 1.0 1238 1 3 25 72.16 98.13 29.43 1717.50 735.75 1804.00 2453.25 29.43 0.00 834.00 735.75 765.18 1569.75 1599.18 -1068.25
24 2450815.0 10687.0 2450820 572.0 437897 6622.0 147 572.0 437897 6622 147 2 77.0 7.0 1.0 247 3 3 56 12.62 28.39 20.72 429.52 1160.32 706.72 1589.84 4.87 1079.09 0.00 81.23 86.10 81.23 86.10 -625.49
25 NaN NaN 2450835 NaN 3755 NaN 652 NaN 3755 2480 652 2 NaN NaN NaN 922 1 4 33 8.80 23.49 NaN 77.55 NaN NaN 775.17 34.88 0.00 NaN NaN NaN 976.47 1011.35 407.22
26 2450815.0 74512.0 2450888 383.0 3755 2480.0 652 383.0 3755 2480 652 2 107.0 13.0 1.0 610 1 4 63 65.85 181.74 23.62 9961.56 1488.06 4148.55 11449.62 29.76 0.00 3663.45 1488.06 1517.82 5151.51 5181.27 -2660.49
27 2450815.0 74512.0 2450825 383.0 3755 2480.0 652 383.0 3755 2480 652 2 88.0 13.0 1.0 1171 2 4 90 47.29 55.32 7.19 4331.70 647.10 4256.10 4978.80 38.82 0.00 1542.60 647.10 685.92 2189.70 2228.52 -3609.00
28 2450815.0 74512.0 2450870 383.0 3755 2480.0 652 383.0 3755 2480 652 2 53.0 8.0 1.0 1106 3 4 68 51.19 135.65 82.74 3597.88 5626.32 3480.92 9224.20 337.57 0.00 922.08 5626.32 5963.89 6548.40 6885.97 2145.40
29 2450815.0 74512.0 2450891 383.0 3755 2480.0 652 383.0 3755 2480 652 2 7.0 17.0 1.0 1820 2 4 12 35.46 59.57 5.36 650.52 64.32 425.52 714.84 4.50 0.00 250.08 64.32 68.82 314.40 318.90 -361.20
30 2450815.0 74512.0 2450897 383.0 3755 2480.0 652 383.0 3755 2480 652 2 23.0 16.0 1.0 880 2 4 79 49.20 118.57 92.48 2061.11 7305.92 3886.80 9367.03 219.17 0.00 3371.72 7305.92 7525.09 10677.64 10896.81 3419.12
31 2450816.0 53201.0 2450857 801.0 90299 3797.0 495 801.0 90299 3797 495 1 29.0 20.0 1.0 1495 2 5 24 33.13 86.13 18.94 1612.56 454.56 795.12 2067.12 9.09 0.00 330.72 454.56 463.65 785.28 794.37 -340.56
32 2450816.0 53201.0 2450887 801.0 90299 3797.0 495 801.0 90299 3797 495 1 90.0 2.0 1.0 1735 3 5 88 61.57 91.12 87.47 321.20 7697.36 5418.16 8018.56 307.89 0.00 3046.56 7697.36 8005.25 10743.92 11051.81 2279.20
33 2450816.0 53201.0 2450831 801.0 90299 3797.0 495 801.0 90299 3797 495 1 105.0 3.0 1.0 730 2 5 33 79.68 165.73 97.78 2242.35 3226.74 2629.44 5469.09 64.53 0.00 273.24 3226.74 3291.27 3499.98 3564.51 597.30
34 2450816.0 53201.0 2450896 801.0 90299 3797.0 495 801.0 90299 3797 495 1 40.0 18.0 1.0 602 2 5 7 30.89 78.46 15.69 439.39 109.83 216.23 549.22 5.49 0.00 241.64 109.83 115.32 351.47 356.96 -106.40
35 2450816.0 53201.0 2450818 801.0 90299 3797.0 495 801.0 90299 3797 495 1 78.0 16.0 1.0 1766 1 5 50 22.47 28.53 24.53 200.00 1226.50 1123.50 1426.50 85.85 0.00 256.50 1226.50 1312.35 1483.00 1568.85 103.00
36 2450816.0 53201.0 2450821 801.0 90299 3797.0 495 801.0 90299 3797 495 1 44.0 12.0 1.0 1754 1 5 24 91.40 95.05 38.02 1368.72 912.48 2193.60 2281.20 54.74 0.00 638.64 912.48 967.22 1551.12 1605.86 -1281.12
37 2450816.0 53201.0 2450847 801.0 90299 3797.0 495 801.0 90299 3797 495 1 69.0 14.0 1.0 1928 3 5 84 24.03 29.79 17.57 1026.48 1475.88 2018.52 2502.36 10.92 383.72 650.16 1092.16 1103.08 1742.32 1753.24 -926.36
38 2450816.0 53201.0 2450834 801.0 90299 3797.0 495 801.0 90299 3797 495 1 16.0 10.0 1.0 199 2 5 2 51.27 111.76 103.93 15.66 207.86 102.54 223.52 0.00 0.00 93.86 207.86 207.86 301.72 301.72 105.32
39 2450816.0 53201.0 2450853 801.0 90299 3797.0 495 801.0 90299 3797 495 1 95.0 9.0 1.0 1387 3 5 17 38.62 106.59 68.21 652.46 1159.57 656.54 1812.03 33.04 57.97 199.24 1101.60 1134.64 1300.84 1333.88 445.06
40 2450816.0 53201.0 2450861 801.0 90299 3797.0 495 801.0 90299 3797 495 1 9.0 16.0 1.0 988 1 5 34 42.47 118.49 41.47 2618.68 1409.98 1443.98 4028.66 52.45 535.79 1571.14 874.19 926.64 2445.33 2497.78 -569.79
41 2450816.0 53201.0 2450881 801.0 90299 3797.0 495 801.0 90299 3797 495 1 98.0 13.0 1.0 190 3 5 7 67.40 138.17 56.64 570.71 396.48 471.80 967.19 23.78 0.00 483.56 396.48 420.26 880.04 903.82 -75.32
42 2450816.0 47169.0 2450856 351.0 528859 5567.0 122 351.0 528859 5567 122 1 47.0 18.0 1.0 82 1 6 21 41.74 85.14 6.81 1644.93 143.01 876.54 1787.94 7.15 0.00 697.20 143.01 150.16 840.21 847.36 -733.53
43 2450816.0 47169.0 2450842 351.0 528859 5567.0 122 351.0 528859 5567 122 1 6.0 19.0 1.0 910 1 6 43 79.58 210.09 44.11 7137.14 1896.73 3421.94 9033.87 4.55 1782.92 361.20 113.81 118.36 475.01 479.56 -3308.13
44 2450816.0 47169.0 2450873 351.0 528859 5567.0 122 351.0 528859 5567 122 1 56.0 2.0 1.0 502 1 6 57 21.60 26.35 24.24 120.27 1381.68 1231.20 1501.95 0.00 0.00 600.78 1381.68 1381.68 1982.46 1982.46 150.48
45 2450816.0 47169.0 2450829 351.0 528859 5567.0 122 351.0 528859 5567 122 1 34.0 15.0 1.0 1268 1 6 12 83.45 207.79 91.42 1396.44 1097.04 1001.40 2493.48 65.82 0.00 1072.08 1097.04 1162.86 2169.12 2234.94 95.64
46 2450816.0 47169.0 2450865 351.0 528859 5567.0 122 351.0 528859 5567 122 1 81.0 18.0 1.0 446 3 6 75 63.50 133.35 17.33 8701.50 1299.75 4762.50 10001.25 13.25 857.83 1399.50 441.92 455.17 1841.42 1854.67 -4320.58
47 2450816.0 47169.0 2450872 351.0 528859 5567.0 122 351.0 528859 5567 122 1 78.0 13.0 1.0 1783 3 6 32 33.46 69.26 67.18 66.56 2149.76 1070.72 2216.32 193.47 0.00 221.44 2149.76 2343.23 2371.20 2564.67 1079.04
48 2450816.0 47169.0 2450842 351.0 528859 5567.0 122 351.0 528859 5567 122 1 27.0 4.0 1.0 1252 1 6 30 38.50 57.75 25.41 970.20 762.30 1155.00 1732.50 38.11 0.00 796.80 762.30 800.41 1559.10 1597.21 -392.70
49 2450816.0 47169.0 2450850 351.0 528859 5567.0 122 351.0 528859 5567 122 1 62.0 18.0 1.0 1192 3 6 53 9.92 25.69 9.24 871.85 489.72 525.76 1361.57 15.08 112.63 122.43 377.09 392.17 499.52 514.60 -148.67
50 2450816.0 47169.0 2450874 351.0 528859 5567.0 122 351.0 528859 5567 122 1 54.0 11.0 1.0 374 1 6 56 1.84 5.35 3.31 114.24 185.36 103.04 299.60 14.82 0.00 104.72 185.36 200.18 290.08 304.90 82.32
51 2450816.0 64129.0 2450879 427.0 192069 5664.0 106 427.0 192069 5664 106 2 89.0 8.0 1.0 1339 2 7 48 18.55 52.49 49.34 151.20 2368.32 890.40 2519.52 88.10 165.78 604.32 2202.54 2290.64 2806.86 2894.96 1312.14
52 2450816.0 64129.0 2450856 427.0 192069 5664.0 106 427.0 192069 5664 106 2 27.0 2.0 1.0 1006 1 7 69 93.62 245.28 208.48 2539.20 14385.12 6459.78 16924.32 0.00 1006.95 7954.32 13378.17 13378.17 21332.49 21332.49 6918.39
53 2450816.0 64129.0 2450819 427.0 192069 5664.0 106 427.0 192069 5664 106 2 65.0 6.0 1.0 217 3 7 22 40.21 95.29 4.76 1991.66 104.72 884.62 2096.38 0.00 0.00 1027.18 104.72 104.72 1131.90 1131.90 -779.90
54 2450816.0 64129.0 2450829 427.0 192069 5664.0 106 427.0 192069 5664 106 2 103.0 7.0 1.0 1051 3 7 26 10.72 19.29 4.82 376.22 125.32 278.72 501.54 5.01 0.00 55.12 125.32 130.33 180.44 185.45 -153.40
55 2450817.0 34427.0 2450865 814.0 271788 6362.0 536 814.0 271788 6362 536 1 53.0 13.0 1.0 256 1 8 46 47.13 76.35 64.13 562.12 2949.98 2167.98 3512.10 146.90 501.49 350.98 2448.49 2595.39 2799.47 2946.37 280.51
56 2450817.0 34427.0 2450885 814.0 271788 6362.0 536 814.0 271788 6362 536 1 41.0 18.0 1.0 223 2 8 83 64.16 150.13 48.04 8473.47 3987.32 5325.28 12460.79 159.49 0.00 3862.82 3987.32 4146.81 7850.14 8009.63 -1337.96
57 2450817.0 34427.0 2450907 814.0 271788 6362.0 536 814.0 271788 6362 536 1 45.0 5.0 1.0 1567 1 8 15 72.17 199.18 161.33 567.75 2419.95 1082.55 2987.70 217.79 0.00 1045.65 2419.95 2637.74 3465.60 3683.39 1337.40
58 2450817.0 34427.0 2450886 814.0 271788 6362.0 536 814.0 271788 6362 536 1 3.0 3.0 1.0 14 2 8 27 90.20 183.10 3.66 4844.88 98.82 2435.40 4943.70 3.91 33.59 2273.94 65.23 69.14 2339.17 2343.08 -2370.17
59 2450817.0 34427.0 2450884 814.0 271788 6362.0 536 814.0 271788 6362 536 1 53.0 2.0 1.0 1066 2 8 1 66.72 166.80 106.75 60.05 106.75 66.72 166.80 0.00 0.00 0.00 106.75 106.75 106.75 106.75 40.03
60 2450817.0 34427.0 2450840 814.0 271788 6362.0 536 814.0 271788 6362 536 1 21.0 2.0 1.0 856 3 8 62 2.33 3.86 0.57 203.98 35.34 144.46 239.32 0.00 0.00 18.60 35.34 35.34 53.94 53.94 -109.12
61 2450817.0 34427.0 2450875 814.0 271788 6362.0 536 814.0 271788 6362 536 1 16.0 16.0 1.0 1796 2 8 49 51.74 83.81 4.19 3901.38 205.31 2535.26 4106.69 10.26 0.00 862.40 205.31 215.57 1067.71 1077.97 -2329.95
62 2450817.0 34427.0 2450886 814.0 271788 6362.0 536 814.0 271788 6362 536 1 71.0 19.0 1.0 1255 3 8 57 34.01 77.54 40.32 2121.54 2298.24 1938.57 4419.78 0.00 0.00 1104.66 2298.24 2298.24 3402.90 3402.90 359.67
63 2450817.0 34427.0 2450847 814.0 271788 6362.0 536 814.0 271788 6362 536 1 67.0 4.0 1.0 1657 2 8 29 6.77 12.45 3.61 256.36 104.69 196.33 361.05 1.04 0.00 53.94 104.69 105.73 158.63 159.67 -91.64
64 2450817.0 34427.0 2450905 814.0 271788 6362.0 536 814.0 271788 6362 536 1 6.0 20.0 1.0 1556 3 8 4 6.26 14.83 5.04 39.16 20.16 25.04 59.32 0.00 0.00 11.84 20.16 20.16 32.00 32.00 -4.88
65 2450817.0 45097.0 2450877 674.0 804458 4395.0 579 674.0 804458 4395 579 1 2.0 12.0 1.0 1844 3 9 6 48.56 143.73 137.98 34.50 827.88 291.36 862.38 0.00 0.00 155.22 827.88 827.88 983.10 983.10 536.52
66 2450817.0 45097.0 2450858 674.0 804458 4395.0 579 674.0 804458 4395 579 1 1.0 12.0 1.0 1579 1 9 38 62.96 64.84 42.14 862.60 1601.32 2392.48 2463.92 41.31 224.18 1059.44 1377.14 1418.45 2436.58 2477.89 -1015.34
67 2450817.0 45097.0 2450889 674.0 804458 4395.0 579 674.0 804458 4395 579 1 14.0 19.0 1.0 1243 2 9 23 57.35 108.39 80.20 648.37 1844.60 1319.05 2492.97 0.00 0.00 1096.87 1844.60 1844.60 2941.47 2941.47 525.55
68 2450817.0 45097.0 2450872 674.0 804458 4395.0 579 674.0 804458 4395 579 1 52.0 12.0 1.0 760 3 9 5 33.22 55.14 18.19 184.75 90.95 166.10 275.70 5.45 0.00 74.40 90.95 96.40 165.35 170.80 -75.15
69 2450817.0 45097.0 2450825 674.0 804458 4395.0 579 674.0 804458 4395 579 1 94.0 14.0 1.0 440 3 9 72 95.14 268.29 233.41 2511.36 16805.52 6850.08 19316.88 840.27 0.00 2704.32 16805.52 17645.79 19509.84 20350.11 9955.44
70 2450817.0 45097.0 2450847 674.0 804458 4395.0 579 674.0 804458 4395 579 1 61.0 12.0 1.0 1588 3 9 44 97.85 172.21 92.99 3485.68 4091.56 4305.40 7577.24 0.00 0.00 3409.56 4091.56 4091.56 7501.12 7501.12 -213.84
71 2450817.0 80602.0 2450868 276.0 23666 1703.0 340 276.0 23666 1703 340 2 36.0 7.0 1.0 1474 3 10 74 74.83 184.83 103.50 6018.42 7659.00 5537.42 13677.42 689.31 0.00 1230.62 7659.00 8348.31 8889.62 9578.93 2121.58
72 2450817.0 80602.0 2450854 276.0 23666 1703.0 340 276.0 23666 1703 340 2 43.0 6.0 1.0 1090 1 10 22 76.14 203.29 168.73 760.32 3712.06 1675.08 4472.38 222.72 0.00 402.38 3712.06 3934.78 4114.44 4337.16 2036.98
73 2450817.0 80602.0 2450902 276.0 23666 1703.0 340 276.0 23666 1703 340 2 50.0 9.0 1.0 1460 1 10 76 43.24 74.80 63.58 852.72 4832.08 3286.24 5684.80 289.92 0.00 56.24 4832.08 5122.00 4888.32 5178.24 1545.84
74 2450817.0 80602.0 2450830 276.0 23666 1703.0 340 276.0 23666 1703 340 2 25.0 10.0 1.0 241 3 10 55 21.09 48.29 34.28 770.55 1885.40 1159.95 2655.95 131.97 0.00 796.40 1885.40 2017.37 2681.80 2813.77 725.45
75 2450817.0 80602.0 2450884 276.0 23666 1703.0 340 276.0 23666 1703 340 2 54.0 18.0 1.0 829 2 10 90 98.27 142.49 2.84 12568.50 255.60 8844.30 12824.10 15.33 0.00 127.80 255.60 270.93 383.40 398.73 -8588.70
76 2450817.0 80602.0 2450848 276.0 23666 1703.0 340 276.0 23666 1703 340 2 24.0 5.0 1.0 1861 1 10 95 4.18 12.12 7.39 449.35 702.05 397.10 1151.40 42.12 0.00 91.20 702.05 744.17 793.25 835.37 304.95
77 2450817.0 80602.0 2450859 276.0 23666 1703.0 340 276.0 23666 1703 340 2 33.0 3.0 1.0 1321 3 10 17 67.47 185.54 124.31 1040.91 2113.27 1146.99 3154.18 64.24 507.18 346.80 1606.09 1670.33 1952.89 2017.13 459.10
78 2450817.0 80602.0 2450820 276.0 23666 1703.0 340 276.0 23666 1703 340 2 90.0 17.0 1.0 1327 1 10 63 84.32 222.60 115.75 6731.55 7292.25 5312.16 14023.80 291.69 0.00 3786.30 7292.25 7583.94 11078.55 11370.24 1980.09
79 2450817.0 80602.0 2450891 276.0 23666 1703.0 340 276.0 23666 1703 340 2 93.0 3.0 1.0 1483 1 10 4 87.55 95.42 5.72 358.80 22.88 350.20 381.68 0.22 0.00 83.96 22.88 23.10 106.84 107.06 -327.32
80 2450818.0 64115.0 2450883 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 10.0 10.0 1.0 1615 2 11 81 45.42 129.44 50.48 6395.76 4088.88 3679.02 10484.64 367.99 0.00 2621.16 4088.88 4456.87 6710.04 7078.03 409.86
81 2450818.0 64115.0 2450876 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 65.0 9.0 1.0 721 2 11 30 93.79 114.42 75.51 1167.30 2265.30 2813.70 3432.60 31.71 1472.44 308.70 792.86 824.57 1101.56 1133.27 -2020.84
82 2450818.0 64115.0 2450869 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 95.0 14.0 1.0 490 3 11 33 54.16 107.23 27.87 2618.88 919.71 1787.28 3538.59 45.98 0.00 1698.51 919.71 965.69 2618.22 2664.20 -867.57
83 2450818.0 64115.0 2450829 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 68.0 13.0 1.0 1052 1 11 76 27.04 64.35 7.72 4303.88 586.72 2055.04 4890.60 11.73 0.00 1515.44 586.72 598.45 2102.16 2113.89 -1468.32
84 2450818.0 64115.0 2450888 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 71.0 6.0 1.0 1346 3 11 5 60.75 83.83 19.28 322.75 96.40 303.75 419.15 3.85 0.00 62.85 96.40 100.25 159.25 163.10 -207.35
85 2450818.0 64115.0 2450831 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 65.0 9.0 1.0 1028 2 11 78 49.40 143.75 103.50 3139.50 8073.00 3853.20 11212.50 403.65 0.00 4260.36 8073.00 8476.65 12333.36 12737.01 4219.80
86 2450818.0 64115.0 2450898 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 42.0 17.0 1.0 1094 2 11 32 14.57 30.15 3.31 858.88 105.92 466.24 964.80 4.23 0.00 231.36 105.92 110.15 337.28 341.51 -360.32
87 2450818.0 64115.0 2450841 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 72.0 20.0 1.0 862 2 11 11 14.54 27.77 1.38 290.29 15.18 159.94 305.47 0.60 0.00 9.13 15.18 15.78 24.31 24.91 -144.76
88 2450818.0 64115.0 2450834 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 41.0 3.0 1.0 1978 3 11 56 96.00 270.72 97.45 9703.12 5457.20 5376.00 15160.32 36.01 4256.61 4699.52 1200.59 1236.60 5900.11 5936.12 -4175.41
89 2450818.0 64115.0 2450875 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 40.0 9.0 1.0 1990 3 11 43 1.71 4.85 1.06 162.97 45.58 73.53 208.55 3.19 0.00 14.19 45.58 48.77 59.77 62.96 -27.95
90 2450818.0 64115.0 2450855 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 35.0 11.0 1.0 356 1 11 86 73.25 139.90 8.39 11309.86 721.54 6299.50 12031.40 28.86 0.00 239.94 721.54 750.40 961.48 990.34 -5577.96
91 2450818.0 81128.0 2450860 748.0 83584 2773.0 362 748.0 83584 2773 362 1 58.0 12.0 1.0 520 1 12 75 59.96 82.74 77.77 372.75 5832.75 4497.00 6205.50 291.63 0.00 434.25 5832.75 6124.38 6267.00 6558.63 1335.75
92 2450818.0 81128.0 2450869 748.0 83584 2773.0 362 748.0 83584 2773 362 1 84.0 5.0 1.0 631 2 12 40 86.12 120.56 114.53 241.20 4581.20 3444.80 4822.40 274.87 0.00 1108.80 4581.20 4856.07 5690.00 5964.87 1136.40
93 2450818.0 81128.0 2450846 748.0 83584 2773.0 362 748.0 83584 2773 362 1 21.0 6.0 1.0 728 1 12 41 57.21 159.04 98.60 2478.04 4042.60 2345.61 6520.64 0.00 0.00 1956.11 4042.60 4042.60 5998.71 5998.71 1696.99
94 2450818.0 81128.0 2450879 748.0 83584 2773.0 362 748.0 83584 2773 362 1 8.0 1.0 1.0 578 3 12 79 63.39 148.33 93.44 4336.31 7381.76 5007.81 11718.07 180.85 3764.69 1756.96 3617.07 3797.92 5374.03 5554.88 -1390.74
95 2450818.0 81128.0 2450832 748.0 83584 2773.0 362 748.0 83584 2773 362 1 37.0 18.0 1.0 1924 3 12 89 74.58 146.17 62.85 7415.48 5593.65 6637.62 13009.13 335.61 0.00 4683.18 5593.65 5929.26 10276.83 10612.44 -1043.97
96 2450818.0 81128.0 2450892 748.0 83584 2773.0 362 748.0 83584 2773 362 1 11.0 16.0 1.0 835 3 12 84 80.29 89.12 34.75 4567.08 2919.00 6744.36 7486.08 116.76 0.00 2394.84 2919.00 3035.76 5313.84 5430.60 -3825.36
97 2450818.0 31835.0 2450855 22.0 1502404 6833.0 662 22.0 1502404 6833 662 2 35.0 2.0 1.0 484 3 13 51 43.78 114.26 22.85 4661.91 1165.35 2232.78 5827.26 23.30 0.00 2563.77 1165.35 1188.65 3729.12 3752.42 -1067.43
98 2450818.0 31835.0 2450881 22.0 1502404 6833.0 662 22.0 1502404 6833 662 2 18.0 9.0 1.0 1760 3 13 100 13.66 16.93 2.03 1490.00 203.00 1366.00 1693.00 0.00 0.00 220.00 203.00 203.00 423.00 423.00 -1163.00

customer (first 100 rows)

C_CUSTOMER_SK C_CUSTOMER_ID C_CURRENT_CDEMO_SK C_CURRENT_HDEMO_SK C_CURRENT_ADDR_SK C_FIRST_SHIPTO_DATE_SK C_FIRST_SALES_DATE_SK C_SALUTATION C_FIRST_NAME C_LAST_NAME C_PREFERRED_CUST_FLAG C_BIRTH_DAY C_BIRTH_MONTH C_BIRTH_YEAR C_BIRTH_COUNTRY C_LOGIN C_EMAIL_ADDRESS C_LAST_REVIEW_DATE_SK
0 1 AAAAAAAABAAAAAAA 980124.0 7135.0 946 2452238.0 2452208.0 Mr. Javier Lewis Y 9.0 12.0 1936.0 CHILE NaN Javier.Lewis@VFAxlnZEvOx.org 2452508.0
1 2 AAAAAAAACAAAAAAA 819667.0 1461.0 655 2452318.0 2452288.0 Dr. Amy Moses Y 9.0 4.0 1966.0 TOGO NaN Amy.Moses@Ovk9KjHH.com 2452318.0
2 3 AAAAAAAADAAAAAAA 1473522.0 6247.0 572 2449130.0 2449100.0 Miss Latisha Hamilton N 18.0 9.0 1979.0 NIUE NaN Latisha.Hamilton@V.com 2452313.0
3 4 AAAAAAAAEAAAAAAA 1703214.0 3986.0 558 2450030.0 2450000.0 Dr. Michael White N 7.0 6.0 1983.0 MEXICO NaN Michael.White@i.org 2452361.0
4 5 AAAAAAAAFAAAAAAA 953372.0 4470.0 368 2449438.0 2449408.0 Sir Robert Moran N 8.0 5.0 1956.0 FIJI NaN Robert.Moran@Hh.edu 2452469.0
5 6 AAAAAAAAGAAAAAAA 213219.0 6374.0 82 2451883.0 2451853.0 Ms. Brunilda Sharp N 4.0 12.0 1925.0 SURINAME NaN Brunilda.Sharp@T3pylZEUQjm.org 2452430.0
6 7 AAAAAAAAHAAAAAAA 68377.0 3219.0 814 2451438.0 2451408.0 Ms. Fonda Wiles Y 24.0 4.0 1985.0 GAMBIA NaN Fonda.Wiles@S9KnyEtz9hv.org 2452360.0
7 8 AAAAAAAAIAAAAAAA 1215897.0 2471.0 598 2449406.0 2449376.0 Sir Ollie Shipman N 26.0 12.0 1938.0 KOREA, REPUBLIC OF NaN Ollie.Shipman@be.org 2452334.0
8 9 AAAAAAAAJAAAAAAA 1168667.0 1404.0 388 2452275.0 2452245.0 Sir Karl Gilbert N 26.0 10.0 1966.0 MONTSERRAT NaN Karl.Gilbert@Crg5KyP2IxX9C4d6.edu 2452454.0
9 10 AAAAAAAAKAAAAAAA 1207553.0 5143.0 580 2451353.0 2451323.0 Ms. Albert Brunson N 15.0 10.0 1973.0 JORDAN NaN Albert.Brunson@62.com 2452641.0
10 11 AAAAAAAALAAAAAAA 1114415.0 6807.0 999 2452288.0 2452258.0 Ms. Betty Williams N 18.0 12.0 1963.0 BURKINA FASO NaN Betty.Williams@xRtDqM1eLBVQNoYAJ.com 2452398.0
11 12 AAAAAAAAMAAAAAAA 502141.0 6577.0 366 2451039.0 2451009.0 Ms. Margaret Farias N 2.0 6.0 1956.0 TURKMENISTAN NaN Margaret.Farias@cb.edu 2452634.0
12 13 AAAAAAAANAAAAAAA 1128748.0 2777.0 6 2449658.0 2449628.0 Mrs. Rosalinda Grimes N 1.0 3.0 1970.0 UKRAINE NaN Rosalinda.Grimes@tC8pcU7Lt.edu 2452616.0
13 14 AAAAAAAAOAAAAAAA 929344.0 892.0 440 2450318.0 2450288.0 Mr. Jack Wilcox N 30.0 3.0 1937.0 SLOVENIA NaN Jack.Wilcox@Y3Etqyv3.org 2452641.0
14 15 AAAAAAAAPAAAAAAA NaN 134.0 469 NaN 2449010.0 Ms. Tonya None None NaN 12.0 1969.0 None NaN None 2452376.0
15 16 AAAAAAAAABAAAAAA 1196373.0 3014.0 302 2451346.0 2451316.0 Dr. Margie Browning N 24.0 12.0 1933.0 PHILIPPINES NaN Margie.Browning@LM674NrE2.org 2452573.0
16 17 AAAAAAAABBAAAAAA 707524.0 3876.0 228 2451068.0 2451038.0 Dr. Lee Stovall N 23.0 12.0 1972.0 PHILIPPINES NaN Lee.Stovall@fqKC83UU0f.org 2452454.0
17 18 AAAAAAAACBAAAAAA 1361151.0 6580.0 456 2450041.0 2450011.0 Sir Brad Lynch Y 1.0 9.0 1950.0 URUGUAY NaN Brad.Lynch@nAbai.edu 2452549.0
18 19 AAAAAAAADBAAAAAA 1161742.0 4238.0 581 2449580.0 2449550.0 Dr. Andre Moore N 20.0 10.0 1978.0 NICARAGUA NaN Andre.Moore@cTZLGYi1ZJi.org 2452576.0
19 20 AAAAAAAAEBAAAAAA 1185612.0 89.0 966 2450965.0 2450935.0 Mr. Stanton Dallas Y 17.0 5.0 1976.0 SWITZERLAND NaN Stanton.Dallas@DBXgl18FGo.edu 2452334.0
20 21 AAAAAAAAFBAAAAAA 442697.0 6538.0 979 2451827.0 2451797.0 Miss Naomi Barnett N 18.0 5.0 1956.0 BAHAMAS NaN Naomi.Barnett@2T3V3OZOy4KBNAHsT.edu 2452433.0
21 22 AAAAAAAAGBAAAAAA 490494.0 4504.0 467 2451465.0 2451435.0 Sir Victor Martinez N 21.0 12.0 1991.0 CAYMAN ISLANDS NaN Victor.Martinez@fC.edu 2452529.0
22 23 AAAAAAAAHBAAAAAA NaN 2107.0 686 2451012.0 2450982.0 Sir None Garrison N NaN 5.0 NaN None NaN Earl.Garrison@G3sM4P.com NaN
23 24 AAAAAAAAIBAAAAAA 17113.0 1102.0 291 2450098.0 2450068.0 Dr. Paul Morris Y 6.0 6.0 1951.0 GUINEA-BISSAU NaN Paul.Morris@FMGalegqc3.com 2452499.0
24 25 AAAAAAAAJBAAAAAA 476176.0 3278.0 933 2449246.0 2449216.0 Miss Nancy Mccormick N 6.0 10.0 1973.0 BAHAMAS NaN Nancy.Mccormick@DA26I9ZArLF9rxJ6Z.edu 2452425.0
25 26 AAAAAAAAKBAAAAAA 230278.0 1242.0 206 2449816.0 2449786.0 Ms. Monique Baker N 14.0 6.0 1991.0 MOROCCO NaN Monique.Baker@9uEucNczY.org 2452356.0
26 27 AAAAAAAALBAAAAAA 111621.0 835.0 96 2450611.0 2450581.0 Dr. Shawn Prather N 7.0 3.0 1972.0 PUERTO RICO NaN Shawn.Prather@8BusRYegn6.org 2452353.0
27 28 AAAAAAAAMBAAAAAA 889961.0 897.0 480 2452615.0 2452585.0 Miss Edith Hernandez Y 17.0 8.0 1959.0 CÔTE D'IVOIRE NaN Edith.Hernandez@BNHL0k.com 2452631.0
28 29 AAAAAAAANBAAAAAA 1634269.0 1204.0 139 2452216.0 2452186.0 Ms. Margaret Collins Y 25.0 8.0 1973.0 NETHERLANDS ANTILLES NaN Margaret.Collins@9obPr3UV.org 2452496.0
29 30 AAAAAAAAOBAAAAAA 84232.0 5869.0 459 2449916.0 2449886.0 Dr. Pamela Luna Y 4.0 7.0 1956.0 GUAM NaN Pamela.Luna@QBGuhL36lnA.edu 2452410.0
30 31 AAAAAAAAPBAAAAAA 1275120.0 5724.0 128 2452054.0 2452024.0 Dr. William Craig N 13.0 6.0 1964.0 SPAIN NaN William.Craig@prVDE1E8AHc.org 2452336.0
31 32 AAAAAAAAACAAAAAA 1369589.0 6163.0 290 2449471.0 2449441.0 Dr. Kenneth Wood N 2.0 8.0 1927.0 MOLDOVA, REPUBLIC OF NaN Kenneth.Wood@RIA.edu 2452510.0
32 33 AAAAAAAABCAAAAAA 1680761.0 5823.0 438 2451572.0 2451542.0 Mrs. Donna Betts Y 25.0 3.0 1958.0 FRANCE NaN Donna.Betts@YJ14k.edu 2452455.0
33 34 AAAAAAAACCAAAAAA NaN NaN 501 2452192.0 2452162.0 None None Woods None NaN NaN NaN None NaN Brandon.Woods@hjKbf.edu 2452408.0
34 35 AAAAAAAADCAAAAAA 339036.0 2057.0 231 2451937.0 2451907.0 Dr. Marie Peterson N 19.0 6.0 1953.0 KIRIBATI NaN Marie.Peterson@1zg9tydFHafA5.com 2452581.0
35 36 AAAAAAAAECAAAAAA 655414.0 2223.0 585 2449222.0 2449192.0 Dr. Anthony Fisher N 29.0 11.0 1968.0 KYRGYZSTAN NaN Anthony.Fisher@jJrZfeDcz8P.com 2452470.0
36 37 AAAAAAAAFCAAAAAA 827972.0 2281.0 943 2449848.0 2449818.0 Dr. Dwight Schneider Y 9.0 1.0 1949.0 RUSSIAN FEDERATION NaN Dwight.Schneider@koxO7zAysvOd.com 2452293.0
37 38 AAAAAAAAGCAAAAAA 766645.0 3879.0 360 2450323.0 2450293.0 Mrs. Ha Carpenter Y 30.0 3.0 1939.0 PARAGUAY NaN Ha.Carpenter@XgcUt4svNz.com 2452351.0
38 39 AAAAAAAAHCAAAAAA 1617182.0 4013.0 844 2452131.0 2452101.0 Sir Neil Cox N 14.0 12.0 1951.0 ECUADOR NaN Neil.Cox@FRuR2bFK.com 2452586.0
39 40 AAAAAAAAICAAAAAA 1795301.0 NaN 45 2451159.0 NaN None Jacqueline Hatfield None 26.0 NaN 1942.0 None NaN None NaN
40 41 AAAAAAAAJCAAAAAA 941420.0 5068.0 316 2449989.0 2449959.0 Miss Maxine Carlson N 26.0 6.0 1939.0 ISLE OF MAN NaN Maxine.Carlson@StyP5lAokmQ29QHYMLa.edu 2452464.0
41 42 AAAAAAAAKCAAAAAA 1867377.0 3327.0 277 2449869.0 2449839.0 Dr. Deborah Burton N 17.0 1.0 1950.0 COMOROS NaN Deborah.Burton@xt.edu 2452498.0
42 43 AAAAAAAALCAAAAAA 385562.0 3676.0 743 2451705.0 2451675.0 Mr. William Warner Y 5.0 12.0 1965.0 GUAM NaN William.Warner@zegnrzurU.org 2452537.0
43 44 AAAAAAAAMCAAAAAA 497758.0 5427.0 296 2449750.0 2449720.0 Miss Mabel Richmond Y 7.0 12.0 1932.0 CAMBODIA NaN Mabel.Richmond@Tkla.edu 2452333.0
44 45 AAAAAAAANCAAAAAA 1036174.0 2399.0 777 2451118.0 2451088.0 None None Hammonds None 5.0 NaN NaN NIGER NaN None NaN
45 46 AAAAAAAAOCAAAAAA 843672.0 4729.0 386 2451857.0 2451827.0 Mrs. Jane Stephenson Y 13.0 4.0 1990.0 TURKEY NaN Jane.Stephenson@lq8ZQLAUMZhR.edu 2452301.0
46 47 AAAAAAAAPCAAAAAA 1634314.0 5368.0 469 2449165.0 2449135.0 Mr. Luis Young N 3.0 12.0 1982.0 BRUNEI DARUSSALAM NaN Luis.Young@0DmV.edu 2452586.0
47 48 AAAAAAAAADAAAAAA 8817.0 311.0 252 2449531.0 2449501.0 Ms. Jill Jackson N 15.0 9.0 1961.0 LUXEMBOURG NaN Jill.Jackson@n6I7SF.org 2452575.0
48 49 AAAAAAAABDAAAAAA 936800.0 1514.0 581 2449364.0 2449334.0 Mr. Steven Venable N 13.0 6.0 1961.0 NETHERLANDS ANTILLES NaN Steven.Venable@0hA90vhfK7k9F4h.com 2452350.0
49 50 AAAAAAAACDAAAAAA 759177.0 72.0 567 2449384.0 2449354.0 Mr. Christopher Eller N 24.0 11.0 1965.0 AUSTRALIA NaN Christopher.Eller@gV5Ua7HOmt.com 2452520.0
50 51 AAAAAAAADDAAAAAA 532799.0 6920.0 688 2452390.0 2452360.0 Dr. David Nieves N 5.0 10.0 1926.0 CHRISTMAS ISLAND NaN David.Nieves@LcDkQ.edu 2452570.0
51 52 AAAAAAAAEDAAAAAA 534808.0 4768.0 128 2451421.0 2451391.0 Mrs. Wendy Colley N 1.0 4.0 1982.0 FRENCH GUIANA NaN Wendy.Colley@qLBjqbAQQGj.edu 2452553.0
52 53 AAAAAAAAFDAAAAAA 1597348.0 7017.0 439 2451820.0 2451790.0 Mr. Paul Higgins Y 23.0 9.0 1950.0 GABON NaN Paul.Higgins@qG9NrSTLz9HaNHX.edu 2452447.0
53 54 AAAAAAAAGDAAAAAA 380102.0 2381.0 660 2449980.0 2449950.0 Ms. Donna King Y 3.0 2.0 1940.0 TUNISIA NaN Donna.King@TEftU.com 2452446.0
54 55 AAAAAAAAHDAAAAAA 783093.0 1151.0 256 2451539.0 2451509.0 Dr. Beryl Thomason N 12.0 8.0 1933.0 UNITED KINGDOM NaN Beryl.Thomason@OeqefhtCmZTAj.com 2452380.0
55 56 AAAAAAAAIDAAAAAA 344460.0 3092.0 524 2451424.0 2451394.0 Miss Pamela Delgado N 29.0 1.0 1960.0 GUERNSEY NaN Pamela.Delgado@8OpV0Ldj8vq2K9ZK.org 2452334.0
56 57 AAAAAAAAJDAAAAAA 752932.0 128.0 571 2449741.0 2449711.0 Mr. Travis Melendez Y 10.0 3.0 1961.0 AFGHANISTAN NaN Travis.Melendez@344rCMk.edu 2452606.0
57 58 AAAAAAAAKDAAAAAA 528756.0 6879.0 155 2451386.0 2451356.0 Mr. Cecil Peterman Y 29.0 2.0 1988.0 ICELAND NaN Cecil.Peterman@tbeqEuUvS4ZM4Px9N.com 2452447.0
58 59 AAAAAAAALDAAAAAA 1895444.0 4787.0 683 2451157.0 2451127.0 Miss Melanie Morrison N 6.0 1.0 1947.0 HUNGARY NaN Melanie.Morrison@F2foqn.edu 2452530.0
59 60 AAAAAAAAMDAAAAAA 1179671.0 3200.0 282 2449714.0 2449684.0 Ms. Dollie Thao N 15.0 7.0 1990.0 SWITZERLAND NaN Dollie.Thao@Xead5vagsekdHDLUkv.edu 2452407.0
60 61 AAAAAAAANDAAAAAA 1620078.0 6683.0 688 2451136.0 2451106.0 Sir Joseph White Y 6.0 5.0 1978.0 SENEGAL NaN Joseph.White@c0EJ7pimuu.com 2452462.0
61 62 AAAAAAAAODAAAAAA 821787.0 4700.0 413 2451854.0 2451824.0 Mr. Matthew Brown Y 1.0 6.0 1973.0 KOREA, REPUBLIC OF NaN Matthew.Brown@F.edu 2452319.0
62 63 AAAAAAAAPDAAAAAA 1790374.0 2445.0 716 2450179.0 2450149.0 Dr. Frank Morton N 26.0 4.0 1943.0 EGYPT NaN Frank.Morton@Hd7jNaA3s.com 2452425.0
63 64 AAAAAAAAAEAAAAAA 1260191.0 6284.0 930 2452379.0 2452349.0 Dr. Michael Frye N 27.0 6.0 1941.0 CAPE VERDE NaN Michael.Frye@aM1HsbOs0smgpLo.org 2452426.0
64 65 AAAAAAAABEAAAAAA 1778884.0 2234.0 584 2451898.0 2451868.0 Dr. Rodney Taft N 18.0 9.0 1991.0 VIRGIN ISLANDS, U.S. NaN Rodney.Taft@qe.com 2452353.0
65 66 AAAAAAAACEAAAAAA 747190.0 6036.0 882 2449294.0 2449264.0 Ms. Julie Chester N 8.0 9.0 1950.0 HONG KONG NaN Julie.Chester@Kv.com 2452375.0
66 67 AAAAAAAADEAAAAAA 1118294.0 2032.0 970 2452033.0 2452003.0 Dr. Gerald Thomas N 27.0 10.0 1948.0 NORWAY NaN Gerald.Thomas@zSuIGSgb6iyu.org 2452414.0
67 68 AAAAAAAAEEAAAAAA 779965.0 6069.0 126 2451936.0 2451906.0 Dr. Arthur Troy Y 20.0 8.0 1928.0 LUXEMBOURG NaN Arthur.Troy@3VY5bV30AifrO.com 2452542.0
68 69 AAAAAAAAFEAAAAAA 971368.0 4167.0 366 2450154.0 2450124.0 Sir Steven Mcclellan Y 15.0 1.0 1950.0 NEPAL NaN Steven.Mcclellan@UviyOLnu2m1POo.edu 2452340.0
69 70 AAAAAAAAGEAAAAAA 1460929.0 5492.0 102 2451944.0 2451914.0 Sir James Smith N 7.0 12.0 1963.0 KUWAIT NaN James.Smith@ifJngGlNG.edu 2452342.0
70 71 AAAAAAAAHEAAAAAA 1292064.0 2257.0 450 2450248.0 2450218.0 Mr. Roderick Rogers N 4.0 11.0 1967.0 OMAN NaN Roderick.Rogers@pJdioQ.com 2452462.0
71 72 AAAAAAAAIEAAAAAA 1608738.0 6364.0 390 2451700.0 2451670.0 Dr. Bradley Barry Y 21.0 3.0 1937.0 TAJIKISTAN NaN Bradley.Barry@Kq2ONpEXU9YSno31.edu 2452601.0
72 73 AAAAAAAAJEAAAAAA 425740.0 431.0 369 2449133.0 2449103.0 Mr. David Vasquez N 17.0 4.0 1956.0 ISRAEL NaN David.Vasquez@j.org 2452489.0
73 74 AAAAAAAAKEAAAAAA 1434225.0 347.0 269 2452641.0 2452611.0 Sir Eric Woods Y 19.0 2.0 1953.0 SAINT LUCIA NaN Eric.Woods@CfPzy1AUqxd2.com 2452584.0
74 75 AAAAAAAALEAAAAAA 1888603.0 143.0 730 2451755.0 2451725.0 Dr. Annie Grant Y 25.0 5.0 1925.0 TUVALU NaN Annie.Grant@tccug5KC1oT2nL.com 2452401.0
75 76 AAAAAAAAMEAAAAAA 526064.0 2054.0 691 2451760.0 2451730.0 Mr. Craig Lowry Y 7.0 3.0 1946.0 WALLIS AND FUTUNA NaN Craig.Lowry@92zokgx8duX.org 2452430.0
76 77 AAAAAAAANEAAAAAA 915180.0 2167.0 154 2451632.0 2451602.0 Dr. Darrin Smith N 30.0 5.0 1931.0 UNITED STATES NaN Darrin.Smith@Mti.edu 2452355.0
77 78 AAAAAAAAOEAAAAAA 1092537.0 3677.0 264 2449388.0 2449358.0 Ms. Wanda Davis N 11.0 5.0 1940.0 NETHERLANDS ANTILLES NaN Wanda.Davis@I6s7DD86i6.edu 2452339.0
78 79 AAAAAAAAPEAAAAAA 389494.0 3493.0 539 2450863.0 2450833.0 Miss Sandi Tran Y 10.0 6.0 1937.0 FRENCH GUIANA NaN Sandi.Tran@myikqStif1Q.edu 2452644.0
79 80 AAAAAAAAAFAAAAAA 1499808.0 3891.0 727 2450558.0 2450528.0 Mrs. Eleanor Evans N 21.0 12.0 1948.0 CÔTE D'IVOIRE NaN Eleanor.Evans@zxvr5rl.org 2452413.0
80 81 AAAAAAAABFAAAAAA 728917.0 388.0 306 2452562.0 2452532.0 Ms. Jessica Levesque Y 17.0 7.0 1940.0 ALBANIA NaN Jessica.Levesque@06mGqI9mHG.org 2452414.0
81 82 AAAAAAAACFAAAAAA 75627.0 5081.0 88 2450357.0 2450327.0 Sir Max Mueller N 26.0 2.0 1947.0 IRAQ NaN Max.Mueller@xqCZRBSrTGD6CBvXh.com 2452303.0
82 83 AAAAAAAADFAAAAAA 976724.0 5574.0 824 2451032.0 2451002.0 Miss Daisy Flynn N 24.0 1.0 1943.0 NEW ZEALAND NaN Daisy.Flynn@288e6Z0csxJ.com 2452338.0
83 84 AAAAAAAAEFAAAAAA 1250744.0 2821.0 898 2449496.0 2449466.0 Mrs. Ami Montgomery Y 2.0 5.0 1964.0 JAMAICA NaN Ami.Montgomery@VBSKqhL36j55.edu 2452526.0
84 85 AAAAAAAAFFAAAAAA 1293499.0 37.0 575 2449868.0 2449838.0 Miss Michele Baldwin Y 30.0 10.0 1978.0 GEORGIA NaN Michele.Baldwin@sIVO1J4U.org 2452491.0
85 86 AAAAAAAAGFAAAAAA 1428237.0 6963.0 442 2451560.0 2451530.0 Dr. Marvin Matlock Y 21.0 10.0 1983.0 BRUNEI DARUSSALAM NaN Marvin.Matlock@0FXEZp.org 2452633.0
86 87 AAAAAAAAHFAAAAAA 1452824.0 1427.0 30 2449404.0 2449374.0 Dr. Kevin White N 2.0 7.0 1934.0 BENIN NaN Kevin.White@x9oTPjEI6AdDQ7n4l.edu 2452492.0
87 88 AAAAAAAAIFAAAAAA 495575.0 131.0 687 2450991.0 2450961.0 Dr. Phyllis Horner N 20.0 8.0 1965.0 UZBEKISTAN NaN Phyllis.Horner@uQy.edu 2452403.0
88 89 AAAAAAAAJFAAAAAA 694848.0 5383.0 318 2451425.0 2451395.0 Mrs. Helen Macdonald Y 15.0 3.0 1981.0 DOMINICA NaN Helen.Macdonald@3d4.com 2452626.0
89 90 AAAAAAAAKFAAAAAA 417827.0 5083.0 139 2451494.0 2451464.0 Mr. Nathan Pond Y 7.0 5.0 1985.0 GUYANA NaN Nathan.Pond@nPh7drM687MhI.org 2452637.0
90 91 AAAAAAAALFAAAAAA 827176.0 2441.0 906 2450406.0 2450376.0 Miss Heather White Y 28.0 3.0 1962.0 MARTINIQUE NaN Heather.White@3JitjmxYQnXAtCNAl.com 2452295.0
91 92 AAAAAAAAMFAAAAAA 953084.0 5771.0 211 2452582.0 2452552.0 Miss Crystal Ryan Y 8.0 2.0 1973.0 ECUADOR NaN Crystal.Ryan@Ju2rO6u.com 2452294.0
92 93 AAAAAAAANFAAAAAA 647375.0 6229.0 836 2449341.0 2449311.0 Sir Clyde Williams N 6.0 10.0 1927.0 FRENCH POLYNESIA NaN Clyde.Williams@en.com 2452510.0
93 94 AAAAAAAAOFAAAAAA 451893.0 1990.0 287 2449553.0 2449523.0 Mr. Craig Byrd Y 14.0 5.0 1982.0 FRENCH POLYNESIA NaN Craig.Byrd@Dc0OEMXkvvuJ.com 2452445.0
94 95 AAAAAAAAPFAAAAAA 796503.0 1663.0 23 2452468.0 2452438.0 Ms. Elizabeth Hollingsworth N 17.0 4.0 1943.0 GREECE NaN Elizabeth.Hollingsworth@lVpeDS5Rcs.com 2452584.0
95 96 AAAAAAAAAGAAAAAA 1148074.0 6019.0 611 2451505.0 2451475.0 Sir Shaun Lewis N 22.0 10.0 1955.0 NIGERIA NaN Shaun.Lewis@MTRUPYFTXf9.com 2452395.0
96 97 AAAAAAAABGAAAAAA 418763.0 102.0 41 2452467.0 2452437.0 Mr. Stewart Ruffin Y 19.0 5.0 1971.0 MYANMAR NaN Stewart.Ruffin@R7Mrx.edu 2452528.0
97 98 AAAAAAAACGAAAAAA 574977.0 1615.0 853 2450894.0 2450864.0 Dr. David Lewis N 23.0 6.0 1965.0 KIRIBATI NaN David.Lewis@5mhvq.org 2452558.0
98 99 AAAAAAAADGAAAAAA 622676.0 2152.0 228 2451687.0 2451657.0 Sir Austin Tran Y 9.0 12.0 1961.0 NAMIBIA NaN Austin.Tran@ect7cnjLsucbd.edu 2452437.0

customer_address (first 100 rows)

CA_ADDRESS_SK CA_ADDRESS_ID CA_STREET_NUMBER CA_STREET_NAME CA_STREET_TYPE CA_SUITE_NUMBER CA_CITY CA_COUNTY CA_STATE CA_ZIP CA_COUNTRY CA_GMT_OFFSET CA_LOCATION_TYPE
0 1 AAAAAAAABAAAAAAA 18.0 Jackson Parkway Suite 280 Fairfield Maricopa County AZ 86192.0 United States -7.0 condo
1 2 AAAAAAAACAAAAAAA 362.0 Washington 6th RD Suite 80 Fairview Taos County NM 85709.0 United States -7.0 condo
2 3 AAAAAAAADAAAAAAA 585.0 Dogwood Washington Circle Suite Q Pleasant Valley York County PA 12477.0 United States -5.0 single family
3 4 AAAAAAAAEAAAAAAA 111.0 Smith Wy Suite A Oak Ridge Kit Carson County CO 88371.0 United States -7.0 condo
4 5 AAAAAAAAFAAAAAAA 31.0 College Blvd Suite 180 Glendale Barry County MO 63951.0 United States -6.0 single family
5 6 AAAAAAAAGAAAAAAA 59.0 Williams Sixth Parkway Suite 100 Lakeview Chelan County WA 98579.0 United States -8.0 single family
6 7 AAAAAAAAHAAAAAAA NaN Hill 7th Road Suite U Farmington None None 39145.0 United States NaN None
7 8 AAAAAAAAIAAAAAAA 875.0 Lincoln Ct. Suite Y Union Bledsoe County TN 38721.0 United States -5.0 apartment
8 9 AAAAAAAAJAAAAAAA 819.0 1st Laurel Ave Suite 70 New Hope Perry County AL 39431.0 United States -6.0 condo
9 10 AAAAAAAAKAAAAAAA 851.0 Woodland Poplar ST Suite Y Martinsville Haines Borough AK 90419.0 United States -9.0 condo
10 11 AAAAAAAALAAAAAAA 189.0 13th 2nd Street Suite 470 Maple Grove Madison County MT 68252.0 United States -7.0 single family
11 12 AAAAAAAAMAAAAAAA 76.0 Ash 8th Ct. Suite O Edgewood Mifflin County PA 10069.0 United States -5.0 apartment
12 13 AAAAAAAANAAAAAAA 424.0 Main Second Ln Suite 130 Greenville Noxubee County MS 51387.0 United States -6.0 single family
13 14 AAAAAAAAOAAAAAAA 923.0 Pine Oak Dr. Suite 100 None Lipscomb County TX 77752.0 None -6.0 None
14 15 AAAAAAAAPAAAAAAA 314.0 Spring Ct. Suite B Oakland Washington County OH 49843.0 United States -5.0 apartment
15 16 AAAAAAAAABAAAAAA 576.0 Adams Center Street Suite J Valley View Oldham County TX 75124.0 United States -6.0 condo
16 17 AAAAAAAABBAAAAAA 801.0 Green Dr. Suite 0 Montpelier Richland County OH 48930.0 United States -5.0 single family
17 18 AAAAAAAACBAAAAAA 460.0 Maple Spruce Court Suite 480 Somerville Potter County SD 57783.0 United States -7.0 condo
18 19 AAAAAAAADBAAAAAA 611.0 Wilson Way Suite O Oakdale Tangipahoa Parish LA 79584.0 United States -6.0 apartment
19 20 AAAAAAAAEBAAAAAA 675.0 Elm Wilson Street Suite I Hopewell Williams County OH 40587.0 United States -5.0 condo
20 21 AAAAAAAAFBAAAAAA 294.0 Jefferson Smith Ave Suite 390 Springfield Marshall County SD 59303.0 United States -7.0 condo
21 22 AAAAAAAAGBAAAAAA 874.0 Park Second Avenue Suite N Green Acres Perkins County NE 67683.0 United States -7.0 single family
22 23 AAAAAAAAHBAAAAAA 230.0 6th Spring Drive Suite U Newtown Jewell County KS 61749.0 United States -6.0 single family
23 24 AAAAAAAAIBAAAAAA 837.0 4th Street Suite 200 Fairfield Marin County CA 96192.0 United States -8.0 single family
24 25 AAAAAAAAJBAAAAAA 986.0 West East Blvd Suite F Pleasant Grove Coweta County GA 34136.0 United States -5.0 apartment
25 26 AAAAAAAAKBAAAAAA 809.0 Central None None Springdale Forsyth County None 28883.0 None -5.0 None
26 27 AAAAAAAALBAAAAAA 649.0 Williams Ct. Suite 400 Cedar Utah County UT 81229.0 United States -7.0 condo
27 28 AAAAAAAAMBAAAAAA 992.0 Birch Avenue Suite N Oak Hill Montrose County CO 87838.0 United States -7.0 condo
28 29 AAAAAAAANBAAAAAA 572.0 First Elevnth Pkwy Suite 160 Newport Richland County IL 61521.0 United States -6.0 single family
29 30 AAAAAAAAOBAAAAAA 748.0 Oak Avenue Suite M Wildwood Clark County MO 66871.0 United States -6.0 apartment
30 31 AAAAAAAAPBAAAAAA 291.0 East Lane Suite A Forestville Walworth County SD 53027.0 United States -7.0 condo
31 32 AAAAAAAAACAAAAAA 243.0 8th Lake Wy Suite G Oakland Madison County NC 29843.0 United States -5.0 condo
32 33 AAAAAAAABCAAAAAA 711.0 3rd 4th Ave Suite 10 Pine Grove Sumter County GA 34593.0 United States -5.0 apartment
33 34 AAAAAAAACCAAAAAA 785.0 1st Cedar Ave Suite 40 Greenville Russell County VA 21387.0 United States -5.0 condo
34 35 AAAAAAAADCAAAAAA 814.0 Washington Main Drive Suite C Waterloo Henry County VA 21675.0 United States -5.0 single family
35 36 AAAAAAAAECAAAAAA 648.0 South 15th Court Suite 410 Lakeview Lewis County TN 38579.0 United States -6.0 condo
36 37 AAAAAAAAFCAAAAAA 999.0 4th Ct. Suite 250 Sumner Greenville County SC 20519.0 United States -5.0 single family
37 38 AAAAAAAAGCAAAAAA 912.0 Second Hickory Drive Suite 190 Plainview Baca County CO 83683.0 United States -7.0 condo
38 39 AAAAAAAAHCAAAAAA 13.0 10th Ct. Suite 280 Hamilton Lee County IA 52808.0 United States -6.0 apartment
39 40 AAAAAAAAICAAAAAA 369.0 2nd Maple Pkwy Suite H Bridgeport Ferry County WA 95817.0 United States -8.0 single family
40 41 AAAAAAAAJCAAAAAA 198.0 Washington RD Suite S Oakland Ouray County CO 89843.0 United States -7.0 apartment
41 42 AAAAAAAAKCAAAAAA 884.0 Oak Court Suite F Riverside Scott County MS 59231.0 United States -6.0 single family
42 43 AAAAAAAALCAAAAAA 762.0 Spring Dr. Suite F Sulphur Springs Jefferson County IL 68354.0 United States -6.0 condo
43 44 AAAAAAAAMCAAAAAA NaN None None Suite 490 None O-Brien County None 58721.0 United States -6.0 None
44 45 AAAAAAAANCAAAAAA 206.0 4th Street Suite 120 Union Washington County ME 9321.0 United States -5.0 apartment
45 46 AAAAAAAAOCAAAAAA 995.0 Oak Boulevard Suite 120 Union Hill Forrest County MS 57746.0 United States -6.0 single family
46 47 AAAAAAAAPCAAAAAA 776.0 Washington View Wy Suite 60 Pleasant Grove Mercer County KY 44136.0 United States -5.0 apartment
47 48 AAAAAAAAADAAAAAA 895.0 Valley Lane Suite 480 Salem James City County VA 28048.0 United States -5.0 condo
48 49 AAAAAAAABDAAAAAA 583.0 Highland 2nd Street Suite 90 Fairfield York County ME 6792.0 United States -5.0 apartment
49 50 AAAAAAAACDAAAAAA 190.0 7th Wy Suite D Enterprise Gray County KS 61757.0 United States -6.0 single family
50 51 AAAAAAAADDAAAAAA 845.0 5th Pkwy Suite F Green Acres Hamblen County TN 37683.0 United States -5.0 single family
51 52 AAAAAAAAEDAAAAAA 472.0 Ridge Park ST Suite 60 Oakdale Muskingum County OH 49584.0 United States -5.0 single family
52 53 AAAAAAAAFDAAAAAA 884.0 College Franklin Boulevard Suite 440 Riverview McPherson County SD 59003.0 United States -7.0 single family
53 54 AAAAAAAAGDAAAAAA 857.0 10th 10th Boulevard Suite V Oak Hill Martin County NC 27838.0 United States -5.0 single family
54 55 AAAAAAAAHDAAAAAA 177.0 Lee Adams Way Suite S Ashland Macomb County MI 44244.0 United States -5.0 condo
55 56 AAAAAAAAIDAAAAAA 49.0 Valley 14th Wy Suite V Woodland Goodhue County MN 54854.0 United States -6.0 condo
56 57 AAAAAAAAJDAAAAAA 625.0 10th Oak RD Suite J Enterprise Bottineau County ND 51757.0 United States -6.0 single family
57 58 AAAAAAAAKDAAAAAA 917.0 Miller 15th Parkway Suite 230 Union Hill Canyon County ID 87746.0 United States -7.0 single family
58 59 AAAAAAAALDAAAAAA NaN None Court None Newtown Valley County MT NaN United States -7.0 condo
59 60 AAAAAAAAMDAAAAAA NaN Lee None None Forest Hills Green County KY 49237.0 None NaN apartment
60 61 AAAAAAAANDAAAAAA 159.0 Ridge Boulevard Suite 20 Sulphur Springs Laurel County KY 48354.0 United States -5.0 single family
61 62 AAAAAAAAODAAAAAA 925.0 Lincoln Lane Suite 90 Riverdale Lewis County WV 29391.0 United States -5.0 condo
62 63 AAAAAAAAPDAAAAAA 416.0 Elevnth Green Drive Suite A Midway Jewell County KS 61904.0 United States -6.0 single family
63 64 AAAAAAAAAEAAAAAA 546.0 Meadow Circle Suite 90 Macedonia Trousdale County TN 31087.0 United States -6.0 apartment
64 65 AAAAAAAABEAAAAAA 147.0 Fourth Lake RD Suite 460 Bethel Iowa County IA 55281.0 United States -6.0 single family
65 66 AAAAAAAACEAAAAAA 238.0 Pine Road Suite 470 Crossroads Sioux County NE 60534.0 United States -7.0 single family
66 67 AAAAAAAADEAAAAAA 896.0 11th Street Suite B Flint Van Buren County IA 58909.0 United States -6.0 single family
67 68 AAAAAAAAEEAAAAAA 240.0 Laurel Forest Street Suite H Summit Bledsoe County TN 30499.0 United States -5.0 single family
68 69 AAAAAAAAFEAAAAAA 37.0 Pine Drive Suite H Glendale Scott County KY 43951.0 United States -5.0 single family
69 70 AAAAAAAAGEAAAAAA 511.0 14th Sycamore Parkway Suite 210 White Oak Union County OH 46668.0 United States -5.0 condo
70 71 AAAAAAAAHEAAAAAA 38.0 Ridge Cir. Suite 370 Lakeview Nottoway County VA 28579.0 United States -5.0 apartment
71 72 AAAAAAAAIEAAAAAA 982.0 Willow Blvd Suite 20 Richville Cascade County MT 65945.0 United States -7.0 single family
72 73 AAAAAAAAJEAAAAAA 158.0 Green Broadway Road Suite B Cedar Grove Kingman County KS 60411.0 United States -6.0 apartment
73 74 AAAAAAAAKEAAAAAA 723.0 Sycamore Boulevard Suite C Spring Hill Wapello County IA 56787.0 United States -6.0 condo
74 75 AAAAAAAALEAAAAAA 32.0 Pine Wy Suite 480 Valley View Cleburne County AL 35124.0 United States -6.0 single family
75 76 AAAAAAAAMEAAAAAA 257.0 Walnut South Drive Suite 420 Shiloh Menominee County MI 49275.0 United States -5.0 single family
76 77 AAAAAAAANEAAAAAA 151.0 Hill Wy Suite U Oak Grove Thomas County GA 38370.0 United States -5.0 single family
77 78 AAAAAAAAOEAAAAAA 857.0 Railroad Boulevard Suite 140 Green Acres Potter County SD 57683.0 United States -7.0 single family
78 79 AAAAAAAAPEAAAAAA 409.0 Park 7th Cir. Suite U Farmington Wayne County TN 39145.0 United States -6.0 condo
79 80 AAAAAAAAAFAAAAAA 298.0 12th Way Suite J Oakland Grant County KY 49843.0 United States -6.0 condo
80 81 AAAAAAAABFAAAAAA 953.0 River Spruce Pkwy Suite 0 Union Hill Brown County TX 77746.0 United States -6.0 condo
81 82 AAAAAAAACFAAAAAA 97.0 River Main Ln Suite L Buena Vista Santa Clara County CA 95752.0 United States -8.0 single family
82 83 AAAAAAAADFAAAAAA 410.0 Spring Poplar Drive Suite 20 Bethel Nueces County TX 75281.0 United States -6.0 condo
83 84 AAAAAAAAEFAAAAAA 886.0 Sunset Circle Suite T Warwick Itawamba County MS 51398.0 United States -6.0 apartment
84 85 AAAAAAAAFFAAAAAA 476.0 Willow Avenue Suite R Five Points Crawford County PA 16098.0 United States -5.0 single family
85 86 AAAAAAAAGFAAAAAA 699.0 11th 14th ST Suite O Five Points Pike County KY 46098.0 United States -5.0 single family
86 87 AAAAAAAAHFAAAAAA NaN 6th Lane None Maple Grove Claiborne County None 58252.0 None NaN apartment
87 88 AAAAAAAAIFAAAAAA 104.0 9th RD Suite W Frogtown Bay County MI 48784.0 United States -5.0 single family
88 89 AAAAAAAAJFAAAAAA 440.0 Church 7th Ave Suite 200 Lakeside Solano County CA 99532.0 United States -8.0 apartment
89 90 AAAAAAAAKFAAAAAA 892.0 North East Drive Suite U Centerville Hettinger County ND 50059.0 United States -6.0 condo
90 91 AAAAAAAALFAAAAAA 936.0 None Wy None Riverside Murray County None NaN United States NaN None
91 92 AAAAAAAAMFAAAAAA 734.0 Ash Wilson Boulevard Suite V Newtown Boise County ID 81749.0 United States -7.0 condo
92 93 AAAAAAAANFAAAAAA 755.0 Washington Sunset RD Suite Q Walnut Grove Greenup County KY 47752.0 United States -6.0 apartment
93 94 AAAAAAAAOFAAAAAA NaN None None None Lakeside Washington County GA NaN None NaN None
94 95 AAAAAAAAPFAAAAAA 571.0 Hickory River Ln Suite M Woodland Thayer County NE 64854.0 United States -7.0 condo
95 96 AAAAAAAAAGAAAAAA 246.0 Cedar Franklin RD Suite A Oakdale Fulton County KY 49584.0 United States -6.0 condo
96 97 AAAAAAAABGAAAAAA 858.0 Sunset Main Way Suite 320 Enterprise Hardin County TX 71757.0 United States -6.0 single family
97 98 AAAAAAAACGAAAAAA 346.0 Walnut Road Suite 370 Spring Hill Labette County KS 66787.0 United States -6.0 condo
98 99 AAAAAAAADGAAAAAA 222.0 Park View Drive Suite U Wilson Dickinson County MI 46971.0 United States -5.0 apartment

customer_demographics (first 100 rows)

CD_DEMO_SK CD_GENDER CD_MARITAL_STATUS CD_EDUCATION_STATUS CD_PURCHASE_ESTIMATE CD_CREDIT_RATING CD_DEP_COUNT CD_DEP_EMPLOYED_COUNT CD_DEP_COLLEGE_COUNT
0 1 M M Primary 500 Good 0 0 0
1 2 F M Primary 500 Good 0 0 0
2 3 M S Primary 500 Good 0 0 0
3 4 F S Primary 500 Good 0 0 0
4 5 M D Primary 500 Good 0 0 0
5 6 F D Primary 500 Good 0 0 0
6 7 M W Primary 500 Good 0 0 0
7 8 F W Primary 500 Good 0 0 0
8 9 M U Primary 500 Good 0 0 0
9 10 F U Primary 500 Good 0 0 0
10 11 M M Secondary 500 Good 0 0 0
11 12 F M Secondary 500 Good 0 0 0
12 13 M S Secondary 500 Good 0 0 0
13 14 F S Secondary 500 Good 0 0 0
14 15 M D Secondary 500 Good 0 0 0
15 16 F D Secondary 500 Good 0 0 0
16 17 M W Secondary 500 Good 0 0 0
17 18 F W Secondary 500 Good 0 0 0
18 19 M U Secondary 500 Good 0 0 0
19 20 F U Secondary 500 Good 0 0 0
20 21 M M College 500 Good 0 0 0
21 22 F M College 500 Good 0 0 0
22 23 M S College 500 Good 0 0 0
23 24 F S College 500 Good 0 0 0
24 25 M D College 500 Good 0 0 0
25 26 F D College 500 Good 0 0 0
26 27 M W College 500 Good 0 0 0
27 28 F W College 500 Good 0 0 0
28 29 M U College 500 Good 0 0 0
29 30 F U College 500 Good 0 0 0
30 31 M M 2 yr Degree 500 Good 0 0 0
31 32 F M 2 yr Degree 500 Good 0 0 0
32 33 M S 2 yr Degree 500 Good 0 0 0
33 34 F S 2 yr Degree 500 Good 0 0 0
34 35 M D 2 yr Degree 500 Good 0 0 0
35 36 F D 2 yr Degree 500 Good 0 0 0
36 37 M W 2 yr Degree 500 Good 0 0 0
37 38 F W 2 yr Degree 500 Good 0 0 0
38 39 M U 2 yr Degree 500 Good 0 0 0
39 40 F U 2 yr Degree 500 Good 0 0 0
40 41 M M 4 yr Degree 500 Good 0 0 0
41 42 F M 4 yr Degree 500 Good 0 0 0
42 43 M S 4 yr Degree 500 Good 0 0 0
43 44 F S 4 yr Degree 500 Good 0 0 0
44 45 M D 4 yr Degree 500 Good 0 0 0
45 46 F D 4 yr Degree 500 Good 0 0 0
46 47 M W 4 yr Degree 500 Good 0 0 0
47 48 F W 4 yr Degree 500 Good 0 0 0
48 49 M U 4 yr Degree 500 Good 0 0 0
49 50 F U 4 yr Degree 500 Good 0 0 0
50 51 M M Advanced Degree 500 Good 0 0 0
51 52 F M Advanced Degree 500 Good 0 0 0
52 53 M S Advanced Degree 500 Good 0 0 0
53 54 F S Advanced Degree 500 Good 0 0 0
54 55 M D Advanced Degree 500 Good 0 0 0
55 56 F D Advanced Degree 500 Good 0 0 0
56 57 M W Advanced Degree 500 Good 0 0 0
57 58 F W Advanced Degree 500 Good 0 0 0
58 59 M U Advanced Degree 500 Good 0 0 0
59 60 F U Advanced Degree 500 Good 0 0 0
60 61 M M Unknown 500 Good 0 0 0
61 62 F M Unknown 500 Good 0 0 0
62 63 M S Unknown 500 Good 0 0 0
63 64 F S Unknown 500 Good 0 0 0
64 65 M D Unknown 500 Good 0 0 0
65 66 F D Unknown 500 Good 0 0 0
66 67 M W Unknown 500 Good 0 0 0
67 68 F W Unknown 500 Good 0 0 0
68 69 M U Unknown 500 Good 0 0 0
69 70 F U Unknown 500 Good 0 0 0
70 71 M M Primary 1000 Good 0 0 0
71 72 F M Primary 1000 Good 0 0 0
72 73 M S Primary 1000 Good 0 0 0
73 74 F S Primary 1000 Good 0 0 0
74 75 M D Primary 1000 Good 0 0 0
75 76 F D Primary 1000 Good 0 0 0
76 77 M W Primary 1000 Good 0 0 0
77 78 F W Primary 1000 Good 0 0 0
78 79 M U Primary 1000 Good 0 0 0
79 80 F U Primary 1000 Good 0 0 0
80 81 M M Secondary 1000 Good 0 0 0
81 82 F M Secondary 1000 Good 0 0 0
82 83 M S Secondary 1000 Good 0 0 0
83 84 F S Secondary 1000 Good 0 0 0
84 85 M D Secondary 1000 Good 0 0 0
85 86 F D Secondary 1000 Good 0 0 0
86 87 M W Secondary 1000 Good 0 0 0
87 88 F W Secondary 1000 Good 0 0 0
88 89 M U Secondary 1000 Good 0 0 0
89 90 F U Secondary 1000 Good 0 0 0
90 91 M M College 1000 Good 0 0 0
91 92 F M College 1000 Good 0 0 0
92 93 M S College 1000 Good 0 0 0
93 94 F S College 1000 Good 0 0 0
94 95 M D College 1000 Good 0 0 0
95 96 F D College 1000 Good 0 0 0
96 97 M W College 1000 Good 0 0 0
97 98 F W College 1000 Good 0 0 0
98 99 M U College 1000 Good 0 0 0

date_dim (first 100 rows)

D_DATE_SK D_DATE_ID D_DATE D_MONTH_SEQ D_WEEK_SEQ D_QUARTER_SEQ D_YEAR D_DOW D_MOY D_DOM D_QOY D_FY_YEAR D_FY_QUARTER_SEQ D_FY_WEEK_SEQ D_DAY_NAME D_QUARTER_NAME D_HOLIDAY D_WEEKEND D_FOLLOWING_HOLIDAY D_FIRST_DOM D_LAST_DOM D_SAME_DAY_LY D_SAME_DAY_LQ D_CURRENT_DAY D_CURRENT_WEEK D_CURRENT_MONTH D_CURRENT_QUARTER D_CURRENT_YEAR
0 2415022 AAAAAAAAOKJNECAA 1900-01-02 0 1 1 1900 1 1 2 1 1900 1 1 Monday 1900Q1 N N Y 2415021 2415020 2414657 2414930 N N N N N
1 2415023 AAAAAAAAPKJNECAA 1900-01-03 0 1 1 1900 2 1 3 1 1900 1 1 Tuesday 1900Q1 N N N 2415021 2415020 2414658 2414931 N N N N N
2 2415024 AAAAAAAAALJNECAA 1900-01-04 0 1 1 1900 3 1 4 1 1900 1 1 Wednesday 1900Q1 N N N 2415021 2415020 2414659 2414932 N N N N N
3 2415025 AAAAAAAABLJNECAA 1900-01-05 0 1 1 1900 4 1 5 1 1900 1 1 Thursday 1900Q1 N N N 2415021 2415020 2414660 2414933 N N N N N
4 2415026 AAAAAAAACLJNECAA 1900-01-06 0 1 1 1900 5 1 6 1 1900 1 1 Friday 1900Q1 N Y N 2415021 2415020 2414661 2414934 N N N N N
5 2415027 AAAAAAAADLJNECAA 1900-01-07 0 1 1 1900 6 1 7 1 1900 1 1 Saturday 1900Q1 N Y N 2415021 2415020 2414662 2414935 N N N N N
6 2415028 AAAAAAAAELJNECAA 1900-01-08 0 1 1 1900 0 1 8 1 1900 1 1 Sunday 1900Q1 N N N 2415021 2415020 2414663 2414936 N N N N N
7 2415029 AAAAAAAAFLJNECAA 1900-01-09 0 2 1 1900 1 1 9 1 1900 1 2 Monday 1900Q1 N N N 2415021 2415020 2414664 2414937 N N N N N
8 2415030 AAAAAAAAGLJNECAA 1900-01-10 0 2 1 1900 2 1 10 1 1900 1 2 Tuesday 1900Q1 N N N 2415021 2415020 2414665 2414938 N N N N N
9 2415031 AAAAAAAAHLJNECAA 1900-01-11 0 2 1 1900 3 1 11 1 1900 1 2 Wednesday 1900Q1 N N N 2415021 2415020 2414666 2414939 N N N N N
10 2415032 AAAAAAAAILJNECAA 1900-01-12 0 2 1 1900 4 1 12 1 1900 1 2 Thursday 1900Q1 N N N 2415021 2415020 2414667 2414940 N N N N N
11 2415033 AAAAAAAAJLJNECAA 1900-01-13 0 2 1 1900 5 1 13 1 1900 1 2 Friday 1900Q1 N Y N 2415021 2415020 2414668 2414941 N N N N N
12 2415034 AAAAAAAAKLJNECAA 1900-01-14 0 2 1 1900 6 1 14 1 1900 1 2 Saturday 1900Q1 N Y N 2415021 2415020 2414669 2414942 N N N N N
13 2415035 AAAAAAAALLJNECAA 1900-01-15 0 2 1 1900 0 1 15 1 1900 1 2 Sunday 1900Q1 N N N 2415021 2415020 2414670 2414943 N N N N N
14 2415036 AAAAAAAAMLJNECAA 1900-01-16 0 3 1 1900 1 1 16 1 1900 1 3 Monday 1900Q1 N N N 2415021 2415020 2414671 2414944 N N N N N
15 2415037 AAAAAAAANLJNECAA 1900-01-17 0 3 1 1900 2 1 17 1 1900 1 3 Tuesday 1900Q1 N N N 2415021 2415020 2414672 2414945 N N N N N
16 2415038 AAAAAAAAOLJNECAA 1900-01-18 0 3 1 1900 3 1 18 1 1900 1 3 Wednesday 1900Q1 N N N 2415021 2415020 2414673 2414946 N N N N N
17 2415039 AAAAAAAAPLJNECAA 1900-01-19 0 3 1 1900 4 1 19 1 1900 1 3 Thursday 1900Q1 N N N 2415021 2415020 2414674 2414947 N N N N N
18 2415040 AAAAAAAAAMJNECAA 1900-01-20 0 3 1 1900 5 1 20 1 1900 1 3 Friday 1900Q1 N Y N 2415021 2415020 2414675 2414948 N N N N N
19 2415041 AAAAAAAABMJNECAA 1900-01-21 0 3 1 1900 6 1 21 1 1900 1 3 Saturday 1900Q1 N Y N 2415021 2415020 2414676 2414949 N N N N N
20 2415042 AAAAAAAACMJNECAA 1900-01-22 0 3 1 1900 0 1 22 1 1900 1 3 Sunday 1900Q1 N N N 2415021 2415020 2414677 2414950 N N N N N
21 2415043 AAAAAAAADMJNECAA 1900-01-23 0 4 1 1900 1 1 23 1 1900 1 4 Monday 1900Q1 N N N 2415021 2415020 2414678 2414951 N N N N N
22 2415044 AAAAAAAAEMJNECAA 1900-01-24 0 4 1 1900 2 1 24 1 1900 1 4 Tuesday 1900Q1 N N N 2415021 2415020 2414679 2414952 N N N N N
23 2415045 AAAAAAAAFMJNECAA 1900-01-25 0 4 1 1900 3 1 25 1 1900 1 4 Wednesday 1900Q1 N N N 2415021 2415020 2414680 2414953 N N N N N
24 2415046 AAAAAAAAGMJNECAA 1900-01-26 0 4 1 1900 4 1 26 1 1900 1 4 Thursday 1900Q1 N N N 2415021 2415020 2414681 2414954 N N N N N
25 2415047 AAAAAAAAHMJNECAA 1900-01-27 0 4 1 1900 5 1 27 1 1900 1 4 Friday 1900Q1 N Y N 2415021 2415020 2414682 2414955 N N N N N
26 2415048 AAAAAAAAIMJNECAA 1900-01-28 0 4 1 1900 6 1 28 1 1900 1 4 Saturday 1900Q1 N Y N 2415021 2415020 2414683 2414956 N N N N N
27 2415049 AAAAAAAAJMJNECAA 1900-01-29 0 4 1 1900 0 1 29 1 1900 1 4 Sunday 1900Q1 N N N 2415021 2415020 2414684 2414957 N N N N N
28 2415050 AAAAAAAAKMJNECAA 1900-01-30 0 5 1 1900 1 1 30 1 1900 1 5 Monday 1900Q1 N N N 2415021 2415020 2414685 2414958 N N N N N
29 2415051 AAAAAAAALMJNECAA 1900-01-31 0 5 1 1900 2 1 31 1 1900 1 5 Tuesday 1900Q1 N N N 2415021 2415020 2414686 2414959 N N N N N
30 2415052 AAAAAAAAMMJNECAA 1900-02-01 1 5 1 1900 3 2 1 1 1900 1 5 Wednesday 1900Q1 N N N 2415052 2415082 2414687 2414960 N N N N N
31 2415053 AAAAAAAANMJNECAA 1900-02-02 1 5 1 1900 4 2 2 1 1900 1 5 Thursday 1900Q1 N N N 2415052 2415082 2414688 2414961 N N N N N
32 2415054 AAAAAAAAOMJNECAA 1900-02-03 1 5 1 1900 5 2 3 1 1900 1 5 Friday 1900Q1 N Y N 2415052 2415082 2414689 2414962 N N N N N
33 2415055 AAAAAAAAPMJNECAA 1900-02-04 1 5 1 1900 6 2 4 1 1900 1 5 Saturday 1900Q1 N Y N 2415052 2415082 2414690 2414963 N N N N N
34 2415056 AAAAAAAAANJNECAA 1900-02-05 1 5 1 1900 0 2 5 1 1900 1 5 Sunday 1900Q1 N N N 2415052 2415082 2414691 2414964 N N N N N
35 2415057 AAAAAAAABNJNECAA 1900-02-06 1 6 1 1900 1 2 6 1 1900 1 6 Monday 1900Q1 N N N 2415052 2415082 2414692 2414965 N N N N N
36 2415058 AAAAAAAACNJNECAA 1900-02-07 1 6 1 1900 2 2 7 1 1900 1 6 Tuesday 1900Q1 N N N 2415052 2415082 2414693 2414966 N N N N N
37 2415059 AAAAAAAADNJNECAA 1900-02-08 1 6 1 1900 3 2 8 1 1900 1 6 Wednesday 1900Q1 N N N 2415052 2415082 2414694 2414967 N N N N N
38 2415060 AAAAAAAAENJNECAA 1900-02-09 1 6 1 1900 4 2 9 1 1900 1 6 Thursday 1900Q1 N N N 2415052 2415082 2414695 2414968 N N N N N
39 2415061 AAAAAAAAFNJNECAA 1900-02-10 1 6 1 1900 5 2 10 1 1900 1 6 Friday 1900Q1 N Y N 2415052 2415082 2414696 2414969 N N N N N
40 2415062 AAAAAAAAGNJNECAA 1900-02-11 1 6 1 1900 6 2 11 1 1900 1 6 Saturday 1900Q1 N Y N 2415052 2415082 2414697 2414970 N N N N N
41 2415063 AAAAAAAAHNJNECAA 1900-02-12 1 6 1 1900 0 2 12 1 1900 1 6 Sunday 1900Q1 N N N 2415052 2415082 2414698 2414971 N N N N N
42 2415064 AAAAAAAAINJNECAA 1900-02-13 1 7 1 1900 1 2 13 1 1900 1 7 Monday 1900Q1 N N N 2415052 2415082 2414699 2414972 N N N N N
43 2415065 AAAAAAAAJNJNECAA 1900-02-14 1 7 1 1900 2 2 14 1 1900 1 7 Tuesday 1900Q1 N N N 2415052 2415082 2414700 2414973 N N N N N
44 2415066 AAAAAAAAKNJNECAA 1900-02-15 1 7 1 1900 3 2 15 1 1900 1 7 Wednesday 1900Q1 N N N 2415052 2415082 2414701 2414974 N N N N N
45 2415067 AAAAAAAALNJNECAA 1900-02-16 1 7 1 1900 4 2 16 1 1900 1 7 Thursday 1900Q1 N N N 2415052 2415082 2414702 2414975 N N N N N
46 2415068 AAAAAAAAMNJNECAA 1900-02-17 1 7 1 1900 5 2 17 1 1900 1 7 Friday 1900Q1 N Y N 2415052 2415082 2414703 2414976 N N N N N
47 2415069 AAAAAAAANNJNECAA 1900-02-18 1 7 1 1900 6 2 18 1 1900 1 7 Saturday 1900Q1 N Y N 2415052 2415082 2414704 2414977 N N N N N
48 2415070 AAAAAAAAONJNECAA 1900-02-19 1 7 1 1900 0 2 19 1 1900 1 7 Sunday 1900Q1 N N N 2415052 2415082 2414705 2414978 N N N N N
49 2415071 AAAAAAAAPNJNECAA 1900-02-20 1 8 1 1900 1 2 20 1 1900 1 8 Monday 1900Q1 N N N 2415052 2415082 2414706 2414979 N N N N N
50 2415072 AAAAAAAAAOJNECAA 1900-02-21 1 8 1 1900 2 2 21 1 1900 1 8 Tuesday 1900Q1 N N N 2415052 2415082 2414707 2414980 N N N N N
51 2415073 AAAAAAAABOJNECAA 1900-02-22 1 8 1 1900 3 2 22 1 1900 1 8 Wednesday 1900Q1 N N N 2415052 2415082 2414708 2414981 N N N N N
52 2415074 AAAAAAAACOJNECAA 1900-02-23 1 8 1 1900 4 2 23 1 1900 1 8 Thursday 1900Q1 N N N 2415052 2415082 2414709 2414982 N N N N N
53 2415075 AAAAAAAADOJNECAA 1900-02-24 1 8 1 1900 5 2 24 1 1900 1 8 Friday 1900Q1 N Y N 2415052 2415082 2414710 2414983 N N N N N
54 2415076 AAAAAAAAEOJNECAA 1900-02-25 1 8 1 1900 6 2 25 1 1900 1 8 Saturday 1900Q1 N Y N 2415052 2415082 2414711 2414984 N N N N N
55 2415077 AAAAAAAAFOJNECAA 1900-02-26 1 8 1 1900 0 2 26 1 1900 1 8 Sunday 1900Q1 N N N 2415052 2415082 2414712 2414985 N N N N N
56 2415078 AAAAAAAAGOJNECAA 1900-02-27 1 9 1 1900 1 2 27 1 1900 1 9 Monday 1900Q1 N N N 2415052 2415082 2414713 2414986 N N N N N
57 2415079 AAAAAAAAHOJNECAA 1900-02-28 1 9 1 1900 2 2 28 1 1900 1 9 Tuesday 1900Q1 N N N 2415052 2415082 2414714 2414987 N N N N N
58 2415080 AAAAAAAAIOJNECAA 1900-03-01 2 9 2 1900 4 3 1 1 1900 2 9 Thursday 1900Q1 N N N 2415080 2415139 2414715 2414988 N N N N N
59 2415081 AAAAAAAAJOJNECAA 1900-03-02 2 9 2 1900 5 3 2 1 1900 2 9 Friday 1900Q1 N Y N 2415080 2415139 2414716 2414989 N N N N N
60 2415082 AAAAAAAAKOJNECAA 1900-03-03 2 9 2 1900 6 3 3 1 1900 2 9 Saturday 1900Q1 N Y N 2415080 2415139 2414717 2414990 N N N N N
61 2415083 AAAAAAAALOJNECAA 1900-03-04 2 9 2 1900 0 3 4 1 1900 2 9 Sunday 1900Q1 N N N 2415080 2415139 2414718 2414991 N N N N N
62 2415084 AAAAAAAAMOJNECAA 1900-03-05 2 9 2 1900 1 3 5 1 1900 2 9 Monday 1900Q1 N N N 2415080 2415139 2414719 2414992 N N N N N
63 2415085 AAAAAAAANOJNECAA 1900-03-06 2 10 2 1900 2 3 6 1 1900 2 10 Tuesday 1900Q1 N N N 2415080 2415139 2414720 2414993 N N N N N
64 2415086 AAAAAAAAOOJNECAA 1900-03-07 2 10 2 1900 3 3 7 1 1900 2 10 Wednesday 1900Q1 N N N 2415080 2415139 2414721 2414994 N N N N N
65 2415087 AAAAAAAAPOJNECAA 1900-03-08 2 10 2 1900 4 3 8 1 1900 2 10 Thursday 1900Q1 N N N 2415080 2415139 2414722 2414995 N N N N N
66 2415088 AAAAAAAAAPJNECAA 1900-03-09 2 10 2 1900 5 3 9 1 1900 2 10 Friday 1900Q1 N Y N 2415080 2415139 2414723 2414996 N N N N N
67 2415089 AAAAAAAABPJNECAA 1900-03-10 2 10 2 1900 6 3 10 1 1900 2 10 Saturday 1900Q1 N Y N 2415080 2415139 2414724 2414997 N N N N N
68 2415090 AAAAAAAACPJNECAA 1900-03-11 2 10 2 1900 0 3 11 1 1900 2 10 Sunday 1900Q1 N N N 2415080 2415139 2414725 2414998 N N N N N
69 2415091 AAAAAAAADPJNECAA 1900-03-12 2 10 2 1900 1 3 12 1 1900 2 10 Monday 1900Q1 N N N 2415080 2415139 2414726 2414999 N N N N N
70 2415092 AAAAAAAAEPJNECAA 1900-03-13 2 11 2 1900 2 3 13 1 1900 2 11 Tuesday 1900Q1 N N N 2415080 2415139 2414727 2415000 N N N N N
71 2415093 AAAAAAAAFPJNECAA 1900-03-14 2 11 2 1900 3 3 14 1 1900 2 11 Wednesday 1900Q1 N N N 2415080 2415139 2414728 2415001 N N N N N
72 2415094 AAAAAAAAGPJNECAA 1900-03-15 2 11 2 1900 4 3 15 1 1900 2 11 Thursday 1900Q1 N N N 2415080 2415139 2414729 2415002 N N N N N
73 2415095 AAAAAAAAHPJNECAA 1900-03-16 2 11 2 1900 5 3 16 1 1900 2 11 Friday 1900Q1 N Y N 2415080 2415139 2414730 2415003 N N N N N
74 2415096 AAAAAAAAIPJNECAA 1900-03-17 2 11 2 1900 6 3 17 1 1900 2 11 Saturday 1900Q1 N Y N 2415080 2415139 2414731 2415004 N N N N N
75 2415097 AAAAAAAAJPJNECAA 1900-03-18 2 11 2 1900 0 3 18 1 1900 2 11 Sunday 1900Q1 N N N 2415080 2415139 2414732 2415005 N N N N N
76 2415098 AAAAAAAAKPJNECAA 1900-03-19 2 11 2 1900 1 3 19 1 1900 2 11 Monday 1900Q1 N N N 2415080 2415139 2414733 2415006 N N N N N
77 2415099 AAAAAAAALPJNECAA 1900-03-20 2 12 2 1900 2 3 20 1 1900 2 12 Tuesday 1900Q1 N N N 2415080 2415139 2414734 2415007 N N N N N
78 2415100 AAAAAAAAMPJNECAA 1900-03-21 2 12 2 1900 3 3 21 1 1900 2 12 Wednesday 1900Q1 N N N 2415080 2415139 2414735 2415008 N N N N N
79 2415101 AAAAAAAANPJNECAA 1900-03-22 2 12 2 1900 4 3 22 1 1900 2 12 Thursday 1900Q1 N N N 2415080 2415139 2414736 2415009 N N N N N
80 2415102 AAAAAAAAOPJNECAA 1900-03-23 2 12 2 1900 5 3 23 1 1900 2 12 Friday 1900Q1 N Y N 2415080 2415139 2414737 2415010 N N N N N
81 2415103 AAAAAAAAPPJNECAA 1900-03-24 2 12 2 1900 6 3 24 1 1900 2 12 Saturday 1900Q1 N Y N 2415080 2415139 2414738 2415011 N N N N N
82 2415104 AAAAAAAAAAKNECAA 1900-03-25 2 12 2 1900 0 3 25 1 1900 2 12 Sunday 1900Q1 N N N 2415080 2415139 2414739 2415012 N N N N N
83 2415105 AAAAAAAABAKNECAA 1900-03-26 2 12 2 1900 1 3 26 1 1900 2 12 Monday 1900Q1 N N N 2415080 2415139 2414740 2415013 N N N N N
84 2415106 AAAAAAAACAKNECAA 1900-03-27 2 13 2 1900 2 3 27 1 1900 2 13 Tuesday 1900Q1 N N N 2415080 2415139 2414741 2415014 N N N N N
85 2415107 AAAAAAAADAKNECAA 1900-03-28 2 13 2 1900 3 3 28 1 1900 2 13 Wednesday 1900Q1 N N N 2415080 2415139 2414742 2415015 N N N N N
86 2415108 AAAAAAAAEAKNECAA 1900-03-29 2 13 2 1900 4 3 29 1 1900 2 13 Thursday 1900Q1 N N N 2415080 2415139 2414743 2415016 N N N N N
87 2415109 AAAAAAAAFAKNECAA 1900-03-30 2 13 2 1900 5 3 30 1 1900 2 13 Friday 1900Q1 N Y N 2415080 2415139 2414744 2415017 N N N N N
88 2415110 AAAAAAAAGAKNECAA 1900-03-31 2 13 2 1900 6 3 31 1 1900 2 13 Saturday 1900Q1 N Y N 2415080 2415139 2414745 2415018 N N N N N
89 2415111 AAAAAAAAHAKNECAA 1900-04-01 3 13 2 1900 0 4 1 2 1900 2 13 Sunday 1900Q2 N N N 2415111 2415201 2414746 2415021 N N N N N
90 2415112 AAAAAAAAIAKNECAA 1900-04-02 3 13 2 1900 1 4 2 2 1900 2 13 Monday 1900Q2 N N N 2415111 2415201 2414747 2415022 N N N N N
91 2415113 AAAAAAAAJAKNECAA 1900-04-03 3 14 2 1900 2 4 3 2 1900 2 14 Tuesday 1900Q2 N N N 2415111 2415201 2414748 2415023 N N N N N
92 2415114 AAAAAAAAKAKNECAA 1900-04-04 3 14 2 1900 3 4 4 2 1900 2 14 Wednesday 1900Q2 N N N 2415111 2415201 2414749 2415024 N N N N N
93 2415115 AAAAAAAALAKNECAA 1900-04-05 3 14 2 1900 4 4 5 2 1900 2 14 Thursday 1900Q2 N N N 2415111 2415201 2414750 2415025 N N N N N
94 2415116 AAAAAAAAMAKNECAA 1900-04-06 3 14 2 1900 5 4 6 2 1900 2 14 Friday 1900Q2 N Y N 2415111 2415201 2414751 2415026 N N N N N
95 2415117 AAAAAAAANAKNECAA 1900-04-07 3 14 2 1900 6 4 7 2 1900 2 14 Saturday 1900Q2 N Y N 2415111 2415201 2414752 2415027 N N N N N
96 2415118 AAAAAAAAOAKNECAA 1900-04-08 3 14 2 1900 0 4 8 2 1900 2 14 Sunday 1900Q2 N N N 2415111 2415201 2414753 2415028 N N N N N
97 2415119 AAAAAAAAPAKNECAA 1900-04-09 3 14 2 1900 1 4 9 2 1900 2 14 Monday 1900Q2 N N N 2415111 2415201 2414754 2415029 N N N N N
98 2415120 AAAAAAAAABKNECAA 1900-04-10 3 15 2 1900 2 4 10 2 1900 2 15 Tuesday 1900Q2 N N N 2415111 2415201 2414755 2415030 N N N N N

household_demographics (first 100 rows)

HD_DEMO_SK HD_INCOME_BAND_SK HD_BUY_POTENTIAL HD_DEP_COUNT HD_VEHICLE_COUNT
0 1 2 0-500 0 0
1 2 3 0-500 0 0
2 3 4 0-500 0 0
3 4 5 0-500 0 0
4 5 6 0-500 0 0
5 6 7 0-500 0 0
6 7 8 0-500 0 0
7 8 9 0-500 0 0
8 9 10 0-500 0 0
9 10 11 0-500 0 0
10 11 12 0-500 0 0
11 12 13 0-500 0 0
12 13 14 0-500 0 0
13 14 15 0-500 0 0
14 15 16 0-500 0 0
15 16 17 0-500 0 0
16 17 18 0-500 0 0
17 18 19 0-500 0 0
18 19 20 0-500 0 0
19 20 1 501-1000 0 0
20 21 2 501-1000 0 0
21 22 3 501-1000 0 0
22 23 4 501-1000 0 0
23 24 5 501-1000 0 0
24 25 6 501-1000 0 0
25 26 7 501-1000 0 0
26 27 8 501-1000 0 0
27 28 9 501-1000 0 0
28 29 10 501-1000 0 0
29 30 11 501-1000 0 0
30 31 12 501-1000 0 0
31 32 13 501-1000 0 0
32 33 14 501-1000 0 0
33 34 15 501-1000 0 0
34 35 16 501-1000 0 0
35 36 17 501-1000 0 0
36 37 18 501-1000 0 0
37 38 19 501-1000 0 0
38 39 20 501-1000 0 0
39 40 1 1001-5000 0 0
40 41 2 1001-5000 0 0
41 42 3 1001-5000 0 0
42 43 4 1001-5000 0 0
43 44 5 1001-5000 0 0
44 45 6 1001-5000 0 0
45 46 7 1001-5000 0 0
46 47 8 1001-5000 0 0
47 48 9 1001-5000 0 0
48 49 10 1001-5000 0 0
49 50 11 1001-5000 0 0
50 51 12 1001-5000 0 0
51 52 13 1001-5000 0 0
52 53 14 1001-5000 0 0
53 54 15 1001-5000 0 0
54 55 16 1001-5000 0 0
55 56 17 1001-5000 0 0
56 57 18 1001-5000 0 0
57 58 19 1001-5000 0 0
58 59 20 1001-5000 0 0
59 60 1 5001-10000 0 0
60 61 2 5001-10000 0 0
61 62 3 5001-10000 0 0
62 63 4 5001-10000 0 0
63 64 5 5001-10000 0 0
64 65 6 5001-10000 0 0
65 66 7 5001-10000 0 0
66 67 8 5001-10000 0 0
67 68 9 5001-10000 0 0
68 69 10 5001-10000 0 0
69 70 11 5001-10000 0 0
70 71 12 5001-10000 0 0
71 72 13 5001-10000 0 0
72 73 14 5001-10000 0 0
73 74 15 5001-10000 0 0
74 75 16 5001-10000 0 0
75 76 17 5001-10000 0 0
76 77 18 5001-10000 0 0
77 78 19 5001-10000 0 0
78 79 20 5001-10000 0 0
79 80 1 >10000 0 0
80 81 2 >10000 0 0
81 82 3 >10000 0 0
82 83 4 >10000 0 0
83 84 5 >10000 0 0
84 85 6 >10000 0 0
85 86 7 >10000 0 0
86 87 8 >10000 0 0
87 88 9 >10000 0 0
88 89 10 >10000 0 0
89 90 11 >10000 0 0
90 91 12 >10000 0 0
91 92 13 >10000 0 0
92 93 14 >10000 0 0
93 94 15 >10000 0 0
94 95 16 >10000 0 0
95 96 17 >10000 0 0
96 97 18 >10000 0 0
97 98 19 >10000 0 0
98 99 20 >10000 0 0

income_band (first 100 rows)

IB_INCOME_BAND_SK IB_LOWER_BOUND IB_UPPER_BOUND
0 1 0 10000
1 2 10001 20000
2 3 20001 30000
3 4 30001 40000
4 5 40001 50000
5 6 50001 60000
6 7 60001 70000
7 8 70001 80000
8 9 80001 90000
9 10 90001 100000
10 11 100001 110000
11 12 110001 120000
12 13 120001 130000
13 14 130001 140000
14 15 140001 150000
15 16 150001 160000
16 17 160001 170000
17 18 170001 180000
18 19 180001 190000
19 20 190001 200000

inventory (first 100 rows)

INV_DATE_SK INV_ITEM_SK INV_WAREHOUSE_SK INV_QUANTITY_ON_HAND
0 2450815 1 1 211.0
1 2450815 2 1 235.0
2 2450815 4 1 859.0
3 2450815 7 1 704.0
4 2450815 8 1 891.0
5 2450815 10 1 834.0
6 2450815 13 1 591.0
7 2450815 14 1 579.0
8 2450815 16 1 622.0
9 2450815 19 1 745.0
10 2450815 20 1 405.0
11 2450815 22 1 NaN
12 2450815 25 1 676.0
13 2450815 26 1 865.0
14 2450815 28 1 24.0
15 2450815 31 1 170.0
16 2450815 32 1 797.0
17 2450815 34 1 332.0
18 2450815 37 1 618.0
19 2450815 38 1 909.0
20 2450815 40 1 738.0
21 2450815 43 1 699.0
22 2450815 44 1 975.0
23 2450815 46 1 551.0
24 2450815 49 1 857.0
25 2450815 50 1 894.0
26 2450815 52 1 279.0
27 2450815 55 1 206.0
28 2450815 56 1 746.0
29 2450815 58 1 NaN
30 2450815 61 1 154.0
31 2450815 62 1 888.0
32 2450815 64 1 773.0
33 2450815 67 1 107.0
34 2450815 68 1 801.0
35 2450815 70 1 749.0
36 2450815 73 1 419.0
37 2450815 74 1 541.0
38 2450815 76 1 359.0
39 2450815 79 1 578.0
40 2450815 80 1 42.0
41 2450815 82 1 83.0
42 2450815 85 1 192.0
43 2450815 86 1 567.0
44 2450815 88 1 710.0
45 2450815 91 1 282.0
46 2450815 92 1 631.0
47 2450815 94 1 587.0
48 2450815 97 1 645.0
49 2450815 98 1 667.0
50 2450815 100 1 26.0
51 2450815 103 1 224.0
52 2450815 104 1 901.0
53 2450815 106 1 887.0
54 2450815 109 1 455.0
55 2450815 110 1 784.0
56 2450815 112 1 742.0
57 2450815 115 1 978.0
58 2450815 116 1 207.0
59 2450815 118 1 462.0
60 2450815 121 1 406.0
61 2450815 122 1 559.0
62 2450815 124 1 999.0
63 2450815 127 1 870.0
64 2450815 128 1 982.0
65 2450815 130 1 700.0
66 2450815 133 1 26.0
67 2450815 134 1 356.0
68 2450815 136 1 143.0
69 2450815 139 1 838.0
70 2450815 140 1 846.0
71 2450815 142 1 657.0
72 2450815 145 1 181.0
73 2450815 146 1 730.0
74 2450815 148 1 49.0
75 2450815 151 1 652.0
76 2450815 152 1 861.0
77 2450815 154 1 329.0
78 2450815 157 1 286.0
79 2450815 158 1 NaN
80 2450815 160 1 62.0
81 2450815 163 1 894.0
82 2450815 164 1 463.0
83 2450815 166 1 458.0
84 2450815 169 1 696.0
85 2450815 170 1 450.0
86 2450815 172 1 842.0
87 2450815 175 1 79.0
88 2450815 176 1 260.0
89 2450815 178 1 894.0
90 2450815 181 1 4.0
91 2450815 182 1 281.0
92 2450815 184 1 797.0
93 2450815 187 1 981.0
94 2450815 188 1 58.0
95 2450815 190 1 834.0
96 2450815 193 1 54.0
97 2450815 194 1 856.0
98 2450815 196 1 803.0

item (first 100 rows)

I_ITEM_SK I_ITEM_ID I_REC_START_DATE I_REC_END_DATE I_ITEM_DESC I_CURRENT_PRICE I_WHOLESALE_COST I_BRAND_ID I_BRAND I_CLASS_ID I_CLASS I_CATEGORY_ID I_CATEGORY I_MANUFACT_ID I_MANUFACT I_SIZE I_FORMULATION I_COLOR I_UNITS I_CONTAINER I_MANAGER_ID I_PRODUCT_NAME
0 1 AAAAAAAABAAAAAAA 1997-10-27 None Powers will not get influences. Electoral ports should show low, annual chains. Now young visitors may pose now however final pages. Bitterly right children suit increasing, leading el 27.02 23.23 5003002 exportischolar #2 3 pop 5 Music 52 ableanti None 3663peru009490160959 spring Tsp Unknown 6 ought
1 2 AAAAAAAACAAAAAAA 1997-10-27 2000-10-26 False opportunities would run alone with a views. Early approaches would show inc, european intentions; important, main passages shall know urban, 1.12 0.38 1001001 amalgamalg #1 1 dresses 1 Women 294 esen stable petite 516steel060826230906 rosy Bunch Unknown 98 able
2 3 AAAAAAAACAAAAAAA 2000-10-27 None False opportunities would run alone with a views. Early approaches would show inc, european intentions; important, main passages shall know urban, 7.11 0.38 1001001 brandbrand #4 7 decor 7 Home 294 esen stable None 516steel060826230906 sienna Cup Unknown 18 pri
3 4 AAAAAAAAEAAAAAAA 1997-10-27 1999-10-27 Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 1.35 0.85 3002001 importoexporti #1 2 infants 3 Children 479 n stationese extra large 610157moccasin018327 red Tbl Unknown 26 ese
4 5 AAAAAAAAEAAAAAAA 1999-10-28 2001-10-26 Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 4.00 1.76 2002002 importoimporto #2 2 shirts 2 Men 220 barableable petite 42214rosy28066558020 pink Cup Unknown 27 anti
5 6 AAAAAAAAEAAAAAAA 2001-10-27 None Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 0.85 1.76 2002002 exportiimporto #1 3 pants 2 Men 212 barableable large 42214rosy28066558020 moccasin Bundle Unknown 6 cally
6 7 AAAAAAAAHAAAAAAA 1997-10-27 None Anxious accounts must catch also years. Revolutionary, large directors used to embrace then mo 9.94 6.75 3001002 amalgexporti #2 1 newborn 3 Children 214 eseoughtable petite 6moccasin24027188872 spring Tsp Unknown 64 ation
7 8 AAAAAAAAIAAAAAAA 1997-10-27 2000-10-26 F 2.76 0.85 3003001 exportiexporti #1 3 toddlers 3 Children 630 barprically extra large 35123wheat3256343398 turquoise Carton Unknown 25 eing
8 9 AAAAAAAAIAAAAAAA 2000-10-27 None F 4.46 0.85 1004002 edu packamalg #2 3 swimwear 1 Women 630 barprically medium 35123wheat3256343398 wheat Tbl Unknown 3 n st
9 10 AAAAAAAAKAAAAAAA 1997-10-27 1999-10-27 Classical services go trousers. However great galleries might say needs. Assumptions change very in favour of the notes. Teeth woul 8.94 4.11 10008011 namelessunivamalg #11 8 scanners 10 Electronics 350 barantipri None 8159007505thistle447 pale Tsp Unknown 34 barought
10 11 AAAAAAAAKAAAAAAA 1999-10-28 2001-10-26 Correct, fo 54.87 4.11 10008011 edu packbrand #4 14 estate 6 Jewelry 625 antiablecally None snow1543775706017405 yellow Bunch Unknown 26 oughtought
11 12 AAAAAAAAKAAAAAAA 2001-10-27 None Corporate, important facilities claim trying, external sides. Elements used to expect home pr 6.54 4.11 10008011 corpnameless #3 14 furniture 7 Home 264 esecallyable None 968467777sky92069287 royal Tbl Unknown 19 ableought
12 13 AAAAAAAANAAAAAAA 1997-10-27 None Hard, private departments spoil more quickly possible members; clear troops fail only needs. 8.76 7.62 6012006 importobrand #6 12 costume 6 Jewelry 167 ationcallyought None 883208731996blue7862 olive Bundle Unknown 51 priought
13 14 AAAAAAAAOAAAAAAA 1997-10-27 2000-10-26 Teachers carry by the children; old democrats enco 1.85 0.59 8007005 brandnameless #5 7 hockey 8 Sports 460 barcallyese None 1144670162goldenrod2 red Dram Unknown 6 eseought
14 15 AAAAAAAAOAAAAAAA 2000-10-27 None Teachers carry by the children; old democrats enco 2.57 0.59 5002002 importoscholar #2 2 country 5 Music 86 barcallyese None 1144670162goldenrod2 royal Pound Unknown 11 antiought
15 16 AAAAAAAAABAAAAAA 1997-10-27 1999-10-27 Dominant, christian pp. may not raise 0.31 0.14 1002001 importoamalg #1 2 fragrances 1 Women 117 ationoughtought large 36933056603steel7373 bisque Lb Unknown 23 callyought
16 17 AAAAAAAAABAAAAAA 1999-10-28 2001-10-26 Dominant, christian pp. may not raise 6.49 0.14 1002001 amalgimporto #2 1 accessories 2 Men 117 ationoughtought extra large 452645olive281530722 snow Dram Unknown 41 ationought
17 18 AAAAAAAAABAAAAAA 2001-10-27 None Twin, particular aspects will accept only on 0.87 0.48 1002001 importoamalg #1 2 fragrances 1 Women 117 ationoughtought medium 452645olive281530722 rosy Carton Unknown 63 eingought
18 19 AAAAAAAADBAAAAAA 1997-10-27 None Political parents know right; perfec 10.61 4.77 2004002 edu packimporto #2 4 sports-apparel 2 Men 364 esecallypri large 85seashell1303417084 smoke Ton Unknown 13 n stought
19 20 AAAAAAAAEBAAAAAA 1997-10-27 2000-10-26 Legal, foreign days know losses; briefly equivalent arguments will expect today. New, front grounds look hot, other aspects. Actually national husbands show usually of course other stations; huge, k 29.35 18.78 1003001 exportiamalg #1 3 maternity 1 Women 995 antin stn st extra large 97245417ivory0043452 tan Gram Unknown 21 barable
20 21 AAAAAAAAEBAAAAAA 2000-10-27 None Legal, foreign days know losses; briefly equivalent arguments will expect today. New, front grounds look hot, other aspects. Actually national husbands show usually of course other stations; huge, k 10.71 8.46 6016006 corpbrand #6 3 consignment 6 Jewelry 995 antin stn st None 1050463678plum205437 sienna Pallet Unknown 4 oughtable
21 22 AAAAAAAAGBAAAAAA 1997-10-27 1999-10-27 Members endure already near additional details. Ministers should ignore whole times. Bright, brief beliefs become highly bright men; o 7.11 3.27 10005006 scholarunivamalg #6 5 karoke 10 Electronics 169 n stcallyought None 4900684033pink844758 sandy Each Unknown 40 ableable
22 23 AAAAAAAAGBAAAAAA 1999-10-28 2001-10-26 Below long minutes make primarily by a months. Secure effects get much upo 3.73 1.41 10005006 scholarunivamalg #7 5 karoke 10 Electronics 260 n stcallyought None 569seashell149755477 papaya Bunch Unknown 44 priable
23 24 AAAAAAAAGBAAAAAA 2001-10-27 None Below long minutes make primarily by a months. Secure effects get much upo 2.61 0.86 10005006 amalgamalg #1 1 dresses 1 Women 260 barcallyable medium 569seashell149755477 lime Ton Unknown 10 eseable
24 25 AAAAAAAAJBAAAAAA 1997-10-27 None Major brothers must not mean true annual, aware workers. Regulations will let more mechanisms. English pictures take tha 75.28 50.43 1004002 edu packamalg #2 4 swimwear 1 Women 338 eingpripri large 90papaya546284022999 purple Bundle Unknown 18 antiable
25 26 AAAAAAAAKBAAAAAA 1997-10-27 2000-10-26 Hands cannot show just administrative studies. Powerful orders come fiscal thanks. Major, certain nurses work still relative pa 2.77 1.91 2004001 edu packimporto #1 4 sports-apparel 2 Men 26 callyable petite thistle3370503164308 spring Box Unknown 31 callyable
26 27 AAAAAAAAKBAAAAAA 2000-10-27 None New, only police shall start generally left, important holidays. Inte 8.57 1.91 2004001 importocorp #4 4 diamonds 6 Jewelry 734 esepriation None thistle3370503164308 orchid Pound Unknown 31 ationable
27 28 AAAAAAAAMBAAAAAA 1997-10-27 1999-10-27 External, actual teache 0.15 0.07 3003001 exportiexporti #1 3 toddlers 3 Children 886 callyeingeing medium 56715743614hot522158 turquoise Dram Unknown 32 eingable
28 29 AAAAAAAAMBAAAAAA 1999-10-28 2001-10-26 Rational, electronic photographs worry. Other, similar pounds might enable suddenly middle, growing months. Military, desperate funds shall not know then also various germans. Heavy 1.04 0.07 3003001 edu packamalg #2 3 swimwear 1 Women 209 callyeingeing large 56715743614hot522158 yellow Carton Unknown 35 n stable
29 30 AAAAAAAAMBAAAAAA 2001-10-27 None Systems loosen special, easy partners. Prime, noble windows condemn effective, nation 86.00 62.78 6008007 namelesscorp #7 8 mens watch 6 Jewelry 732 callyeingeing None spring82346236549375 gainsboro Bundle Unknown 32 barpri
30 31 AAAAAAAAPBAAAAAA 1997-10-27 None So new campaigns teach more straight early indians. International offices shake actual ministers. New, liable theories can see expenses. Nice, imperial teams wo 8.48 3.30 8015002 scholarmaxi #2 15 fishing 8 Sports 167 ationcallyought None 7wheat78839382233684 lawn Each Unknown 98 oughtpri
31 32 AAAAAAAAACAAAAAA 1997-10-27 2000-10-26 Different numbers might not visit; rights used to remember. Labour students must put as slowly possible children. Never 1.77 1.00 7004003 edu packbrand #3 4 curtains/drapes 7 Home 431 oughtpriese None royal348530153475607 turquoise Dram Unknown 7 ablepri
32 33 AAAAAAAAACAAAAAA 2000-10-27 None Sure available terms know just nice, human officials. Problems used to receive. United, cheap changes get better british houses. Full bars shift often important readers; inc 7.86 1.00 3003002 exportiexporti #2 4 toddlers 3 Children 154 eseantiought medium 36972puff56515747175 plum Carton Unknown 51 pripri
33 34 AAAAAAAACCAAAAAA 1997-10-27 1999-10-27 Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 2.07 1.49 10007001 brandunivamalg #1 7 personal 10 Electronics 553 priantianti None 29171thistle61991621 honeydew Pallet Unknown 58 esepri
34 35 AAAAAAAACCAAAAAA 1999-10-28 2001-10-26 Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 2.32 1.11 10007001 amalgmaxi #12 1 arts 9 Books 553 priantianti None khaki119648424197997 green Tsp Unknown 5 antipri
35 36 AAAAAAAACCAAAAAA 2001-10-27 None Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 91.42 34.73 1001001 amalgamalg #1 1 dresses 1 Women 553 priantianti medium khaki119648424197997 thistle Case Unknown 37 callypri
36 37 AAAAAAAAFCAAAAAA 1997-10-27 None Clearly due proceedings should compensate particular, main agreements. Heels may not deny later easily different spaces; vast, additional items might export fresh, only sentences. Patients expand 2.42 0.87 2001002 amalgimporto #2 1 accessories 2 Men 489 n steingese petite 8violet4563425031455 rose Bundle Unknown 28 ationpri
37 38 AAAAAAAAGCAAAAAA 1997-10-27 2000-10-26 Cheap problems can draw please over good stars. Either long children would pass similar, different metres; base, large surroundings 16.70 8.01 2004001 edu packimporto #1 4 sports-apparel 2 Men 933 priprin st medium 5red3080638918015686 violet Bunch Unknown 36 eingpri
38 39 AAAAAAAAGCAAAAAA 2000-10-27 None Cheap problems can draw please over good stars. Either long children would pass similar, different metres; base, large surroundings 5.07 8.01 2004001 importomaxi #4 2 business 9 Books 368 eingcallypri None 5red3080638918015686 sandy Unknown Unknown 34 n stpri
39 40 AAAAAAAAICAAAAAA 1997-10-27 1999-10-27 Deep good activities should resist to a substances; that is beautiful businessmen like problems. Late huge meet 9.93 8.63 7008001 namelessbrand #1 8 lighting 7 Home 147 ationeseought None olive423496330709355 sandy Pallet Unknown 64 barese
40 41 AAAAAAAAICAAAAAA 1999-10-28 2001-10-26 Deep good activities should resist to a substances; that is beautiful businessmen like problems. Late huge meet 4.40 8.63 7008001 exportiexporti #2 8 toddlers 3 Children 310 ationeseought small 09031176427khaki3414 red Bunch Unknown 85 oughtese
41 42 AAAAAAAAICAAAAAA 2001-10-27 None Once straight tools migh 9.15 8.63 5003001 exportischolar #1 3 pop 5 Music 540 bareseanti None 09031176427khaki3414 powder Cup Unknown 64 ableese
42 43 AAAAAAAALCAAAAAA 1997-10-27 None Thus present women should hear for a shares; leaders must come early; immediate men will want exactly young groups. Insects may ask narrow variations. New leaders should deal 6.08 4.86 9010008 univunivamalg #8 10 travel 9 Books 301 oughtbarpri None 19orchid108200357725 firebrick Pallet Unknown 19 priese
43 44 AAAAAAAAMCAAAAAA 1997-10-27 2000-10-26 Wide clear weeks join surely medical others; again dull effects stretch. Only, great needs may brin 5.20 1.71 5001001 amalgscholar #1 1 rock 5 Music 124 eseableought None salmon36671081354930 chocolate Case Unknown 59 eseese
44 45 AAAAAAAAMCAAAAAA 2000-10-27 None Serious, little suppliers object hot, new weeks. Votes shall prevail yet. Windows understand equal members. Average consequences go at least pales 0.37 1.71 5001001 namelesscorp #6 1 mens watch 6 Jewelry 459 eseableought None salmon36671081354930 khaki None Unknown 15 antiese
45 46 AAAAAAAAOCAAAAAA 1997-10-27 1999-10-27 Emotional, nuclear farmers can understand also in t 98.66 85.83 6012007 importobrand #7 12 costume 6 Jewelry 252 ableantiable None 115838salmon36529828 saddle Tsp Unknown 19 callyese
46 47 AAAAAAAAOCAAAAAA 1999-10-28 2001-10-26 Emotional, nuclear farmers can understand also in t 3.00 1.74 6012007 amalgedu pack #2 1 womens 4 Shoes 99 ableantiable economy 115838salmon36529828 peru Dram Unknown 5 ationese
47 48 AAAAAAAAOCAAAAAA 2001-10-27 None Emotional, nuclear farmers can understand also in t 1.45 1.74 5001001 amalgscholar #1 1 rock 5 Music 41 ableantiable None 03879white9235299949 thistle Dram Unknown 21 eingese
48 49 AAAAAAAABDAAAAAA 1997-10-27 None Regional, indian casualties shall say of course legal relations. Endless, cultural animals dislike new, possible resources. Socialist, very plans wonder precisely available star 8.01 2.48 3004002 edu packexporti #2 4 school-uniforms 3 Children 443 prieseese large 027315130steel656106 powder Unknown Unknown 56 n stese
49 50 AAAAAAAACDAAAAAA 1997-10-27 2000-10-26 Activities cover 4.99 3.54 4004001 edu packedu pack #1 4 athletic 4 Shoes 140 bareseought small 1446003050medium4139 papaya Cup Unknown 72 baranti
50 51 AAAAAAAACDAAAAAA 2000-10-27 None International, likely trees put carefully variations. Eventually silent observations might think better changes. Western, aggressive gardens protect furthermore stars. Yesterday adequate action 3.99 1.99 3003002 exportiexporti #2 3 toddlers 3 Children 140 bareseought extra large 1446003050medium4139 sky Gram Unknown 33 oughtanti
51 52 AAAAAAAAEDAAAAAA 1997-10-27 1999-10-27 Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 2.99 2.15 3002001 importoexporti #1 2 infants 3 Children 865 anticallyeing medium moccasin133060463675 rose Pound Unknown 33 ableanti
52 53 AAAAAAAAEDAAAAAA 1999-10-28 2001-10-26 Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 8.26 2.47 3002001 univamalgamalg #3 10 memory 10 Electronics 865 anticallyeing None moccasin133060463675 peru Case Unknown 14 prianti
53 54 AAAAAAAAEDAAAAAA 2001-10-27 None Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 37.84 20.05 1001001 amalgamalg #1 1 dresses 1 Women 865 anticallyeing medium turquoise29355882814 khaki Ounce Unknown 40 eseanti
54 55 AAAAAAAAHDAAAAAA 1997-10-27 None Applicable versions feel so silly peasants. Lessons make relatively for example medical leaves. Details might want criminal, id 0.99 0.79 1004002 edu packamalg #2 4 swimwear 1 Women 47 ationese medium 7975726dodger7126990 ghost Cup Unknown 18 antianti
55 56 AAAAAAAAIDAAAAAA 1997-10-27 2000-10-26 Events might shape successfully; recent flowers should trace alike hard questions. Small areas could not give easy, enthusiastic ends. Obvious 7.44 3.94 10011006 amalgamalgamalg #6 11 disk drives 10 Electronics 412 ableoughtese None 45885navy00969807009 hot Tsp Unknown 5 callyanti
56 57 AAAAAAAAIDAAAAAA 2000-10-27 None Events might shape successfully; recent flowers should trace alike hard questions. Small areas could not give easy, enthusiastic ends. Obvious 4.58 3.94 10011006 edu packexporti #2 11 school-uniforms 3 Children 591 ableoughtese medium 611purple39006426349 red Dozen Unknown 24 ationanti
57 58 AAAAAAAAKDAAAAAA 1997-10-27 1999-10-27 Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 0.87 0.71 4003001 exportiedu pack #1 3 kids 4 Shoes 187 ationeingought small 602196716medium47751 blush Pound Unknown 4 einganti
58 59 AAAAAAAAKDAAAAAA 1999-10-28 2001-10-26 Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 38.82 15.13 3004002 edu packexporti #2 3 school-uniforms 3 Children 413 prioughtese medium 602196716medium47751 sandy Tsp Unknown 57 n stanti
59 60 AAAAAAAAKDAAAAAA 2001-10-27 None Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 4.87 15.13 3004002 maxicorp #5 9 womens watch 6 Jewelry 849 n steseeing None 602196716medium47751 indian Unknown Unknown 19 barcally
60 61 AAAAAAAANDAAAAAA 1997-10-27 None Pictures see even healthy designs. Considerable, visual concessions last controversia 0.50 0.22 10006011 corpunivamalg #11 6 musical 10 Electronics 785 antieingation None 83227powder377577506 gainsboro Case Unknown 22 oughtcally
61 62 AAAAAAAAODAAAAAA 1997-10-27 2000-10-26 Either british authorities would receive slightly. Yesterday unique clothes work seldom old sales. Famous, possible programmes take reall 3.49 1.18 6004007 edu packcorp #7 4 bracelets 6 Jewelry 633 priprically None 206thistle2954355697 violet Bunch Unknown 84 ablecally
62 63 AAAAAAAAODAAAAAA 2000-10-27 None Short, bitter heads like then events. Assessments may hide just. Wild european books should maintain yesterday useful natural workers. Late responsible estimates would 4.34 1.18 6004007 importoimporto #2 2 shirts 2 Men 633 priprically medium 206thistle2954355697 red Ton Unknown 41 prically
63 64 AAAAAAAAAEAAAAAA 1997-10-27 1999-10-27 Both new conditions ask acute, ashamed pupils. Short, poor fami 2.02 1.69 8009005 maxinameless #5 9 optics 8 Sports 322 ableablepri None 2tan8009172776437677 maroon Tbl Unknown 14 esecally
64 65 AAAAAAAAAEAAAAAA 1999-10-28 2001-10-26 Both new conditions ask acute, ashamed pupils. Short, poor fami 73.24 54.19 10008015 namelessunivamalg #15 8 scanners 10 Electronics 363 ableablepri None 567702bisque83928674 blue Bundle Unknown 27 antically
65 66 AAAAAAAAAEAAAAAA 2001-10-27 None Conservatives exert ahead for a 6.67 54.19 10008015 maximaxi #7 8 science 9 Books 121 oughtableought None 438189282firebrick54 purple Bundle Unknown 51 callycally
66 67 AAAAAAAADEAAAAAA 1997-10-27 None So fair schools must go problems. Children should not paint in a photographs. Great, late senten 1.47 0.83 9015008 scholarunivamalg #8 15 fiction 9 Books 285 antieingable None 583spring53597495026 black Ounce Unknown 57 ationcally
67 68 AAAAAAAAEEAAAAAA 1997-10-27 2000-10-26 Principles secure best. Relevant foods mislead there so prime relations. Quickly convenient times may think men. Interesting, other bodies w 6.93 3.11 2004001 edu packimporto #1 4 sports-apparel 2 Men 76 callyation petite 16294729rose54248882 navy Carton Unknown 35 eingcally
68 69 AAAAAAAAEEAAAAAA 2000-10-27 None Modern, golden faces illustrate previously grounds. Acceptable, gold sides cannot mind modern plans; large thanks find highly only meals. Enormous, popular teachers 5.67 3.11 2004001 importoamalg #2 2 fragrances 1 Women 76 callyation large 972807876turquoise30 pale Gross Unknown 28 n stcally
69 70 AAAAAAAAGEAAAAAA 1997-10-27 1999-10-27 Factors sha 9.79 4.40 5004001 edu packscholar #1 4 classical 5 Music 445 antieseese None purple89249207875245 rose Dram Unknown 52 baration
70 71 AAAAAAAAGEAAAAAA 1999-10-28 2001-10-26 General stars believe for example at a 3.21 2.53 9014012 edu packunivamalg #12 14 sports 9 Books 445 antieseese None purple89249207875245 lavender Ounce Unknown 26 oughtation
71 72 AAAAAAAAGEAAAAAA 2001-10-27 None Particu 5.31 2.53 1002001 importoamalg #1 2 fragrances 1 Women 445 antieseese medium 5peru941765840464570 blush Ton Unknown 27 ableation
72 73 AAAAAAAAJEAAAAAA 1997-10-27 None Social, simple se 41.16 27.57 1003002 exportiamalg #2 3 maternity 1 Women 653 priantically petite 03293333saddle019730 misty Tbl Unknown 3 priation
73 74 AAAAAAAAKEAAAAAA 1997-10-27 2000-10-26 Clergy ought 3.91 1.44 2004001 edu packimporto #1 4 sports-apparel 2 Men 954 eseantin st small 8341981838751coral30 papaya Carton Unknown 17 eseation
74 75 AAAAAAAAKEAAAAAA 2000-10-27 None Here distant classes would not prove therefore objectives. Public books improve of course politi 3.26 1.30 2004001 exportiamalgamalg #8 4 stereo 10 Electronics 954 eseantin st None 965042tomato56650663 wheat Tbl Unknown 12 antiation
75 76 AAAAAAAAMEAAAAAA 1997-10-27 1999-10-27 Around single relations clear heavily over a controls. Arms could leave signs. T 3.84 2.76 9010005 univunivamalg #5 10 travel 9 Books 46 callyese None 140503351631sienna87 puff Oz Unknown 32 callyation
76 77 AAAAAAAAMEAAAAAA 1999-10-28 2001-10-26 Around single relations clear heavily over a controls. Arms could leave signs. T 0.90 2.76 3003002 exportiexporti #2 3 toddlers 3 Children 46 callyese small 140503351631sienna87 purple Ounce Unknown 88 ationation
77 78 AAAAAAAAMEAAAAAA 2001-10-27 None Around single relations clear heavily over a controls. Arms could leave signs. T 0.23 0.14 3003002 corpcorp #7 6 rings 6 Jewelry 515 callyese None 85716779158spring390 royal Lb Unknown 70 eingation
78 79 AAAAAAAAPEAAAAAA 1997-10-27 None Video-taped, ch 2.87 1.37 10009012 maxiunivamalg #12 9 televisions 10 Electronics 385 antieingpri None sandy027498424299031 papaya Oz Unknown 2 n station
79 80 AAAAAAAAAFAAAAAA 1997-10-27 2000-10-26 Particular, armed costs ought to spin certainly. Events get in the costs. Late, parliamentary foods shall not arrest there able men. Other, difficult officers hold high interests. Model shares dre 2.16 1.59 4003001 exportiedu pack #1 3 kids 4 Shoes 376 callyationpri None 26985wheat7381826860 yellow Bundle Unknown 38 bareing
80 81 AAAAAAAAAFAAAAAA 2000-10-27 None Particular, armed costs ought to spin certainly. Events get in the costs. Late, parliamentary foods shall not arrest there able men. Other, difficult officers hold high interests. Model shares dre 3.65 3.13 4002002 importoedu pack #2 3 mens 4 Shoes 37 callyationpri large 26985wheat7381826860 cyan Box Unknown 68 oughteing
81 82 AAAAAAAACFAAAAAA 1997-10-27 1999-10-27 Seats could come confident, moder 1.43 1.17 4004001 edu packedu pack #1 4 athletic 4 Shoes 306 callybarpri small 0340aquamarine369806 violet Dram Unknown 53 ableeing
82 83 AAAAAAAACFAAAAAA 1999-10-28 2001-10-26 Children could not influence most flat, careful figures. Local, true stars could commend. As scottish blocks want still old benefits. Skills should not try precisely. Y 4.25 1.17 4004001 brandcorp #4 4 pendants 6 Jewelry 622 ableablecally None 146048520linen957568 misty Each Unknown 5 prieing
83 84 AAAAAAAACFAAAAAA 2001-10-27 None Cultural, cultural contracts assume colours. Close legitimate flowers watch enough british reasons. Probably old years must set recently intensive words. Elderly factors go otherwise useless months. 1.41 1.26 2004001 edu packimporto #1 4 sports-apparel 2 Men 662 ablecallycally large 8587plum853813979789 grey Gross Unknown 3 eseeing
84 85 AAAAAAAAFFAAAAAA 1997-10-27 None Again common customers should make hardly proposals. Close groups can prevent after a cars. Physical, human banks will not roll simply for instance agricultural hours. Northern centre 39.31 34.98 2003002 exportiimporto #2 3 pants 2 Men 156 callyantiought small 859187711467pale4603 sky Oz Unknown 66 antieing
85 86 AAAAAAAAGFAAAAAA 1997-10-27 2000-10-26 Parents like only new demands. Current players let charges. Specific, young towns realise however countr 0.87 0.74 6002007 importocorp #7 2 diamonds 6 Jewelry 985 antieingn st None 642534525118salmon94 powder Pallet Unknown 2 callyeing
86 87 AAAAAAAAGFAAAAAA 2000-10-27 None Lives must rule better now sem 4.51 1.53 3001002 amalgexporti #2 2 newborn 3 Children 985 antieingn st petite 66917821011ghost0861 sky Bunch Unknown 57 ationeing
87 88 AAAAAAAAIFAAAAAA 1997-10-27 1999-10-27 Fears obtain still blind, active others. Forever numerous signs last even here civil strate 7.29 3.71 3001001 amalgexporti #1 1 newborn 3 Children 87 ationeing large 97346sandy2527135842 snow Gross Unknown 24 eingeing
88 89 AAAAAAAAIFAAAAAA 1999-10-28 2001-10-26 Sensitive requirements will not supply all intelligent effects. U 4.79 3.44 3001001 amalgimporto #2 1 accessories 2 Men 967 ationcallyn st large 97346sandy2527135842 coral Bundle Unknown 5 n steing
89 90 AAAAAAAAIFAAAAAA 2001-10-27 None Both french meanings cannot tackle then 1.18 0.44 3001001 amalgscholar #1 1 rock 5 Music 907 ationbarn st None 97346sandy2527135842 blue Tsp Unknown 35 barn st
90 91 AAAAAAAALFAAAAAA 1997-10-27 None True potatoes sound equal heads 0.64 0.28 10006007 corpunivamalg #7 6 musical 10 Electronics 176 callyationought None 2925royal36510681005 lace Lb Unknown 74 oughtn st
91 92 AAAAAAAAMFAAAAAA 1997-10-27 2000-10-26 Employers w 4.48 2.64 8009003 maxinameless #3 9 optics 8 Sports 547 ationeseanti None 1906778941seashell97 indian None Unknown 12 ablen st
92 93 AAAAAAAAMFAAAAAA 2000-10-27 None Employers w 1.06 0.61 8015004 scholarmaxi #4 15 fishing 8 Sports 290 barn stable None 082sienna17917347780 cyan Lb Unknown 90 prin st
93 94 AAAAAAAAOFAAAAAA 1997-10-27 1999-10-27 Institutions ought to provide good agents; large, comfortable 0.11 0.06 2002001 importoimporto #1 2 shirts 2 Men 254 eseantiable economy 46040088turquoise736 orange Box Unknown 33 esen st
94 95 AAAAAAAAOFAAAAAA 1999-10-28 2001-10-26 Institutions ought to provide good agents; large, comfortable 2.55 1.30 5003002 exportischolar #2 3 pop 5 Music 276 eseantiable None 414160524grey3616827 pale Tbl Unknown 95 antin st
95 96 AAAAAAAAOFAAAAAA 2001-10-27 None Periods provide as distinctive, little ingredients; therefore social boys must not leave slightl 4.19 1.30 6001001 amalgcorp #1 3 birdal 6 Jewelry 54 eseanti None 20988791004papaya520 cream Pound Unknown 17 callyn st
96 97 AAAAAAAABGAAAAAA 1997-10-27 None Quite different services promote all the same. Private, marginal colleagues play of course similar, different girls. French, local girls reap here. Bad movies shorten relatively. Terms 57.09 32.54 9015002 scholarunivamalg #2 15 fiction 9 Books 275 antiationable None 96goldenrod451188509 rose Gross Unknown 5 ationn st
97 98 AAAAAAAACGAAAAAA 1997-10-27 2000-10-26 Opportunities clear there. Basic rules ask british locations. More financial visits construct other funds. Unk 3.16 2.18 8008009 namelessnameless #9 8 outdoor 8 Sports 302 ablebarpri None 01882924064yellow241 medium Ton Unknown 24 eingn st
98 99 AAAAAAAACGAAAAAA 2000-10-27 None Opportunities clear there. Basic rules ask british locations. More financial visits construct other funds. Unk 4.81 2.18 8008009 scholarunivamalg #15 5 karoke 10 Electronics 302 ablebarpri None 215235wheat677989979 salmon Pound Unknown 19 n stn st

promotion (first 100 rows)

P_PROMO_SK P_PROMO_ID P_START_DATE_SK P_END_DATE_SK P_ITEM_SK P_COST P_RESPONSE_TARGE P_PROMO_NAME P_CHANNEL_DMAIL P_CHANNEL_EMAIL P_CHANNEL_CATALOG P_CHANNEL_TV P_CHANNEL_RADIO P_CHANNEL_PRESS P_CHANNEL_EVENT P_CHANNEL_DEMO P_CHANNEL_DETAILS P_PURPOSE P_DISCOUNT_ACTIVE
0 1 AAAAAAAABAAAAAAA 2450164 2450185 686 1000.0 1 ought Y N N N N N N N Men will not say merely. Old, available Unknown N
1 2 AAAAAAAACAAAAAAA 2450118 2450150 1264 1000.0 1 able Y N N N N N N N So willing buildings coul Unknown N
2 3 AAAAAAAADAAAAAAA 2450675 2450712 1468 1000.0 1 pri Y N N N N N N N Companies shall not pr Unknown N

reason (first 100 rows)

R_REASON_SK R_REASON_ID R_REASON_DESC
0 1 AAAAAAAABAAAAAAA Package was damaged

ship_mode (first 100 rows)

SM_SHIP_MODE_SK SM_SHIP_MODE_ID SM_TYPE SM_CODE SM_CARRIER SM_CONTRACT
0 1 AAAAAAAABAAAAAAA EXPRESS AIR UPS YvxVaJI10
1 2 AAAAAAAACAAAAAAA NEXT DAY AIR FEDEX ldhM8IvpzHgdbBgDfI
2 3 AAAAAAAADAAAAAAA OVERNIGHT AIR AIRBORNE 6Hzzp4JkzjqD8MGXLCDa
3 4 AAAAAAAAEAAAAAAA TWO DAY AIR USPS UaAJjKDnL4gTOqbpj
4 5 AAAAAAAAFAAAAAAA LIBRARY AIR DHL HVDFCcQ
5 6 AAAAAAAAGAAAAAAA REGULAR SURFACE TBS Ek
6 7 AAAAAAAAHAAAAAAA EXPRESS SURFACE ZHOU hGoF18SLDDPBj
7 8 AAAAAAAAIAAAAAAA NEXT DAY SURFACE ZOUROS yVfotg7Tio3MVhBg6Bkn
8 9 AAAAAAAAJAAAAAAA OVERNIGHT SURFACE MSC Xjy3ZPuiDjzHlRx14Z3
9 10 AAAAAAAAKAAAAAAA TWO DAY SURFACE LATVIAN P7FBIt8yd
10 11 AAAAAAAALAAAAAAA LIBRARY SURFACE ALLIANCE OrDuVy2H
11 12 AAAAAAAAMAAAAAAA REGULAR SEA ORIENTAL GNJr3g5i7oorKqtX
12 13 AAAAAAAANAAAAAAA EXPRESS SEA BARIAN qENFQ
13 14 AAAAAAAAOAAAAAAA NEXT DAY SEA BOXBUNDLES A5BYO1qH8HGTTN
14 15 AAAAAAAAPAAAAAAA OVERNIGHT SEA GREAT EASTERN uukTktPYycct8
15 16 AAAAAAAAABAAAAAA TWO DAY SEA DIAMOND 2mM8l
16 17 AAAAAAAABBAAAAAA LIBRARY SEA RUPEKSA 5FKNB0j8aaqTB
17 18 AAAAAAAACBAAAAAA REGULAR BIKE GERMA I3uCelXtjP
18 19 AAAAAAAADBAAAAAA EXPRESS BIKE HARMSTORF fop0bcSd91J26IVpR
19 20 AAAAAAAAEBAAAAAA NEXT DAY BIKE PRIVATECARRIER O9V6oF8RJnLMmZYd1

store (first 100 rows)

S_STORE_SK S_STORE_ID S_REC_START_DATE S_REC_END_DATE S_CLOSED_DATE_SK S_STORE_NAME S_NUMBER_EMPLOYEES S_FLOOR_SPACE S_HOURS S_MANAGER S_MARKET_ID S_GEOGRAPHY_CLASS S_MARKET_DESC S_MARKET_MANAGER S_DIVISION_ID S_DIVISION_NAME S_COMPANY_ID S_COMPANY_NAME S_STREET_NUMBER S_STREET_NAME S_STREET_TYPE S_SUITE_NUMBER S_CITY S_COUNTY S_STATE S_ZIP S_COUNTRY S_GMT_OFFSET S_TAX_PRECENTAGE
0 1 AAAAAAAABAAAAAAA 1997-03-13 None 2451189.0 ought 245 5250760 8AM-4PM William Ward 2 Unknown Enough high areas stop expectations. Elaborate, local is Charles Bartley 1 Unknown 1 Unknown 767 Spring Wy Suite 250 Midway Williamson County TN 31904 United States -5 0.03
1 2 AAAAAAAACAAAAAAA 1997-03-13 2000-03-12 NaN able 236 5285950 8AM-4PM Scott Smith 8 Unknown Parliamentary candidates wait then heavy, keen mil David Lamontagne 1 Unknown 1 Unknown 255 Sycamore Dr. Suite 410 Midway Williamson County TN 31904 United States -5 0.03

store_returns (first 100 rows)

SS_SOLD_DATE_SK SS_SOLD_TIME_SK SS_ITEM_SK SS_CUSTOMER_SK SS_CDEMO_SK SS_HDEMO_SK SS_ADDR_SK SS_STORE_SK SS_PROMO_SK SS_TICKET_NUMBER SS_QUANTITY SS_WHOLESALE_COST SS_LIST_PRICE SS_SALES_PRICE SS_EXT_DISCOUNT_AMT SS_EXT_SALES_PRICE SS_EXT_WHOLESALE_COST SS_EXT_LIST_PRICE SS_EXT_TAX SS_COUPON_AMT SS_NET_PAID SS_NET_PAID_INC_TAX SS_NET_PROFIT
0 2451984.0 46418.0 404 6.0 793022.0 4033.0 397.0 2.0 1.0 1 51.0 37.23 3.35 40.58 55.28 714.00 0.74 17.51 18.98 772.63 NaN NaN NaN
1 2451822.0 47480.0 1813 6.0 1082163.0 7157.0 751.0 1.0 1.0 1 43.0 4009.32 120.27 4129.59 28.23 0.00 3448.01 5.61 555.70 148.50 NaN NaN NaN
2 2451653.0 37700.0 1030 284.0 289468.0 3067.0 819.0 2.0 1.0 2 7.0 249.48 2.49 251.97 11.50 6.23 234.51 8.83 6.14 20.22 NaN NaN NaN
3 2452682.0 38957.0 1719 47.0 793786.0 6401.0 663.0 2.0 1.0 3 3.0 227.37 6.82 234.19 9.23 33.42 125.05 51.16 51.16 49.47 NaN NaN NaN
4 2452682.0 41617.0 1063 47.0 193750.0 2351.0 152.0 1.0 1.0 3 23.0 1273.05 25.46 1298.51 46.15 406.18 954.78 57.28 260.99 477.79 NaN NaN NaN
5 2452688.0 60645.0 1545 47.0 1047081.0 2455.0 76.0 2.0 1.0 3 1.0 35.14 2.45 37.59 79.00 0.00 9.13 5.20 20.81 81.45 NaN NaN NaN
6 2451598.0 40772.0 397 814.0 722383.0 1497.0 164.0 2.0 1.0 4 18.0 63.54 1.27 64.81 1.26 10.80 33.67 2.68 27.19 13.33 NaN NaN NaN
7 2451521.0 33881.0 908 814.0 925501.0 3196.0 491.0 2.0 1.0 4 12.0 18.60 1.48 20.08 46.48 270.60 10.04 8.04 0.52 318.56 NaN NaN NaN
8 2451628.0 34073.0 1790 246.0 1150235.0 3185.0 935.0 1.0 1.0 5 58.0 347.42 6.94 354.36 97.98 331.18 107.70 14.38 225.34 436.10 NaN NaN NaN
9 2452165.0 54713.0 151 29.0 492488.0 6806.0 724.0 2.0 1.0 6 1.0 61.81 3.70 65.51 68.44 44.79 54.39 0.14 7.28 116.93 NaN NaN NaN
10 2452319.0 50204.0 543 954.0 1182421.0 560.0 299.0 1.0 1.0 7 72.0 809.28 24.27 833.55 88.17 51.12 194.22 442.84 172.22 163.56 NaN NaN NaN
11 2452065.0 40372.0 163 451.0 178772.0 175.0 625.0 2.0 1.0 10 48.0 3960.48 0.00 3960.48 39.22 65.76 1980.24 1960.43 19.81 104.98 NaN NaN NaN
12 2452575.0 42311.0 1639 900.0 727030.0 4636.0 89.0 1.0 1.0 11 36.0 1639.44 81.97 1721.41 96.21 712.80 147.54 1163.68 328.22 890.98 NaN NaN NaN
13 2451378.0 48500.0 1196 820.0 201438.0 6076.0 714.0 2.0 1.0 12 27.0 417.42 4.17 421.59 62.17 2400.30 375.67 37.57 4.18 2466.64 NaN NaN NaN
14 2451329.0 44694.0 1495 820.0 1351118.0 2652.0 633.0 2.0 1.0 12 46.0 1208.42 48.33 1256.75 69.04 887.80 96.67 355.76 755.99 1005.17 NaN NaN NaN
15 2451014.0 29493.0 130 588.0 130689.0 2790.0 138.0 1.0 1.0 13 58.0 40.60 3.24 43.84 1.13 312.62 27.20 0.26 13.14 316.99 NaN NaN NaN
16 2450926.0 48082.0 1591 144.0 541501.0 527.0 400.0 1.0 1.0 13 1.0 83.51 7.51 91.02 81.26 20.31 73.48 8.42 1.61 109.08 NaN NaN NaN
17 2450924.0 48257.0 2000 144.0 277151.0 1877.0 50.0 1.0 1.0 13 6.0 350.40 14.01 364.41 20.61 247.98 255.79 62.44 32.17 282.60 NaN NaN NaN
18 NaN NaN 935 409.0 829696.0 NaN NaN NaN 1.0 14 NaN 708.18 49.57 757.75 NaN NaN 559.46 NaN NaN NaN NaN NaN NaN
19 2451933.0 41472.0 1100 835.0 747820.0 2733.0 446.0 1.0 1.0 15 1.0 9.43 0.75 10.18 35.62 48.33 8.48 0.61 0.34 84.70 NaN NaN NaN
20 2450914.0 51589.0 1903 222.0 1815885.0 5148.0 411.0 2.0 1.0 16 24.0 2406.00 72.18 2478.18 19.02 349.20 505.26 722.28 1178.46 440.40 NaN NaN NaN
21 2450924.0 34013.0 1750 139.0 524921.0 3159.0 950.0 2.0 1.0 16 15.0 181.65 10.89 192.54 98.09 60.45 74.47 8.57 98.61 169.43 NaN NaN NaN
22 2451547.0 44125.0 1285 292.0 1532238.0 2533.0 828.0 1.0 1.0 18 56.0 199.36 9.96 209.32 57.84 89.04 95.69 14.51 89.16 156.84 NaN NaN NaN
23 2451491.0 44663.0 1100 292.0 187471.0 1924.0 424.0 2.0 1.0 18 13.0 419.25 12.57 431.82 58.46 226.72 37.73 343.36 38.16 297.75 NaN NaN NaN
24 2451376.0 56165.0 1294 104.0 1392417.0 1141.0 312.0 1.0 1.0 19 14.0 359.24 32.33 391.57 13.77 517.30 283.79 45.27 30.18 563.40 NaN NaN NaN
25 2451493.0 50425.0 1304 762.0 1325860.0 758.0 856.0 1.0 1.0 19 78.0 2391.48 47.82 2439.30 78.85 2602.86 2032.75 243.93 114.80 2729.53 NaN NaN NaN
26 2451280.0 33889.0 190 626.0 854970.0 2561.0 305.0 1.0 1.0 21 27.0 1778.76 53.36 1832.12 73.43 495.72 160.08 1068.32 550.36 622.51 NaN NaN NaN
27 2451277.0 40485.0 1051 935.0 1685822.0 6158.0 494.0 2.0 1.0 22 17.0 35.02 0.00 35.02 22.87 195.16 14.35 2.68 17.99 218.03 NaN NaN NaN
28 2451231.0 29254.0 475 935.0 1247881.0 5718.0 555.0 2.0 1.0 22 6.0 113.94 9.11 123.05 66.52 53.40 37.60 57.25 19.09 129.03 NaN NaN NaN
29 2452771.0 51900.0 1953 669.0 1890707.0 5392.0 30.0 2.0 1.0 23 80.0 5883.20 294.16 6177.36 52.40 2848.80 4824.22 328.28 730.70 3195.36 NaN NaN NaN
30 2452213.0 40442.0 1665 69.0 1359322.0 2796.0 270.0 1.0 1.0 24 11.0 28.49 0.00 28.49 69.29 29.81 6.26 1.33 20.90 99.10 NaN NaN NaN
31 2452305.0 60624.0 1483 69.0 1553144.0 6578.0 765.0 1.0 1.0 24 78.0 1099.02 54.95 1153.97 27.69 328.38 1033.07 58.03 7.92 411.02 NaN NaN NaN
32 2451053.0 35984.0 373 838.0 1564003.0 1743.0 883.0 1.0 1.0 25 18.0 42.12 2.52 44.64 57.38 6.12 37.48 2.04 2.60 66.02 NaN NaN NaN
33 2451079.0 50088.0 1304 838.0 77813.0 3196.0 932.0 1.0 1.0 25 39.0 772.59 46.35 818.94 28.93 178.23 347.66 50.99 373.94 253.51 NaN NaN NaN
34 2451966.0 49139.0 1085 780.0 637321.0 1532.0 590.0 2.0 1.0 27 84.0 382.20 0.00 382.20 97.85 154.56 259.89 13.45 108.86 252.41 NaN NaN NaN
35 2451964.0 49463.0 1935 780.0 178335.0 4892.0 896.0 1.0 1.0 27 22.0 59.84 1.79 61.63 38.22 137.72 43.68 6.62 9.54 177.73 NaN NaN NaN
36 2451259.0 35185.0 1334 631.0 1723855.0 885.0 868.0 2.0 1.0 29 6.0 5.04 0.45 5.49 85.50 15.96 3.83 0.03 1.18 101.91 NaN NaN NaN
37 2451174.0 32214.0 1234 631.0 135738.0 5274.0 10.0 2.0 1.0 29 22.0 41.80 3.76 45.56 18.82 985.16 17.13 24.17 0.50 1007.74 NaN NaN NaN
38 2451983.0 33769.0 205 120.0 222350.0 2461.0 125.0 2.0 1.0 32 41.0 2092.23 167.37 2259.60 14.26 987.28 941.50 149.59 1001.14 1168.91 NaN NaN NaN
39 2451392.0 48895.0 205 971.0 934775.0 429.0 883.0 1.0 1.0 34 13.0 208.78 16.70 225.48 77.95 223.73 198.34 3.65 6.79 318.38 NaN NaN NaN
40 2452196.0 33535.0 1537 958.0 539558.0 6809.0 107.0 2.0 1.0 35 60.0 144.00 0.00 144.00 36.15 2167.20 87.84 39.87 16.29 2203.35 NaN NaN NaN
41 2452306.0 40321.0 1117 8.0 1243218.0 3988.0 711.0 1.0 1.0 36 45.0 999.45 79.95 1079.40 29.51 35.10 499.72 439.76 59.97 144.56 NaN NaN NaN
42 2452317.0 53999.0 1705 8.0 882385.0 NaN NaN 2.0 1.0 36 NaN NaN 3.49 NaN NaN NaN 7.49 13.58 NaN NaN NaN NaN NaN
43 2452279.0 41984.0 631 722.0 465142.0 3315.0 735.0 1.0 1.0 36 7.0 541.31 43.30 584.61 71.10 241.36 519.65 10.18 11.48 355.76 NaN NaN NaN
44 2452128.0 30131.0 415 252.0 491912.0 5028.0 144.0 2.0 1.0 37 85.0 8562.90 513.77 9076.67 8.17 366.35 4195.82 3493.66 873.42 888.29 NaN NaN NaN
45 2451271.0 44173.0 1670 890.0 1681246.0 5780.0 714.0 1.0 1.0 41 17.0 1327.36 79.64 1407.00 49.73 558.79 66.36 731.38 529.62 688.16 NaN NaN NaN
46 2451092.0 43741.0 130 423.0 1577815.0 3651.0 487.0 1.0 1.0 42 13.0 422.24 8.44 430.68 48.27 551.20 329.34 15.79 77.11 607.91 NaN NaN NaN
47 2451033.0 54994.0 1219 229.0 1611739.0 3649.0 912.0 2.0 1.0 42 43.0 1240.55 0.00 1240.55 86.84 68.80 719.51 359.51 161.53 155.64 NaN NaN NaN
48 2451073.0 52318.0 1820 152.0 134560.0 4215.0 223.0 1.0 1.0 42 13.0 475.54 9.51 485.05 73.37 317.07 128.39 197.87 149.28 399.95 NaN NaN NaN
49 2452295.0 39258.0 597 606.0 1581204.0 3389.0 621.0 2.0 1.0 45 39.0 2703.87 243.34 2947.21 59.97 386.10 1487.12 790.88 425.87 689.41 NaN NaN NaN
50 2451354.0 60360.0 992 598.0 194443.0 4161.0 832.0 2.0 1.0 46 47.0 3742.14 149.68 3891.82 24.47 379.29 3442.76 59.87 239.51 553.44 NaN NaN NaN
51 NaN 59918.0 398 NaN NaN 3068.0 NaN 1.0 NaN 46 38.0 NaN NaN 453.29 51.61 207.48 104.60 86.12 NaN 276.52 NaN NaN NaN
52 2451177.0 58870.0 368 903.0 1256944.0 382.0 373.0 1.0 1.0 47 1.0 8.12 0.73 8.85 19.08 7.43 3.81 0.77 3.54 27.24 NaN NaN NaN
53 2452738.0 29363.0 199 843.0 1862359.0 2275.0 391.0 2.0 1.0 48 5.0 199.35 17.94 217.29 11.83 112.95 191.37 0.71 7.27 142.72 NaN NaN NaN
54 2452745.0 44637.0 1215 202.0 1047097.0 5374.0 251.0 2.0 1.0 48 10.0 392.20 27.45 419.65 10.16 116.00 152.95 224.89 14.36 153.61 NaN NaN NaN
55 2451892.0 35637.0 1592 590.0 103157.0 6724.0 91.0 2.0 1.0 49 21.0 496.23 29.77 526.00 48.23 31.92 282.85 142.96 70.42 109.92 NaN NaN NaN
56 2451769.0 38709.0 311 517.0 945253.0 3357.0 61.0 2.0 1.0 51 5.0 172.10 5.16 177.26 22.72 64.20 170.37 1.59 0.14 92.08 NaN NaN NaN
57 2451102.0 32082.0 266 831.0 173053.0 4865.0 230.0 2.0 1.0 52 13.0 911.04 0.00 911.04 21.65 378.17 619.50 253.63 37.91 399.82 NaN NaN NaN
58 2451088.0 55568.0 514 810.0 1866272.0 3734.0 196.0 2.0 1.0 52 25.0 113.50 1.13 114.63 62.63 125.50 30.64 25.68 57.18 189.26 NaN NaN NaN
59 2451573.0 36729.0 1006 672.0 508248.0 5690.0 885.0 1.0 1.0 53 1.0 2.23 0.08 2.31 26.56 1.48 0.20 0.89 1.14 28.12 NaN NaN NaN
60 2452729.0 48880.0 1707 157.0 1042828.0 4295.0 162.0 1.0 1.0 54 11.0 95.48 3.81 99.29 93.36 8.36 34.37 36.05 25.06 105.53 NaN NaN NaN
61 2452040.0 43895.0 350 297.0 869419.0 5541.0 463.0 1.0 1.0 55 11.0 252.67 12.63 265.30 20.45 63.14 194.55 42.42 15.70 96.22 NaN NaN NaN
62 2452339.0 46469.0 357 967.0 972821.0 2228.0 82.0 1.0 1.0 60 78.0 2733.90 54.67 2788.57 60.37 0.00 683.47 1558.32 492.11 115.04 NaN NaN NaN
63 2452254.0 40433.0 1113 197.0 1420275.0 5589.0 703.0 1.0 1.0 62 6.0 446.76 26.80 473.56 67.62 213.66 58.07 15.54 373.15 308.08 NaN NaN NaN
64 2452701.0 35838.0 1818 129.0 305648.0 NaN 488.0 NaN 1.0 63 NaN NaN 11.73 NaN NaN NaN 172.06 NaN NaN 568.77 NaN NaN NaN
65 2452596.0 29520.0 1831 129.0 1086498.0 2400.0 302.0 1.0 1.0 63 16.0 78.56 0.00 78.56 96.23 49.60 43.99 21.43 13.14 145.83 NaN NaN NaN
66 2452604.0 36240.0 1513 129.0 479318.0 1264.0 610.0 2.0 1.0 63 28.0 216.16 19.45 235.61 57.17 242.76 108.08 104.83 3.25 319.38 NaN NaN NaN
67 2452593.0 55466.0 723 17.0 145292.0 437.0 782.0 2.0 1.0 64 19.0 583.49 40.84 624.33 54.92 392.35 280.07 203.29 100.13 488.11 NaN NaN NaN
68 2452556.0 56489.0 913 17.0 492805.0 2019.0 33.0 1.0 1.0 64 34.0 2325.60 0.00 2325.60 57.60 1987.30 1046.52 575.58 703.50 2044.90 NaN NaN NaN
69 2452437.0 54978.0 1125 17.0 569529.0 3161.0 193.0 1.0 1.0 64 66.0 6903.60 0.00 6903.60 76.02 2987.82 6213.24 352.08 338.28 3063.84 NaN NaN NaN
70 2452346.0 53160.0 1629 766.0 1603765.0 4015.0 465.0 2.0 1.0 66 15.0 630.75 25.23 655.98 2.26 336.30 491.98 80.48 58.29 363.79 NaN NaN NaN
71 2452555.0 43088.0 1705 624.0 529565.0 2324.0 930.0 1.0 1.0 67 41.0 594.09 23.76 617.85 40.24 1063.54 160.40 56.37 377.32 1127.54 NaN NaN NaN
72 2451258.0 43812.0 481 564.0 496988.0 6773.0 205.0 2.0 1.0 68 21.0 178.50 5.35 183.85 96.73 53.76 82.11 75.18 21.21 155.84 NaN NaN NaN
73 2451256.0 50305.0 196 942.0 875823.0 2104.0 738.0 1.0 1.0 71 2.0 13.48 0.13 13.61 91.25 2.92 6.33 5.14 2.01 94.30 NaN NaN NaN
74 2451294.0 44684.0 205 239.0 1910912.0 233.0 1.0 2.0 1.0 71 25.0 188.00 16.92 204.92 44.05 51.25 150.40 6.39 31.21 112.22 NaN NaN NaN
75 2451329.0 29997.0 1225 239.0 195885.0 3539.0 146.0 2.0 1.0 71 5.0 164.65 1.64 166.29 75.66 205.80 74.09 12.67 77.89 283.10 NaN NaN NaN
76 2451829.0 50278.0 521 602.0 1271817.0 6019.0 468.0 1.0 1.0 72 3.0 166.41 1.66 168.07 1.14 64.92 59.90 62.84 43.67 67.72 NaN NaN NaN
77 2451174.0 57809.0 1540 337.0 767720.0 4103.0 886.0 2.0 1.0 74 4.0 36.32 0.00 36.32 38.54 42.96 12.71 6.13 17.48 81.50 NaN NaN NaN
78 2452279.0 52274.0 569 531.0 78088.0 234.0 580.0 2.0 1.0 76 1.0 76.51 6.88 83.39 66.92 30.28 56.61 19.70 0.20 104.08 NaN NaN NaN
79 2452242.0 52421.0 1627 531.0 1630980.0 4166.0 352.0 1.0 1.0 76 15.0 796.05 31.84 827.89 91.64 176.85 278.61 243.19 274.25 300.33 NaN NaN NaN
80 2451201.0 32557.0 1856 102.0 622349.0 4796.0 43.0 2.0 1.0 77 10.0 569.40 45.55 614.95 45.00 621.20 529.54 19.93 19.93 711.75 NaN NaN NaN
81 2451155.0 53923.0 1741 529.0 1758891.0 3500.0 309.0 1.0 1.0 78 13.0 1077.83 64.66 1142.49 77.87 576.81 506.58 457.00 114.25 719.34 NaN NaN NaN
82 2452290.0 54248.0 31 17.0 382863.0 6073.0 483.0 1.0 1.0 79 34.0 797.64 71.78 869.42 57.39 1296.08 71.78 79.84 646.02 1425.25 NaN NaN NaN
83 2451154.0 51844.0 13 368.0 1254797.0 4380.0 916.0 2.0 1.0 80 64.0 6830.08 68.30 6898.38 85.70 148.48 6625.17 127.04 77.87 302.48 NaN NaN NaN
84 2451281.0 48144.0 358 625.0 459305.0 510.0 915.0 1.0 1.0 81 22.0 1416.58 42.49 1459.07 16.86 849.86 1388.24 23.52 4.82 909.21 NaN NaN NaN
85 2451214.0 55537.0 1543 625.0 944226.0 463.0 147.0 2.0 1.0 81 5.0 0.00 0.00 0.00 94.53 24.55 0.00 0.00 0.00 119.08 NaN NaN NaN
86 2451369.0 NaN 1790 512.0 NaN 3587.0 NaN 1.0 NaN 82 NaN 1491.00 NaN NaN NaN 545.30 NaN 735.06 NaN 707.47 NaN NaN NaN
87 2451471.0 50769.0 1780 896.0 1082287.0 645.0 356.0 1.0 1.0 82 8.0 847.84 42.39 890.23 40.52 77.04 576.53 208.90 62.41 159.95 NaN NaN NaN
88 2451533.0 34774.0 1996 896.0 1427925.0 1401.0 230.0 2.0 1.0 82 43.0 1399.65 55.98 1455.63 74.63 447.63 839.79 156.76 403.10 578.24 NaN NaN NaN
89 2452677.0 50033.0 1671 678.0 842053.0 5314.0 175.0 1.0 1.0 83 21.0 1151.01 23.02 1174.03 28.22 146.16 115.10 973.75 62.16 197.40 NaN NaN NaN
90 2452530.0 44806.0 1951 91.0 1034463.0 114.0 165.0 1.0 1.0 84 5.0 323.00 19.38 342.38 5.27 171.25 261.63 43.57 17.80 195.90 NaN NaN NaN
91 2452550.0 39316.0 1482 91.0 222509.0 5658.0 7.0 2.0 1.0 84 63.0 1733.76 156.03 1889.79 98.99 1155.42 208.05 671.31 854.40 1410.44 NaN NaN NaN
92 2452550.0 56385.0 984 91.0 1844056.0 137.0 818.0 2.0 1.0 84 52.0 112.84 0.00 112.84 47.55 130.00 44.00 68.84 0.00 177.55 NaN NaN NaN
93 2452743.0 53098.0 363 560.0 1435175.0 1237.0 452.0 1.0 1.0 86 25.0 50.00 4.00 54.00 95.65 2.50 29.00 16.38 4.62 102.15 NaN NaN NaN
94 2452805.0 37053.0 1039 359.0 705875.0 2076.0 430.0 2.0 1.0 86 12.0 100.44 3.01 103.45 81.54 343.32 50.22 6.52 43.70 427.87 NaN NaN NaN
95 2451604.0 NaN 920 NaN 1393955.0 NaN NaN NaN NaN 87 17.0 NaN NaN NaN 35.41 NaN 213.43 NaN 0.17 NaN NaN NaN NaN
96 2452317.0 32925.0 1685 272.0 1361123.0 1963.0 403.0 1.0 1.0 88 34.0 146.20 0.00 146.20 22.87 1376.66 86.25 23.38 36.57 1399.53 NaN NaN NaN
97 2452260.0 58521.0 1679 110.0 341664.0 7018.0 372.0 2.0 1.0 88 70.0 1168.30 70.09 1238.39 37.61 1168.30 198.61 96.96 872.73 1276.00 NaN NaN NaN
98 2451907.0 56892.0 788 994.0 751267.0 6036.0 52.0 1.0 1.0 89 1.0 131.14 0.00 131.14 75.40 53.76 111.46 17.51 2.17 129.16 NaN NaN NaN

store_sales (first 100 rows)

SS_SOLD_DATE_SK SS_SOLD_TIME_SK SS_ITEM_SK SS_CUSTOMER_SK SS_CDEMO_SK SS_HDEMO_SK SS_ADDR_SK SS_STORE_SK SS_PROMO_SK SS_TICKET_NUMBER SS_QUANTITY SS_WHOLESALE_COST SS_LIST_PRICE SS_SALES_PRICE SS_EXT_DISCOUNT_AMT SS_EXT_SALES_PRICE SS_EXT_WHOLESALE_COST SS_EXT_LIST_PRICE SS_EXT_TAX SS_COUPON_AMT SS_NET_PAID SS_NET_PAID_INC_TAX SS_NET_PROFIT
0 2451813.0 65495.0 1091 6.0 591617.0 3428.0 839.0 2.0 2.0 1 79.0 11.41 18.71 2.80 99.54 221.20 901.39 1478.09 6.08 99.54 121.66 127.74 -779.73
1 2451813.0 65495.0 1478 6.0 591617.0 3428.0 839.0 2.0 1.0 1 37.0 63.63 101.17 41.47 46.03 1534.39 2354.31 3743.29 59.53 46.03 1488.36 1547.89 -865.95
2 2451813.0 65495.0 1961 6.0 591617.0 3428.0 839.0 2.0 1.0 1 99.0 80.52 137.68 83.98 0.00 8314.02 7971.48 13630.32 0.00 0.00 8314.02 8314.02 342.54
3 2451813.0 65495.0 470 6.0 591617.0 3428.0 839.0 2.0 1.0 1 14.0 57.37 76.30 6.10 0.00 85.40 803.18 1068.20 0.00 0.00 85.40 85.40 -717.78
4 2451813.0 65495.0 404 6.0 591617.0 3428.0 839.0 2.0 2.0 1 100.0 25.08 36.86 0.73 0.00 73.00 2508.00 3686.00 6.57 0.00 73.00 79.57 -2435.00
5 2451813.0 65495.0 1813 6.0 591617.0 3428.0 839.0 2.0 2.0 1 91.0 93.48 108.43 93.24 0.00 8484.84 8506.68 9867.13 254.54 0.00 8484.84 8739.38 -21.84
6 2451813.0 65495.0 1439 6.0 591617.0 3428.0 839.0 2.0 1.0 1 5.0 10.68 15.91 6.68 0.00 33.40 53.40 79.55 2.33 0.00 33.40 35.73 -20.00
7 2451813.0 65495.0 203 6.0 591617.0 3428.0 839.0 2.0 3.0 1 72.0 84.72 111.83 61.50 0.00 4428.00 6099.84 8051.76 177.12 0.00 4428.00 4605.12 -1671.84
8 2451813.0 65495.0 1837 6.0 591617.0 3428.0 839.0 2.0 1.0 1 14.0 11.54 11.77 0.00 0.00 0.00 161.56 164.78 0.00 0.00 0.00 0.00 -161.56
9 2451813.0 65495.0 1484 6.0 591617.0 3428.0 839.0 2.0 3.0 1 58.0 4.57 5.34 3.52 0.00 204.16 265.06 309.72 0.00 0.00 204.16 204.16 -60.90
10 2451813.0 65495.0 1901 6.0 591617.0 3428.0 839.0 2.0 1.0 1 44.0 31.07 54.99 24.19 0.00 1064.36 1367.08 2419.56 85.14 0.00 1064.36 1149.50 -302.72
11 2451813.0 65495.0 257 6.0 591617.0 3428.0 839.0 2.0 1.0 1 88.0 52.41 63.94 49.23 0.00 4332.24 4612.08 5626.72 259.93 0.00 4332.24 4592.17 -279.84
12 2451813.0 65495.0 365 6.0 591617.0 3428.0 839.0 2.0 2.0 1 50.0 67.71 126.61 87.36 0.00 4368.00 3385.50 6330.50 349.44 0.00 4368.00 4717.44 982.50
13 2451813.0 65495.0 989 6.0 591617.0 3428.0 839.0 2.0 3.0 1 65.0 27.16 52.14 41.19 0.00 2677.35 1765.40 3389.10 214.18 0.00 2677.35 2891.53 911.95
14 2451524.0 75316.0 61 284.0 1712478.0 4672.0 266.0 2.0 1.0 2 65.0 93.86 158.62 34.89 0.00 2267.85 6100.90 10310.30 45.35 0.00 2267.85 2313.20 -3833.05
15 2451524.0 75316.0 1669 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 93.0 35.87 49.14 15.23 0.00 1416.39 3335.91 4570.02 113.31 0.00 1416.39 1529.70 -1919.52
16 2451524.0 75316.0 686 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 30.0 2.27 3.83 1.11 0.00 33.30 68.10 114.90 0.00 0.00 33.30 33.30 -34.80
17 2451524.0 75316.0 1142 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 58.0 53.09 58.39 7.59 0.00 440.22 3079.22 3386.62 0.00 0.00 440.22 440.22 -2639.00
18 NaN 75316.0 1771 NaN NaN 4672.0 NaN 2.0 NaN 2 NaN 17.12 19.85 NaN NaN NaN NaN NaN 19.07 NaN NaN 495.84 NaN
19 2451524.0 75316.0 1336 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 79.0 88.02 128.50 69.39 4549.90 5481.81 6953.58 10151.50 83.87 4549.90 931.91 1015.78 -6021.67
20 2451524.0 75316.0 1030 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 25.0 74.26 89.11 35.64 0.00 891.00 1856.50 2227.75 8.91 0.00 891.00 899.91 -965.50
21 2451524.0 75316.0 1330 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 78.0 65.71 88.70 23.06 341.74 1798.68 5125.38 6918.60 131.12 341.74 1456.94 1588.06 -3668.44
22 2451524.0 75316.0 1792 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 88.0 64.43 79.89 41.54 0.00 3655.52 5669.84 7030.32 146.22 0.00 3655.52 3801.74 -2014.32
23 2451524.0 75316.0 565 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 49.0 6.55 7.86 7.46 0.00 365.54 320.95 385.14 0.00 0.00 365.54 365.54 44.59
24 2451524.0 75316.0 56 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 4.0 13.46 15.34 12.57 0.00 50.28 53.84 61.36 4.02 0.00 50.28 54.30 -3.56
25 2451524.0 75316.0 406 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 74.0 16.55 17.21 4.47 0.00 330.78 1224.70 1273.54 0.00 0.00 330.78 330.78 -893.92
26 2451524.0 75316.0 740 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 71.0 36.01 64.09 3.20 0.00 227.20 2556.71 4550.39 4.54 0.00 227.20 231.74 -2329.51
27 2451524.0 75316.0 992 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 36.0 61.23 93.06 11.16 0.00 401.76 2204.28 3350.16 28.12 0.00 401.76 429.88 -1802.52
28 2451524.0 75316.0 991 284.0 1712478.0 4672.0 266.0 2.0 1.0 2 62.0 77.97 85.76 79.75 0.00 4944.50 4834.14 5317.12 0.00 0.00 4944.50 4944.50 110.36
29 2452638.0 50412.0 150 47.0 586372.0 697.0 622.0 1.0 2.0 3 82.0 56.14 111.15 46.68 0.00 3827.76 4603.48 9114.30 306.22 0.00 3827.76 4133.98 -775.72
30 2452638.0 50412.0 672 47.0 586372.0 697.0 622.0 1.0 1.0 3 96.0 98.02 136.24 104.90 0.00 10070.40 9409.92 13079.04 100.70 0.00 10070.40 10171.10 660.48
31 NaN NaN 247 NaN NaN NaN 622.0 1.0 3.0 3 NaN NaN 130.66 NaN NaN 3104.46 NaN 3527.82 124.17 NaN NaN NaN NaN
32 2452638.0 50412.0 912 47.0 586372.0 697.0 622.0 1.0 3.0 3 42.0 97.03 178.53 7.14 0.00 299.88 4075.26 7498.26 17.99 0.00 299.88 317.87 -3775.38
33 2452638.0 50412.0 15 47.0 586372.0 697.0 622.0 1.0 2.0 3 64.0 74.69 120.25 2.40 0.00 153.60 4780.16 7696.00 3.07 0.00 153.60 156.67 -4626.56
34 2452638.0 50412.0 1719 47.0 586372.0 697.0 622.0 1.0 2.0 3 17.0 72.38 111.46 75.79 0.00 1288.43 1230.46 1894.82 38.65 0.00 1288.43 1327.08 57.97
35 2452638.0 50412.0 78 47.0 586372.0 697.0 622.0 1.0 3.0 3 88.0 27.95 38.57 26.99 403.77 2375.12 2459.60 3394.16 0.00 403.77 1971.35 1971.35 -488.25
36 2452638.0 50412.0 1539 47.0 586372.0 697.0 622.0 1.0 2.0 3 4.0 95.75 146.49 43.94 0.00 175.76 383.00 585.96 5.27 0.00 175.76 181.03 -207.24
37 2452638.0 50412.0 771 47.0 586372.0 697.0 622.0 1.0 2.0 3 79.0 44.66 83.06 17.44 1115.98 1377.76 3528.14 6561.74 5.23 1115.98 261.78 267.01 -3266.36
38 2452638.0 50412.0 246 47.0 586372.0 697.0 622.0 1.0 3.0 3 56.0 4.31 6.76 0.06 3.22 3.36 241.36 378.56 0.01 3.22 0.14 0.15 -241.22
39 2452638.0 50412.0 1063 47.0 586372.0 697.0 622.0 1.0 2.0 3 27.0 37.04 58.89 55.35 0.00 1494.45 1000.08 1590.03 29.88 0.00 1494.45 1524.33 494.37
40 2452638.0 50412.0 1545 47.0 586372.0 697.0 622.0 1.0 1.0 3 4.0 75.67 130.15 35.14 0.00 140.56 302.68 520.60 9.83 0.00 140.56 150.39 -162.12
41 2452638.0 50412.0 715 47.0 586372.0 697.0 622.0 1.0 3.0 3 53.0 23.04 44.00 26.40 0.00 1399.20 1221.12 2332.00 13.99 0.00 1399.20 1413.19 178.08
42 2452638.0 50412.0 648 47.0 586372.0 697.0 622.0 1.0 1.0 3 98.0 85.00 132.60 90.16 4506.19 8835.68 8330.00 12994.80 0.00 4506.19 4329.49 4329.49 -4000.51
43 2451438.0 38195.0 344 814.0 874786.0 1511.0 83.0 2.0 2.0 4 43.0 54.34 107.59 87.14 0.00 3747.02 2336.62 4626.37 299.76 0.00 3747.02 4046.78 1410.40
44 2451438.0 38195.0 397 814.0 874786.0 1511.0 83.0 2.0 2.0 4 23.0 2.91 3.57 3.53 32.47 81.19 66.93 82.11 0.97 32.47 48.72 49.69 -18.21
45 2451438.0 38195.0 1060 814.0 874786.0 1511.0 83.0 2.0 1.0 4 56.0 64.68 78.90 24.45 0.00 1369.20 3622.08 4418.40 0.00 0.00 1369.20 1369.20 -2252.88
46 2451438.0 38195.0 886 814.0 874786.0 1511.0 83.0 2.0 2.0 4 21.0 40.39 40.39 12.11 0.00 254.31 848.19 848.19 22.88 0.00 254.31 277.19 -593.88
47 2451438.0 38195.0 1904 814.0 874786.0 1511.0 83.0 2.0 1.0 4 41.0 67.18 78.60 5.50 0.00 225.50 2754.38 3222.60 13.53 0.00 225.50 239.03 -2528.88
48 2451438.0 38195.0 272 814.0 874786.0 1511.0 83.0 2.0 2.0 4 27.0 26.21 44.81 19.26 0.00 520.02 707.67 1209.87 46.80 0.00 520.02 566.82 -187.65
49 2451438.0 38195.0 86 814.0 874786.0 1511.0 83.0 2.0 1.0 4 86.0 64.67 123.51 55.57 0.00 4779.02 5561.62 10621.86 47.79 0.00 4779.02 4826.81 -782.60
50 2451438.0 38195.0 1465 814.0 874786.0 1511.0 83.0 2.0 1.0 4 17.0 54.26 105.80 9.52 116.52 161.84 922.42 1798.60 0.00 116.52 45.32 45.32 -877.10
51 2451438.0 38195.0 586 814.0 874786.0 1511.0 83.0 2.0 3.0 4 74.0 81.81 163.62 45.81 0.00 3389.94 6053.94 12107.88 271.19 0.00 3389.94 3661.13 -2664.00
52 2451438.0 38195.0 908 814.0 874786.0 1511.0 83.0 2.0 2.0 4 23.0 53.28 77.78 1.55 21.03 35.65 1225.44 1788.94 1.16 21.03 14.62 15.78 -1210.82
53 2451465.0 53976.0 1826 246.0 963544.0 5042.0 940.0 2.0 1.0 5 60.0 69.54 112.65 57.45 0.00 3447.00 4172.40 6759.00 34.47 0.00 3447.00 3481.47 -725.40
54 2451465.0 53976.0 1057 246.0 963544.0 5042.0 940.0 2.0 1.0 5 52.0 16.33 32.33 31.68 0.00 1647.36 849.16 1681.16 115.31 0.00 1647.36 1762.67 798.20
55 2451465.0 53976.0 1540 246.0 963544.0 5042.0 940.0 2.0 2.0 5 83.0 74.15 89.72 63.70 0.00 5287.10 6154.45 7446.76 422.96 0.00 5287.10 5710.06 -867.35
56 2451465.0 53976.0 691 246.0 963544.0 5042.0 940.0 2.0 3.0 5 15.0 21.21 33.93 30.53 0.00 457.95 318.15 508.95 22.89 0.00 457.95 480.84 139.80
57 2451465.0 53976.0 502 246.0 963544.0 5042.0 940.0 2.0 3.0 5 71.0 22.10 37.57 28.17 0.00 2000.07 1569.10 2667.47 180.00 0.00 2000.07 2180.07 430.97
58 2451465.0 53976.0 1162 246.0 963544.0 5042.0 940.0 2.0 2.0 5 36.0 7.93 12.92 7.36 0.00 264.96 285.48 465.12 0.00 0.00 264.96 264.96 -20.52
59 2451465.0 53976.0 1561 246.0 963544.0 5042.0 940.0 2.0 1.0 5 66.0 71.06 136.43 45.02 0.00 2971.32 4689.96 9004.38 59.42 0.00 2971.32 3030.74 -1718.64
60 2451465.0 53976.0 1790 246.0 963544.0 5042.0 940.0 2.0 2.0 5 66.0 21.01 28.57 5.99 0.00 395.34 1386.66 1885.62 7.90 0.00 395.34 403.24 -991.32
61 NaN 53976.0 1064 NaN 963544.0 NaN NaN 2.0 2.0 5 50.0 30.69 59.84 NaN NaN NaN 1534.50 NaN 0.00 NaN 1735.00 NaN 200.50
62 2451465.0 53976.0 1238 246.0 963544.0 5042.0 940.0 2.0 2.0 5 91.0 27.68 53.69 0.53 0.00 48.23 2518.88 4885.79 3.85 0.00 48.23 52.08 -2470.65
63 2451465.0 53976.0 28 246.0 963544.0 5042.0 940.0 2.0 2.0 5 76.0 89.78 103.24 50.58 0.00 3844.08 6823.28 7846.24 153.76 0.00 3844.08 3997.84 -2979.20
64 2451465.0 53976.0 1832 246.0 963544.0 5042.0 940.0 2.0 3.0 5 64.0 87.90 95.81 66.10 0.00 4230.40 5625.60 6131.84 0.00 0.00 4230.40 4230.40 -1395.20
65 2451465.0 53976.0 1190 246.0 963544.0 5042.0 940.0 2.0 2.0 5 60.0 41.72 52.98 32.31 0.00 1938.60 2503.20 3178.80 0.00 0.00 1938.60 1938.60 -564.60
66 NaN 53976.0 1780 246.0 NaN NaN 940.0 2.0 NaN 5 NaN NaN 77.52 11.62 0.00 732.06 NaN 4883.76 43.92 0.00 NaN NaN NaN
67 2451465.0 53976.0 307 246.0 963544.0 5042.0 940.0 2.0 2.0 5 50.0 30.96 56.34 45.07 0.00 2253.50 1548.00 2817.00 22.53 0.00 2253.50 2276.03 705.50
68 NaN NaN 611 29.0 NaN 2092.0 NaN NaN 3.0 6 NaN NaN NaN NaN NaN 449.88 NaN NaN NaN NaN NaN NaN NaN
69 2452109.0 36794.0 849 29.0 506184.0 2092.0 800.0 1.0 3.0 6 31.0 49.78 77.15 69.43 0.00 2152.33 1543.18 2391.65 0.00 0.00 2152.33 2152.33 609.15
70 2452109.0 36794.0 821 29.0 506184.0 2092.0 800.0 1.0 2.0 6 62.0 85.07 159.08 76.35 0.00 4733.70 5274.34 9862.96 189.34 0.00 4733.70 4923.04 -540.64
71 2452109.0 36794.0 151 29.0 506184.0 2092.0 800.0 1.0 3.0 6 1.0 71.10 89.58 61.81 0.00 61.81 71.10 89.58 3.70 0.00 61.81 65.51 -9.29
72 2452109.0 36794.0 43 29.0 506184.0 2092.0 800.0 1.0 3.0 6 61.0 48.18 60.70 18.81 126.21 1147.41 2938.98 3702.70 71.48 126.21 1021.20 1092.68 -1917.78
73 2452109.0 36794.0 1933 29.0 506184.0 2092.0 800.0 1.0 2.0 6 42.0 64.46 70.26 32.31 0.00 1357.02 2707.32 2950.92 27.14 0.00 1357.02 1384.16 -1350.30
74 2452109.0 36794.0 1335 29.0 506184.0 2092.0 800.0 1.0 3.0 6 100.0 41.08 42.31 38.50 0.00 3850.00 4108.00 4231.00 346.50 0.00 3850.00 4196.50 -258.00
75 2452109.0 36794.0 97 29.0 506184.0 2092.0 800.0 1.0 3.0 6 64.0 86.35 152.83 122.26 6650.94 7824.64 5526.40 9781.12 35.21 6650.94 1173.70 1208.91 -4352.70
76 2452109.0 36794.0 395 29.0 506184.0 2092.0 800.0 1.0 3.0 6 94.0 62.67 99.64 97.64 0.00 9178.16 5890.98 9366.16 91.78 0.00 9178.16 9269.94 3287.18
77 2452109.0 36794.0 1849 29.0 506184.0 2092.0 800.0 1.0 3.0 6 72.0 55.49 93.77 55.32 0.00 3983.04 3995.28 6751.44 199.15 0.00 3983.04 4182.19 -12.24
78 2452109.0 36794.0 1235 29.0 506184.0 2092.0 800.0 1.0 3.0 6 100.0 4.45 7.87 7.24 0.00 724.00 445.00 787.00 57.92 0.00 724.00 781.92 279.00
79 2452260.0 46712.0 1657 954.0 890396.0 791.0 633.0 2.0 3.0 7 51.0 84.65 124.43 49.77 0.00 2538.27 4317.15 6345.93 76.14 0.00 2538.27 2614.41 -1778.88
80 2452260.0 46712.0 1829 954.0 890396.0 791.0 633.0 2.0 3.0 7 9.0 56.13 59.49 30.93 0.00 278.37 505.17 535.41 22.26 0.00 278.37 300.63 -226.80
81 2452260.0 NaN 437 954.0 890396.0 791.0 NaN NaN NaN 7 4.0 NaN NaN NaN NaN 278.60 203.68 366.60 22.28 NaN 278.60 300.88 NaN
82 2452260.0 46712.0 1749 954.0 NaN NaN NaN NaN 1.0 7 NaN NaN 72.02 NaN NaN NaN NaN NaN NaN NaN 4990.30 NaN 1141.70
83 2452260.0 46712.0 1027 954.0 890396.0 791.0 633.0 2.0 3.0 7 88.0 38.23 72.63 39.22 0.00 3451.36 3364.24 6391.44 138.05 0.00 3451.36 3589.41 87.12
84 2452260.0 46712.0 1029 954.0 890396.0 791.0 633.0 2.0 3.0 7 52.0 63.80 81.02 22.68 0.00 1179.36 3317.60 4213.04 23.58 0.00 1179.36 1202.94 -2138.24
85 2452260.0 46712.0 763 954.0 890396.0 791.0 633.0 2.0 2.0 7 69.0 99.85 113.82 110.40 0.00 7617.60 6889.65 7853.58 0.00 0.00 7617.60 7617.60 727.95
86 2452260.0 46712.0 261 954.0 890396.0 791.0 633.0 2.0 1.0 7 54.0 42.82 56.09 21.31 0.00 1150.74 2312.28 3028.86 92.05 0.00 1150.74 1242.79 -1161.54
87 2452260.0 46712.0 1177 954.0 890396.0 791.0 633.0 2.0 2.0 7 12.0 47.60 75.20 65.42 0.00 785.04 571.20 902.40 47.10 0.00 785.04 832.14 213.84
88 2452260.0 46712.0 543 954.0 890396.0 791.0 633.0 2.0 2.0 7 73.0 12.17 14.23 11.24 623.59 820.52 888.41 1038.79 5.90 623.59 196.93 202.83 -691.48
89 2452260.0 46712.0 685 954.0 890396.0 791.0 633.0 2.0 2.0 7 69.0 34.19 58.46 50.86 0.00 3509.34 2359.11 4033.74 210.56 0.00 3509.34 3719.90 1150.23
90 2452260.0 46712.0 1707 954.0 890396.0 791.0 633.0 2.0 3.0 7 82.0 69.53 87.60 34.16 0.00 2801.12 5701.46 7183.20 0.00 0.00 2801.12 2801.12 -2900.34
91 2452179.0 52209.0 469 944.0 578318.0 6045.0 19.0 1.0 1.0 8 90.0 81.63 151.83 113.87 9428.43 10248.30 7346.70 13664.70 40.99 9428.43 819.87 860.86 -6526.83
92 2452179.0 52209.0 403 944.0 578318.0 6045.0 19.0 1.0 1.0 8 87.0 31.78 63.24 16.44 0.00 1430.28 2764.86 5501.88 57.21 0.00 1430.28 1487.49 -1334.58
93 2452179.0 52209.0 1303 944.0 578318.0 6045.0 19.0 1.0 3.0 8 31.0 15.64 26.43 13.21 0.00 409.51 484.84 819.33 4.09 0.00 409.51 413.60 -75.33
94 2452179.0 52209.0 1141 944.0 578318.0 6045.0 19.0 1.0 2.0 8 95.0 21.29 33.85 20.64 0.00 1960.80 2022.55 3215.75 98.04 0.00 1960.80 2058.84 -61.75
95 2452179.0 52209.0 665 944.0 578318.0 6045.0 19.0 1.0 2.0 8 7.0 18.65 27.97 20.41 0.00 142.87 130.55 195.79 1.42 0.00 142.87 144.29 12.32
96 2452179.0 52209.0 571 944.0 578318.0 6045.0 19.0 1.0 2.0 8 54.0 36.99 47.71 27.67 0.00 1494.18 1997.46 2576.34 89.65 0.00 1494.18 1583.83 -503.28
97 2452179.0 52209.0 1203 944.0 578318.0 6045.0 19.0 1.0 2.0 8 95.0 91.80 93.63 75.84 6700.46 7204.80 8721.00 8894.85 5.04 6700.46 504.34 509.38 -8216.66
98 2452179.0 52209.0 951 944.0 578318.0 6045.0 19.0 1.0 2.0 8 83.0 14.11 27.37 3.28 0.00 272.24 1171.13 2271.71 13.61 0.00 272.24 285.85 -898.89

time_dim (first 100 rows)

T_TIME_SK T_TIME_ID T_TIME T_HOUR T_MINUTE T_SECOND T_AM_PM T_SHIFT T_SUB_SHIFT T_MEAL_TIME
0 0 AAAAAAAABAAAAAAA 0 0 0 0 AM third night NaN
1 1 AAAAAAAACAAAAAAA 1 0 0 1 AM third night NaN
2 2 AAAAAAAADAAAAAAA 2 0 0 2 AM third night NaN
3 3 AAAAAAAAEAAAAAAA 3 0 0 3 AM third night NaN
4 4 AAAAAAAAFAAAAAAA 4 0 0 4 AM third night NaN
5 5 AAAAAAAAGAAAAAAA 5 0 0 5 AM third night NaN
6 6 AAAAAAAAHAAAAAAA 6 0 0 6 AM third night NaN
7 7 AAAAAAAAIAAAAAAA 7 0 0 7 AM third night NaN
8 8 AAAAAAAAJAAAAAAA 8 0 0 8 AM third night NaN
9 9 AAAAAAAAKAAAAAAA 9 0 0 9 AM third night NaN
10 10 AAAAAAAALAAAAAAA 10 0 0 10 AM third night NaN
11 11 AAAAAAAAMAAAAAAA 11 0 0 11 AM third night NaN
12 12 AAAAAAAANAAAAAAA 12 0 0 12 AM third night NaN
13 13 AAAAAAAAOAAAAAAA 13 0 0 13 AM third night NaN
14 14 AAAAAAAAPAAAAAAA 14 0 0 14 AM third night NaN
15 15 AAAAAAAAABAAAAAA 15 0 0 15 AM third night NaN
16 16 AAAAAAAABBAAAAAA 16 0 0 16 AM third night NaN
17 17 AAAAAAAACBAAAAAA 17 0 0 17 AM third night NaN
18 18 AAAAAAAADBAAAAAA 18 0 0 18 AM third night NaN
19 19 AAAAAAAAEBAAAAAA 19 0 0 19 AM third night NaN
20 20 AAAAAAAAFBAAAAAA 20 0 0 20 AM third night NaN
21 21 AAAAAAAAGBAAAAAA 21 0 0 21 AM third night NaN
22 22 AAAAAAAAHBAAAAAA 22 0 0 22 AM third night NaN
23 23 AAAAAAAAIBAAAAAA 23 0 0 23 AM third night NaN
24 24 AAAAAAAAJBAAAAAA 24 0 0 24 AM third night NaN
25 25 AAAAAAAAKBAAAAAA 25 0 0 25 AM third night NaN
26 26 AAAAAAAALBAAAAAA 26 0 0 26 AM third night NaN
27 27 AAAAAAAAMBAAAAAA 27 0 0 27 AM third night NaN
28 28 AAAAAAAANBAAAAAA 28 0 0 28 AM third night NaN
29 29 AAAAAAAAOBAAAAAA 29 0 0 29 AM third night NaN
30 30 AAAAAAAAPBAAAAAA 30 0 0 30 AM third night NaN
31 31 AAAAAAAAACAAAAAA 31 0 0 31 AM third night NaN
32 32 AAAAAAAABCAAAAAA 32 0 0 32 AM third night NaN
33 33 AAAAAAAACCAAAAAA 33 0 0 33 AM third night NaN
34 34 AAAAAAAADCAAAAAA 34 0 0 34 AM third night NaN
35 35 AAAAAAAAECAAAAAA 35 0 0 35 AM third night NaN
36 36 AAAAAAAAFCAAAAAA 36 0 0 36 AM third night NaN
37 37 AAAAAAAAGCAAAAAA 37 0 0 37 AM third night NaN
38 38 AAAAAAAAHCAAAAAA 38 0 0 38 AM third night NaN
39 39 AAAAAAAAICAAAAAA 39 0 0 39 AM third night NaN
40 40 AAAAAAAAJCAAAAAA 40 0 0 40 AM third night NaN
41 41 AAAAAAAAKCAAAAAA 41 0 0 41 AM third night NaN
42 42 AAAAAAAALCAAAAAA 42 0 0 42 AM third night NaN
43 43 AAAAAAAAMCAAAAAA 43 0 0 43 AM third night NaN
44 44 AAAAAAAANCAAAAAA 44 0 0 44 AM third night NaN
45 45 AAAAAAAAOCAAAAAA 45 0 0 45 AM third night NaN
46 46 AAAAAAAAPCAAAAAA 46 0 0 46 AM third night NaN
47 47 AAAAAAAAADAAAAAA 47 0 0 47 AM third night NaN
48 48 AAAAAAAABDAAAAAA 48 0 0 48 AM third night NaN
49 49 AAAAAAAACDAAAAAA 49 0 0 49 AM third night NaN
50 50 AAAAAAAADDAAAAAA 50 0 0 50 AM third night NaN
51 51 AAAAAAAAEDAAAAAA 51 0 0 51 AM third night NaN
52 52 AAAAAAAAFDAAAAAA 52 0 0 52 AM third night NaN
53 53 AAAAAAAAGDAAAAAA 53 0 0 53 AM third night NaN
54 54 AAAAAAAAHDAAAAAA 54 0 0 54 AM third night NaN
55 55 AAAAAAAAIDAAAAAA 55 0 0 55 AM third night NaN
56 56 AAAAAAAAJDAAAAAA 56 0 0 56 AM third night NaN
57 57 AAAAAAAAKDAAAAAA 57 0 0 57 AM third night NaN
58 58 AAAAAAAALDAAAAAA 58 0 0 58 AM third night NaN
59 59 AAAAAAAAMDAAAAAA 59 0 0 59 AM third night NaN
60 60 AAAAAAAANDAAAAAA 60 0 1 0 AM third night NaN
61 61 AAAAAAAAODAAAAAA 61 0 1 1 AM third night NaN
62 62 AAAAAAAAPDAAAAAA 62 0 1 2 AM third night NaN
63 63 AAAAAAAAAEAAAAAA 63 0 1 3 AM third night NaN
64 64 AAAAAAAABEAAAAAA 64 0 1 4 AM third night NaN
65 65 AAAAAAAACEAAAAAA 65 0 1 5 AM third night NaN
66 66 AAAAAAAADEAAAAAA 66 0 1 6 AM third night NaN
67 67 AAAAAAAAEEAAAAAA 67 0 1 7 AM third night NaN
68 68 AAAAAAAAFEAAAAAA 68 0 1 8 AM third night NaN
69 69 AAAAAAAAGEAAAAAA 69 0 1 9 AM third night NaN
70 70 AAAAAAAAHEAAAAAA 70 0 1 10 AM third night NaN
71 71 AAAAAAAAIEAAAAAA 71 0 1 11 AM third night NaN
72 72 AAAAAAAAJEAAAAAA 72 0 1 12 AM third night NaN
73 73 AAAAAAAAKEAAAAAA 73 0 1 13 AM third night NaN
74 74 AAAAAAAALEAAAAAA 74 0 1 14 AM third night NaN
75 75 AAAAAAAAMEAAAAAA 75 0 1 15 AM third night NaN
76 76 AAAAAAAANEAAAAAA 76 0 1 16 AM third night NaN
77 77 AAAAAAAAOEAAAAAA 77 0 1 17 AM third night NaN
78 78 AAAAAAAAPEAAAAAA 78 0 1 18 AM third night NaN
79 79 AAAAAAAAAFAAAAAA 79 0 1 19 AM third night NaN
80 80 AAAAAAAABFAAAAAA 80 0 1 20 AM third night NaN
81 81 AAAAAAAACFAAAAAA 81 0 1 21 AM third night NaN
82 82 AAAAAAAADFAAAAAA 82 0 1 22 AM third night NaN
83 83 AAAAAAAAEFAAAAAA 83 0 1 23 AM third night NaN
84 84 AAAAAAAAFFAAAAAA 84 0 1 24 AM third night NaN
85 85 AAAAAAAAGFAAAAAA 85 0 1 25 AM third night NaN
86 86 AAAAAAAAHFAAAAAA 86 0 1 26 AM third night NaN
87 87 AAAAAAAAIFAAAAAA 87 0 1 27 AM third night NaN
88 88 AAAAAAAAJFAAAAAA 88 0 1 28 AM third night NaN
89 89 AAAAAAAAKFAAAAAA 89 0 1 29 AM third night NaN
90 90 AAAAAAAALFAAAAAA 90 0 1 30 AM third night NaN
91 91 AAAAAAAAMFAAAAAA 91 0 1 31 AM third night NaN
92 92 AAAAAAAANFAAAAAA 92 0 1 32 AM third night NaN
93 93 AAAAAAAAOFAAAAAA 93 0 1 33 AM third night NaN
94 94 AAAAAAAAPFAAAAAA 94 0 1 34 AM third night NaN
95 95 AAAAAAAAAGAAAAAA 95 0 1 35 AM third night NaN
96 96 AAAAAAAABGAAAAAA 96 0 1 36 AM third night NaN
97 97 AAAAAAAACGAAAAAA 97 0 1 37 AM third night NaN
98 98 AAAAAAAADGAAAAAA 98 0 1 38 AM third night NaN

warehouse (first 100 rows)

W_WAREHOUSE_SK W_WAREHOUSE_ID W_WAREHOUSE_NAME W_WAREHOUSE_SQ_FT W_STREET_NUMBER W_STREET_NAME W_STREET_TYPE W_SUITE_NUMBER W_CITY W_COUNTY W_STATE W_ZIP W_COUNTRY W_GMT_OFFSET
0 1 AAAAAAAABAAAAAAA Conventional childr 977787 651 6th Parkway Suite 470 Midway Williamson County TN 31904 United States -5

web_page (first 100 rows)

WP_WEB_PAGE_SK WP_WEB_PAGE_ID WP_REC_START_DATE WP_REC_END_DATE WP_CREATION_DATE_SK WP_ACCESS_DATE_SK WP_AUTOGEN_FLAG WP_CUSTOMER_SK WP_URL WP_TYPE WP_CHAR_COUNT WP_LINK_COUNT WP_IMAGE_COUNT WP_MAX_AD_COUNT
0 1 AAAAAAAABAAAAAAA 1997-09-03 None 2450810 2452620 Y 539.0 http://www.foo.com welcome 2531 8 3 4
1 2 AAAAAAAACAAAAAAA 1997-09-03 2000-09-02 2450814 2452580 N NaN http://www.foo.com protected 1564 4 3 1

web_returns (first 100 rows)

WR_RETURNED_DATE_SK WR_RETURNED_TIME_SK WR_ITEM_SK WR_REFUNDED_CUSTOMER_SK WR_REFUNDED_CDEMO_SK WR_REFUNDED_HDEMO_SK WR_REFUNDED_ADDR_SK WR_RETURNING_CUSTOMER_SK WR_RETURNING_CDEMO_SK WR_RETURNING_HDEMO_SK WR_RETURNING_ADDR_SK WR_WEB_PAGE_SK WR_REASON_SK WR_ORDER_NUMBER WR_RETURN_QUANTITY WR_RETURN_AMT WR_RETURN_TAX WR_RETURN_AMT_INC_TAX WR_FEE WR_RETURN_SHIP_COST WR_REFUNDED_CASH WR_REVERSED_CHARGE WR_ACCOUNT_CREDIT WR_NET_LOSS
0 2451653.0 7022.0 1750 224.0 1011635.0 3446.0 57.0 224.0 1011635.0 3446.0 57.0 1.0 1.0 1 10.0 698.20 13.96 712.16 18.63 820.30 300.22 382.06 15.92 852.89
1 2451627.0 64915.0 925 811.0 18405.0 199.0 793.0 811.0 18405.0 199.0 793.0 1.0 1.0 1 47.0 1248.79 49.95 1298.74 61.81 709.23 262.24 128.25 858.30 820.99
2 2452798.0 NaN 1455 NaN 31639.0 NaN 790.0 NaN 31639.0 2038.0 790.0 NaN 1.0 2 11.0 NaN 25.52 NaN NaN 16.72 NaN 16.36 165.47 NaN
3 2452243.0 23325.0 735 687.0 663037.0 1234.0 984.0 687.0 663037.0 1234.0 984.0 1.0 1.0 5 33.0 1820.94 54.62 1875.56 70.16 1000.23 1802.73 14.56 3.65 1125.01
4 2452305.0 73981.0 1909 552.0 1104998.0 2244.0 90.0 552.0 1104998.0 2244.0 90.0 1.0 1.0 5 18.0 82.08 7.38 89.46 35.63 1342.26 38.57 19.14 24.37 1385.27
5 2451288.0 74891.0 1897 650.0 1309189.0 128.0 420.0 650.0 1309189.0 128.0 420.0 1.0 1.0 7 16.0 1956.00 156.48 2112.48 22.56 221.76 215.16 504.84 1236.00 400.80
6 2451337.0 44242.0 469 377.0 1291615.0 653.0 891.0 377.0 1291615.0 653.0 891.0 1.0 1.0 7 3.0 134.40 0.00 134.40 78.06 108.78 108.86 15.06 10.48 186.84
7 2451278.0 48347.0 542 887.0 1781163.0 3486.0 762.0 887.0 1781163.0 3486.0 762.0 2.0 1.0 7 43.0 520.30 20.81 541.11 54.02 3468.38 504.69 14.36 1.25 3543.21
8 2452098.0 72741.0 109 559.0 1010209.0 2812.0 415.0 559.0 1010209.0 2812.0 415.0 1.0 1.0 10 4.0 79.68 2.39 82.07 11.40 54.52 58.16 1.50 20.02 68.31
9 2452065.0 46137.0 629 204.0 217410.0 1416.0 222.0 204.0 217410.0 1416.0 222.0 1.0 1.0 11 28.0 707.00 28.28 735.28 16.84 382.20 424.20 248.86 33.94 427.32
10 2451936.0 25850.0 1364 623.0 1546796.0 816.0 389.0 623.0 1546796.0 816.0 389.0 1.0 1.0 11 6.0 708.66 21.25 729.91 25.19 146.10 474.80 144.99 88.87 192.54
11 2452508.0 71077.0 925 10.0 1589848.0 6933.0 371.0 10.0 1589848.0 6933.0 371.0 1.0 1.0 12 26.0 528.84 37.01 565.85 90.97 237.12 449.51 23.00 56.33 365.10
12 2451590.0 30553.0 1928 36.0 1376937.0 2285.0 586.0 36.0 1376937.0 2285.0 586.0 1.0 1.0 13 16.0 417.60 25.05 442.65 22.13 539.36 50.11 128.62 238.87 586.54
13 2452495.0 NaN 907 758.0 NaN 2243.0 NaN 758.0 1696824.0 NaN NaN 1.0 NaN 14 4.0 NaN NaN NaN 11.84 NaN 9.39 NaN NaN NaN
14 2452566.0 67292.0 1583 337.0 970065.0 593.0 321.0 337.0 970065.0 593.0 321.0 1.0 1.0 14 5.0 219.85 15.38 235.23 28.94 233.90 147.29 42.81 29.75 278.22
15 NaN NaN 926 NaN NaN 2358.0 NaN 932.0 418645.0 NaN NaN NaN NaN 15 24.0 NaN NaN NaN 54.71 62.40 NaN 129.49 60.94 143.37
16 2452567.0 26030.0 1675 543.0 1118206.0 6669.0 732.0 543.0 1118206.0 6669.0 732.0 1.0 1.0 16 40.0 1479.60 103.57 1583.17 4.99 856.80 665.82 219.72 594.06 965.36
17 2452569.0 29129.0 1879 888.0 217580.0 5919.0 658.0 888.0 217580.0 5919.0 658.0 1.0 1.0 17 10.0 69.00 6.21 75.21 60.35 19.70 31.05 11.38 26.57 86.26
18 2451692.0 37442.0 200 623.0 1176118.0 1613.0 108.0 623.0 1176118.0 1613.0 108.0 1.0 1.0 18 11.0 1628.66 32.57 1661.23 13.11 506.22 1237.78 355.70 35.18 551.90
19 2451495.0 70505.0 793 84.0 1360384.0 4437.0 537.0 84.0 1360384.0 4437.0 537.0 1.0 1.0 18 23.0 447.58 17.90 465.48 30.56 302.22 331.20 51.20 65.18 350.68
20 2451396.0 74839.0 364 NaN NaN NaN NaN 767.0 NaN 3439.0 775.0 NaN 1.0 22 NaN NaN 0.00 NaN NaN 75.90 485.00 NaN NaN NaN
21 2451271.0 72837.0 188 141.0 718131.0 2368.0 405.0 141.0 718131.0 2368.0 405.0 2.0 1.0 22 30.0 247.20 9.88 257.08 23.57 717.30 229.89 15.05 2.26 750.75
22 2451430.0 NaN 313 764.0 NaN NaN NaN 764.0 1060754.0 5497.0 NaN NaN 1.0 22 79.0 NaN 0.00 0.00 92.68 NaN NaN 0.00 0.00 NaN
23 2452236.0 23926.0 997 618.0 8492.0 4766.0 440.0 618.0 8492.0 4766.0 440.0 1.0 1.0 24 9.0 107.46 3.22 110.68 54.67 33.03 33.31 68.21 5.94 90.92
24 2452273.0 38436.0 1815 71.0 1421648.0 5454.0 396.0 71.0 1421648.0 5454.0 396.0 1.0 1.0 24 8.0 252.08 15.12 267.20 62.43 12.72 133.60 29.62 88.86 90.27
25 2451372.0 50248.0 724 691.0 813091.0 5891.0 91.0 691.0 813091.0 5891.0 91.0 1.0 1.0 26 77.0 1088.78 43.55 1132.33 1.05 3811.50 163.31 397.95 527.52 3856.10
26 2451514.0 46416.0 1688 970.0 854030.0 2690.0 550.0 970.0 854030.0 2690.0 550.0 1.0 1.0 26 10.0 362.50 3.62 366.12 68.99 164.80 290.00 60.17 12.33 237.41
27 2451529.0 45968.0 500 943.0 58420.0 2297.0 421.0 943.0 58420.0 2297.0 421.0 1.0 1.0 26 35.0 340.20 13.60 353.80 50.62 453.60 336.79 2.25 1.16 517.82
28 2450982.0 37442.0 367 331.0 1565742.0 5600.0 258.0 331.0 1565742.0 5600.0 258.0 1.0 1.0 27 4.0 19.20 1.72 20.92 63.20 41.36 4.60 10.22 4.38 106.28
29 2450976.0 42382.0 274 968.0 169725.0 1529.0 286.0 968.0 169725.0 1529.0 286.0 1.0 1.0 27 11.0 380.49 15.21 395.70 76.70 77.66 144.58 11.79 224.12 169.57
30 2452492.0 36787.0 875 839.0 1060269.0 5299.0 82.0 839.0 1060269.0 5299.0 82.0 1.0 1.0 29 11.0 400.84 20.04 420.88 16.27 99.11 308.64 18.44 73.76 135.42
31 2451423.0 75368.0 1612 553.0 1687614.0 2228.0 289.0 553.0 1687614.0 2228.0 289.0 1.0 1.0 30 19.0 168.15 3.36 171.51 94.69 107.54 117.70 42.88 7.57 205.59
32 2451476.0 48229.0 80 962.0 12631.0 2900.0 369.0 962.0 12631.0 2900.0 369.0 1.0 1.0 30 5.0 18.20 0.54 18.74 11.66 8.25 2.54 5.79 9.87 20.45
33 NaN 43497.0 422 NaN 1006429.0 3340.0 251.0 318.0 1006429.0 3340.0 NaN NaN NaN 32 7.0 470.26 NaN 484.36 99.14 NaN 470.26 0.00 NaN NaN
34 2451486.0 253.0 1078 754.0 998787.0 3867.0 347.0 754.0 998787.0 3867.0 347.0 1.0 1.0 32 2.0 98.40 8.85 107.25 16.33 131.22 51.16 27.87 19.37 156.40
35 2451420.0 61938.0 1816 841.0 1808855.0 5916.0 330.0 841.0 1808855.0 5916.0 330.0 1.0 1.0 32 44.0 4496.36 314.74 4811.10 5.38 1570.80 4316.50 151.08 28.78 1890.92
36 2451622.0 68694.0 1327 758.0 1477303.0 5095.0 440.0 758.0 1477303.0 5095.0 440.0 1.0 1.0 33 5.0 1231.20 24.62 1255.82 13.24 580.20 295.48 823.43 112.29 618.06
37 2451734.0 55182.0 346 341.0 914970.0 5999.0 428.0 341.0 914970.0 5999.0 428.0 1.0 1.0 33 7.0 88.34 5.30 93.64 24.45 109.27 6.18 6.57 75.59 139.02
38 2451697.0 47575.0 1963 237.0 1089705.0 4773.0 841.0 237.0 1089705.0 4773.0 841.0 1.0 1.0 33 3.0 164.85 1.64 166.49 3.49 57.06 6.59 137.68 20.58 62.19
39 2451615.0 73881.0 1663 870.0 705124.0 5978.0 32.0 870.0 705124.0 5978.0 32.0 2.0 1.0 34 32.0 4588.16 183.52 4771.68 51.92 2136.96 917.63 3523.70 146.83 2372.40
40 2452120.0 67792.0 1789 39.0 1600609.0 4132.0 502.0 39.0 1600609.0 4132.0 502.0 2.0 1.0 36 16.0 496.96 34.78 531.74 71.96 773.12 134.17 261.20 101.59 879.86
41 2452135.0 32975.0 997 233.0 680344.0 3655.0 766.0 233.0 680344.0 3655.0 766.0 2.0 1.0 36 33.0 1560.57 0.00 1560.57 73.33 845.46 1201.63 326.63 32.31 918.79
42 2452038.0 60285.0 1243 96.0 1039516.0 6936.0 109.0 96.0 1039516.0 6936.0 109.0 2.0 1.0 36 91.0 15813.07 632.52 16445.59 65.73 8008.91 13441.10 1352.02 1019.95 8707.16
43 2451873.0 61736.0 823 984.0 1914824.0 7017.0 257.0 984.0 1914824.0 7017.0 257.0 2.0 1.0 38 54.0 2243.70 179.49 2423.19 60.32 1075.68 628.23 1373.14 242.33 1315.49
44 2451812.0 17353.0 1601 13.0 691848.0 1836.0 624.0 13.0 691848.0 1836.0 624.0 1.0 1.0 38 11.0 15.18 0.00 15.18 42.63 5.50 9.71 1.53 3.94 48.13
45 2452054.0 39091.0 1411 582.0 1892903.0 2624.0 392.0 582.0 1892903.0 2624.0 392.0 1.0 1.0 39 27.0 3078.54 30.78 3109.32 79.71 1835.19 1015.91 453.77 1608.86 1945.68
46 2452413.0 27263.0 671 730.0 781278.0 1291.0 963.0 730.0 781278.0 1291.0 963.0 1.0 1.0 40 13.0 1286.22 51.44 1337.66 97.11 95.16 424.45 17.23 844.54 243.71
47 2452476.0 28293.0 1929 777.0 803717.0 3657.0 150.0 777.0 803717.0 3657.0 150.0 2.0 1.0 40 9.0 103.32 1.03 104.35 31.68 2.79 76.45 7.25 19.62 35.50
48 2451905.0 55597.0 1441 775.0 962709.0 43.0 624.0 775.0 962709.0 43.0 624.0 2.0 1.0 41 56.0 4452.00 311.64 4763.64 63.92 3368.96 1958.88 797.79 1695.33 3744.52
49 2451845.0 42388.0 104 546.0 1391011.0 5229.0 847.0 546.0 1391011.0 5229.0 847.0 1.0 1.0 41 29.0 1387.36 69.36 1456.72 14.34 818.67 194.23 608.49 584.64 902.37
50 2451261.0 73439.0 1195 NaN NaN NaN 964.0 NaN NaN NaN 964.0 1.0 NaN 42 NaN NaN NaN NaN 58.60 192.76 80.02 54.48 39.46 NaN
51 2452078.0 22372.0 643 386.0 435559.0 2685.0 258.0 386.0 435559.0 2685.0 258.0 2.0 1.0 43 58.0 4257.20 85.14 4342.34 99.74 1530.04 2469.17 1609.22 178.81 1714.92
52 2451335.0 79473.0 1706 442.0 1432457.0 2425.0 840.0 442.0 1432457.0 2425.0 840.0 1.0 1.0 44 13.0 45.63 3.65 49.28 49.66 0.00 39.24 1.53 4.86 53.31
53 2451441.0 11487.0 1021 405.0 1361990.0 4975.0 407.0 405.0 1361990.0 4975.0 407.0 1.0 1.0 45 43.0 4438.89 133.16 4572.05 83.51 466.98 532.66 2187.48 1718.75 683.65
54 2452105.0 59457.0 979 913.0 1423984.0 4102.0 373.0 913.0 1423984.0 4102.0 373.0 2.0 1.0 46 61.0 704.55 49.31 753.86 33.45 3012.79 295.91 302.39 106.25 3095.55
55 2451677.0 33194.0 1975 918.0 1366834.0 2750.0 819.0 918.0 1366834.0 2750.0 819.0 2.0 1.0 48 9.0 216.81 17.34 234.15 19.81 45.63 21.68 35.12 160.01 82.78
56 2452561.0 35610.0 918 81.0 788648.0 5815.0 582.0 81.0 788648.0 5815.0 582.0 2.0 1.0 49 79.0 10628.66 744.00 11372.66 88.50 2361.31 8502.92 1658.07 467.67 3193.81
57 2452060.0 60418.0 1241 908.0 793212.0 2516.0 620.0 908.0 793212.0 2516.0 620.0 1.0 1.0 51 9.0 355.32 10.65 365.97 99.51 193.77 309.12 6.00 40.20 303.93
58 2452077.0 13035.0 923 668.0 1078154.0 4240.0 373.0 668.0 1078154.0 4240.0 373.0 1.0 1.0 51 58.0 6574.88 460.24 7035.12 57.17 3221.32 1380.72 4051.44 1142.72 3738.73
59 NaN 71745.0 1470 NaN NaN 2111.0 323.0 NaN NaN 2111.0 NaN 1.0 1.0 52 NaN 765.16 NaN 834.02 32.04 229.40 NaN 215.16 351.06 330.30
60 2451900.0 32899.0 1283 971.0 1300813.0 208.0 250.0 971.0 1300813.0 208.0 250.0 1.0 1.0 53 2.0 97.88 1.95 99.83 22.48 13.64 80.26 5.46 12.16 38.07
61 2451958.0 26993.0 782 631.0 1375925.0 1419.0 466.0 631.0 1375925.0 1419.0 466.0 1.0 1.0 53 13.0 1368.77 82.12 1450.89 88.01 727.09 191.62 235.43 941.72 897.22
62 NaN NaN 79 NaN NaN 6738.0 460.0 NaN 1500216.0 NaN NaN 1.0 1.0 55 7.0 70.70 4.94 NaN 38.47 NaN 42.42 4.24 NaN 71.20
63 NaN NaN 874 NaN NaN NaN NaN 199.0 NaN NaN 7.0 1.0 1.0 56 NaN 1717.20 154.54 1871.74 3.62 356.40 NaN NaN NaN NaN
64 2451384.0 77186.0 50 380.0 1708805.0 5983.0 608.0 380.0 1708805.0 5983.0 608.0 2.0 1.0 57 19.0 2002.03 120.12 2122.15 71.12 302.10 1301.31 119.12 581.60 493.34
65 2451443.0 45709.0 1165 800.0 1777124.0 1248.0 619.0 800.0 1777124.0 1248.0 619.0 1.0 1.0 58 9.0 740.34 22.21 762.55 37.92 174.78 222.10 67.37 450.87 234.91
66 2451759.0 67735.0 1687 138.0 821188.0 5885.0 135.0 138.0 821188.0 5885.0 135.0 2.0 1.0 59 26.0 789.36 71.04 860.40 6.20 134.94 149.97 421.99 217.40 212.18
67 2451560.0 59013.0 1712 883.0 539803.0 6923.0 843.0 883.0 539803.0 6923.0 843.0 1.0 1.0 63 31.0 191.58 3.83 195.41 1.63 739.35 42.14 127.02 22.42 744.81
68 NaN NaN 158 670.0 103015.0 NaN NaN NaN 103015.0 2160.0 705.0 NaN NaN 64 36.0 1086.12 32.58 1118.70 4.75 NaN NaN NaN 543.61 NaN
69 2451547.0 32382.0 1507 101.0 99551.0 3001.0 251.0 101.0 99551.0 3001.0 251.0 2.0 1.0 66 7.0 368.97 0.00 368.97 48.34 12.81 99.62 37.70 231.65 61.15
70 2452027.0 26463.0 85 973.0 277684.0 1748.0 259.0 973.0 277684.0 1748.0 259.0 1.0 1.0 69 57.0 5985.57 359.13 6344.70 89.65 1056.21 2394.22 2944.90 646.45 1504.99
71 2452341.0 68091.0 1985 911.0 1511560.0 5409.0 658.0 911.0 1511560.0 5409.0 658.0 2.0 1.0 72 20.0 3750.00 187.50 3937.50 62.87 742.20 187.50 1959.37 1603.13 992.57
72 2452196.0 78918.0 1673 224.0 1559926.0 6228.0 130.0 224.0 1559926.0 6228.0 130.0 1.0 1.0 72 2.0 72.30 4.33 76.63 96.96 24.44 65.79 5.46 1.05 125.73
73 2452538.0 5244.0 821 195.0 94659.0 276.0 493.0 195.0 94659.0 276.0 493.0 1.0 1.0 73 4.0 208.84 0.00 208.84 90.81 202.68 154.54 19.00 35.30 293.49
74 2452648.0 69373.0 91 326.0 571505.0 5084.0 663.0 326.0 571505.0 5084.0 663.0 1.0 1.0 75 35.0 2668.05 80.04 2748.09 62.33 361.20 1414.06 463.97 790.02 503.57
75 2452670.0 41829.0 1035 961.0 4573.0 4185.0 397.0 961.0 4573.0 4185.0 397.0 2.0 1.0 75 23.0 1807.80 0.00 1807.80 14.00 766.36 379.63 1142.53 285.64 780.36
76 2451916.0 34658.0 1189 828.0 990174.0 2720.0 666.0 828.0 990174.0 2720.0 666.0 2.0 1.0 76 72.0 2581.92 77.45 2659.37 20.09 5286.96 568.02 2013.90 0.00 5384.50
77 2451616.0 51966.0 328 626.0 1703073.0 4720.0 567.0 626.0 1703073.0 4720.0 567.0 2.0 1.0 77 8.0 25.28 0.75 26.03 61.93 0.00 11.12 12.17 1.99 62.68
78 NaN NaN 895 99.0 NaN 6659.0 NaN 99.0 1634079.0 NaN NaN NaN NaN 77 NaN 1934.50 NaN NaN 45.51 NaN NaN NaN NaN 838.39
79 2451617.0 28361.0 244 939.0 1603349.0 4959.0 369.0 939.0 1603349.0 4959.0 369.0 2.0 1.0 79 21.0 919.59 18.39 937.98 21.38 509.04 478.18 8.82 432.59 548.81
80 2451871.0 54886.0 1723 537.0 1097050.0 610.0 523.0 537.0 1097050.0 610.0 523.0 1.0 1.0 79 33.0 606.87 36.41 643.28 32.97 290.73 54.61 276.13 276.13 360.11
81 2451726.0 26757.0 524 212.0 1794817.0 4822.0 674.0 212.0 1794817.0 4822.0 674.0 2.0 1.0 81 17.0 371.28 29.70 400.98 28.14 85.68 226.48 50.68 94.12 143.52
82 2452486.0 46513.0 573 862.0 897323.0 1384.0 245.0 862.0 897323.0 1384.0 245.0 1.0 1.0 83 20.0 104.00 0.00 104.00 21.18 333.00 86.32 9.19 8.49 354.18
83 2452557.0 65926.0 681 87.0 1208787.0 7087.0 34.0 87.0 1208787.0 7087.0 34.0 2.0 1.0 83 29.0 300.15 0.00 300.15 44.01 2552.00 168.08 109.61 22.46 2596.01
84 2451280.0 25318.0 1318 396.0 1857247.0 3251.0 702.0 396.0 1857247.0 3251.0 702.0 2.0 1.0 84 2.0 96.36 3.85 100.21 85.73 33.88 30.83 43.90 21.63 123.46
85 2451393.0 62509.0 1954 660.0 1078409.0 3158.0 707.0 660.0 1078409.0 3158.0 707.0 2.0 1.0 84 18.0 265.50 2.65 268.15 49.10 165.24 45.13 103.57 116.80 216.99
86 2452735.0 NaN 1633 6.0 533478.0 2797.0 NaN 6.0 533478.0 NaN 469.0 NaN NaN 85 NaN 20.20 NaN NaN NaN 15.50 19.59 NaN NaN 102.28
87 2452663.0 51913.0 276 493.0 1729053.0 5813.0 973.0 493.0 1729053.0 5813.0 973.0 2.0 1.0 85 34.0 567.80 5.67 573.47 72.34 1817.30 22.71 196.23 348.86 1895.31
88 2451723.0 72393.0 448 324.0 159786.0 601.0 216.0 324.0 159786.0 601.0 216.0 1.0 1.0 86 16.0 56.48 0.00 56.48 78.57 53.60 46.31 2.64 7.53 132.17
89 2451599.0 60380.0 926 909.0 361910.0 864.0 65.0 909.0 361910.0 864.0 65.0 2.0 1.0 86 22.0 3938.88 157.55 4096.43 78.70 1140.04 590.83 1941.86 1406.19 1376.29
90 2452181.0 69772.0 1235 789.0 1625335.0 281.0 27.0 789.0 1625335.0 281.0 27.0 1.0 1.0 87 11.0 1976.59 39.53 2016.12 74.21 951.61 316.25 1278.46 381.88 1065.35
91 NaN 67250.0 187 NaN 254698.0 NaN 424.0 NaN 254698.0 NaN NaN NaN 1.0 91 NaN NaN 89.14 1079.59 NaN NaN NaN NaN 2.98 NaN
92 2452382.0 45230.0 1065 884.0 1353432.0 7180.0 328.0 884.0 1353432.0 7180.0 328.0 2.0 1.0 92 15.0 54.30 1.62 55.92 48.55 37.95 53.21 1.07 0.02 88.12
93 2452555.0 53480.0 1305 174.0 1417259.0 6897.0 535.0 174.0 1417259.0 6897.0 535.0 1.0 1.0 92 18.0 1303.56 117.32 1420.88 71.91 477.90 404.10 638.61 260.85 667.13
94 2452790.0 34442.0 1896 372.0 463802.0 4985.0 815.0 372.0 463802.0 4985.0 815.0 2.0 1.0 93 21.0 1923.81 115.42 2039.23 57.75 72.03 1365.90 530.01 27.90 245.20
95 2452775.0 70628.0 661 176.0 1018443.0 4910.0 377.0 176.0 1018443.0 4910.0 377.0 2.0 1.0 93 88.0 11567.60 115.67 11683.27 84.79 5192.88 4280.01 1967.64 5319.95 5393.34
96 2452056.0 77444.0 569 134.0 701863.0 3839.0 768.0 134.0 701863.0 3839.0 768.0 2.0 1.0 95 11.0 1553.64 124.29 1677.93 50.63 493.46 450.55 573.60 529.49 668.38
97 NaN NaN 715 NaN 253586.0 7137.0 935.0 788.0 253586.0 NaN 935.0 NaN 1.0 96 NaN NaN NaN NaN NaN NaN 175.30 10.67 NaN NaN
98 2452085.0 44364.0 791 385.0 1635385.0 3585.0 385.0 385.0 1635385.0 3585.0 385.0 2.0 1.0 98 44.0 96.80 6.77 103.57 87.44 549.56 90.02 2.23 4.55 643.77

web_sales (first 100 rows)

WS_SOLD_DATE_SK WS_SOLD_TIME_SK WS_SHIP_DATE_SK WS_ITEM_SK WS_BILL_CUSTOMER_SK WS_BILL_CDEMO_SK WS_BILL_HDEMO_SK WS_BILL_ADDR_SK WS_SHIP_CUSTOMER_SK WS_SHIP_CDEMO_SK WS_SHIP_HDEMO_SK WS_SHIP_ADDR_SK WS_WEB_PAGE_SK WS_WEB_SITE_SK WS_SHIP_MODE_SK WS_WAREHOUSE_SK WS_PROMO_SK WS_ORDER_NUMBER WS_QUANTITY WS_WHOLESALE_COST WS_LIST_PRICE WS_SALES_PRICE WS_EXT_DISCOUNT_AMT WS_EXT_SALES_PRICE WS_EXT_WHOLESALE_COST WS_EXT_LIST_PRICE WS_EXT_TAX WS_COUPON_AMT WS_EXT_SHIP_COST WS_NET_PAID WS_NET_PAID_INC_TAX WS_NET_PAID_INC_SHIP WS_NET_PAID_INC_SHIP_TAX WS_NET_PROFIT
0 2451383 73313 2451482 1819 74 596485 1096 907 919 41329 1140 351 2 1 4 1 3 1 57 33.59 59.45 38.04 1220.37 2168.28 1914.63 3388.65 50.95 1149.18 575.70 1019.10 1070.05 1594.80 1645.75 -895.53
1 2451383 73313 2451411 1850 74 596485 1096 907 919 41329 1140 351 1 1 3 1 1 1 38 29.83 48.92 26.41 855.38 1003.58 1133.54 1858.96 30.10 0.00 910.86 1003.58 1033.68 1914.44 1944.54 -129.96
2 2451383 73313 2451413 805 74 596485 1096 907 919 41329 1140 351 2 1 10 1 3 1 32 49.72 107.89 97.10 345.28 3107.20 1591.04 3452.48 124.28 0.00 828.48 3107.20 3231.48 3935.68 4059.96 1516.16
3 2451383 73313 2451393 409 74 596485 1096 907 919 41329 1140 351 2 2 6 1 3 1 65 69.18 112.07 22.41 5827.90 1456.65 4496.70 7284.55 29.13 0.00 2476.50 1456.65 1485.78 3933.15 3962.28 -3040.05
4 2451383 73313 2451502 169 74 596485 1096 907 919 41329 1140 351 1 2 2 1 3 1 58 36.62 41.38 16.13 1464.50 935.54 2123.96 2400.04 84.19 0.00 167.62 935.54 1019.73 1103.16 1187.35 -1188.42
5 2451383 73313 2451421 1564 74 596485 1096 907 919 41329 1140 351 2 2 2 1 2 1 90 72.05 161.39 27.43 12056.40 2468.70 6484.50 14525.10 74.06 0.00 4647.60 2468.70 2542.76 7116.30 7190.36 -4015.80
6 2451383 73313 2451457 1750 74 596485 1096 907 919 41329 1140 351 1 2 16 1 2 1 15 83.92 174.55 69.82 1570.95 1047.30 1258.80 2618.25 20.94 0.00 392.70 1047.30 1068.24 1440.00 1460.94 -211.50
7 2451383 73313 2451430 1873 74 596485 1096 907 919 41329 1140 351 1 2 14 1 1 1 16 45.27 128.56 68.13 966.88 1090.08 724.32 2056.96 87.20 0.00 370.24 1090.08 1177.28 1460.32 1547.52 365.76
8 2451383 73313 2451458 925 74 596485 1096 907 919 41329 1140 351 1 2 8 1 1 1 54 53.45 60.39 26.57 1826.28 1434.78 2886.30 3261.06 48.78 215.21 488.70 1219.57 1268.35 1708.27 1757.05 -1666.73
9 2452625 34964 2452702 451 296 436090 2684 278 428 1487225 3907 901 1 1 16 1 3 2 47 49.64 68.99 12.41 2659.26 583.27 2333.08 3242.53 52.49 0.00 1134.58 583.27 635.76 1717.85 1770.34 -1749.81
10 2452625 34964 2452638 1477 296 436090 2684 278 428 1487225 3907 901 1 1 16 1 2 2 12 7.24 12.16 11.91 3.00 142.92 86.88 145.92 10.00 0.00 29.16 142.92 152.92 172.08 182.08 56.04
11 2452625 34964 2452645 1737 296 436090 2684 278 428 1487225 3907 901 2 1 7 1 3 2 6 45.21 67.36 30.31 222.30 181.86 271.26 404.16 16.36 0.00 185.88 181.86 198.22 367.74 384.10 -89.40
12 2452625 34964 2452690 1794 296 436090 2684 278 428 1487225 3907 901 1 2 3 1 3 2 43 9.62 13.08 9.02 174.58 387.86 413.66 562.44 19.39 0.00 117.82 387.86 407.25 505.68 525.07 -25.80
13 2452625 34964 2452707 690 296 436090 2684 278 428 1487225 3907 901 1 2 1 1 1 2 57 35.95 62.55 43.78 1069.89 2495.46 2049.15 3565.35 224.59 0.00 962.16 2495.46 2720.05 3457.62 3682.21 446.31
14 2452625 34964 2452640 1455 296 436090 2684 278 428 1487225 3907 901 1 2 6 1 3 2 93 65.80 152.65 29.00 11499.45 2697.00 6119.40 14196.45 215.76 0.00 7097.76 2697.00 2912.76 9794.76 10010.52 -3422.40
15 2452625 34964 2452634 1824 296 436090 2684 278 428 1487225 3907 901 1 2 18 1 3 2 93 55.42 127.46 1.27 11735.67 118.11 5154.06 11853.78 4.72 0.00 1421.97 118.11 122.83 1540.08 1544.80 -5035.95
16 2452625 34964 2452734 156 296 436090 2684 278 428 1487225 3907 901 1 2 3 1 1 2 82 48.65 91.94 8.27 6860.94 678.14 3989.30 7539.08 13.56 0.00 2788.82 678.14 691.70 3466.96 3480.52 -3311.16
17 2452625 34964 2452739 1407 296 436090 2684 278 428 1487225 3907 901 2 1 9 1 3 2 33 80.23 90.65 55.29 1166.88 1824.57 2647.59 2991.45 0.00 0.00 478.50 1824.57 1824.57 2303.07 2303.07 -823.02
18 2451754 1529 2451801 506 800 1219525 3450 375 180 293885 5550 475 1 2 2 1 1 3 65 5.37 10.31 2.06 536.25 133.90 349.05 670.15 7.47 9.37 26.65 124.53 132.00 151.18 158.65 -224.52
19 2451754 1529 2451791 1861 800 1219525 3450 375 180 293885 5550 475 1 2 9 1 1 3 74 74.66 83.61 52.67 2289.56 3897.58 5524.84 6187.14 116.92 0.00 1546.60 3897.58 4014.50 5444.18 5561.10 -1627.26
20 2451754 1529 2451814 637 800 1219525 3450 375 180 293885 5550 475 1 1 3 1 3 3 26 77.15 198.27 109.04 2319.98 2835.04 2005.90 5155.02 36.28 2381.43 206.18 453.61 489.89 659.79 696.07 -1552.29
21 2451754 1529 2451765 965 800 1219525 3450 375 180 293885 5550 475 2 2 3 1 2 3 25 99.00 292.05 262.84 730.25 6571.00 2475.00 7301.25 65.71 0.00 3285.50 6571.00 6636.71 9856.50 9922.21 4096.00
22 2451754 1529 2451855 725 800 1219525 3450 375 180 293885 5550 475 2 2 7 1 1 3 80 14.55 42.34 27.09 1220.00 2167.20 1164.00 3387.20 43.34 0.00 609.60 2167.20 2210.54 2776.80 2820.14 1003.20
23 2451754 1529 2451862 1393 800 1219525 3450 375 180 293885 5550 475 1 2 13 1 2 3 54 64.58 160.80 120.60 2170.80 6512.40 3487.32 8683.20 586.11 0.00 3646.62 6512.40 7098.51 10159.02 10745.13 3025.08
24 2451754 1529 2451809 1355 800 1219525 3450 375 180 293885 5550 475 2 1 20 1 3 3 30 54.81 81.11 22.71 1752.00 681.30 1644.30 2433.30 6.81 0.00 0.00 681.30 688.11 681.30 688.11 -963.00
25 2451754 1529 2451782 452 800 1219525 3450 375 180 293885 5550 475 1 2 6 1 2 3 19 87.13 170.77 155.40 292.03 2952.60 1655.47 3244.63 88.57 0.00 486.59 2952.60 3041.17 3439.19 3527.76 1297.13
26 2451754 1529 2451760 422 800 1219525 3450 375 180 293885 5550 475 1 1 16 1 1 3 29 86.36 90.67 68.90 631.33 1998.10 2504.44 2629.43 159.84 0.00 236.64 1998.10 2157.94 2234.74 2394.58 -506.34
27 2451754 1529 2451812 1721 800 1219525 3450 375 180 293885 5550 475 2 2 4 1 1 3 2 4.21 10.90 0.54 20.72 1.08 8.42 21.80 0.07 0.00 5.88 1.08 1.15 6.96 7.03 -7.34
28 2451754 1529 2451846 1079 800 1219525 3450 375 180 293885 5550 475 1 1 18 1 1 3 42 56.94 107.04 102.75 180.18 4315.50 2391.48 4495.68 43.15 0.00 1708.14 4315.50 4358.65 6023.64 6066.79 1924.02
29 2451754 1529 2451858 1817 800 1219525 3450 375 180 293885 5550 475 2 1 12 1 2 3 91 88.66 242.04 183.95 5286.19 16739.45 8068.06 22025.64 502.18 0.00 0.00 16739.45 17241.63 16739.45 17241.63 8671.39
30 2451754 1529 2451758 1556 800 1219525 3450 375 180 293885 5550 475 2 2 15 1 2 3 10 32.29 45.85 30.71 151.40 307.10 322.90 458.50 0.61 276.39 137.50 30.71 31.32 168.21 168.82 -292.19
31 2451754 1529 2451801 1688 800 1219525 3450 375 180 293885 5550 475 2 1 18 1 2 3 1 66.29 174.34 137.72 36.62 137.72 66.29 174.34 4.62 71.61 45.32 66.11 70.73 111.43 116.05 -0.18
32 2451754 1529 2451763 860 800 1219525 3450 375 180 293885 5550 475 2 2 19 1 2 3 7 66.22 145.68 144.22 10.22 1009.54 463.54 1019.76 80.76 0.00 193.69 1009.54 1090.30 1203.23 1283.99 546.00
33 2451754 1529 2451807 1813 800 1219525 3450 375 180 293885 5550 475 2 2 2 1 2 3 10 87.53 150.55 58.71 918.40 587.10 875.30 1505.50 27.12 135.03 316.10 452.07 479.19 768.17 795.29 -423.23
34 2451483 77832 2451501 985 187 512359 4331 456 757 1249940 2525 697 2 1 11 1 3 4 83 4.36 10.15 4.66 455.67 386.78 361.88 842.45 27.07 0.00 151.06 386.78 413.85 537.84 564.91 24.90
35 2451483 77832 2451554 1714 187 512359 4331 456 757 1249940 2525 697 1 2 4 1 2 4 20 71.90 103.53 85.92 352.20 1718.40 1438.00 2070.60 154.65 0.00 227.60 1718.40 1873.05 1946.00 2100.65 280.40
36 2451483 77832 2451542 1978 187 512359 4331 456 757 1249940 2525 697 2 1 12 1 3 4 26 81.47 126.27 27.77 2561.00 722.02 2118.22 3283.02 50.54 0.00 1411.54 722.02 772.56 2133.56 2184.10 -1396.20
37 2451483 77832 2451563 373 187 512359 4331 456 757 1249940 2525 697 1 2 12 1 2 4 32 30.81 40.05 22.02 576.96 704.64 985.92 1281.60 35.23 0.00 358.72 704.64 739.87 1063.36 1098.59 -281.28
38 2451483 77832 2451593 1778 187 512359 4331 456 757 1249940 2525 697 2 2 2 1 3 4 44 68.96 143.43 61.67 3597.44 2713.48 3034.24 6310.92 135.67 0.00 0.00 2713.48 2849.15 2713.48 2849.15 -320.76
39 2451483 77832 2451487 476 187 512359 4331 456 757 1249940 2525 697 2 1 12 1 3 4 41 6.21 11.92 1.31 435.01 53.71 254.61 488.72 3.75 0.00 190.24 53.71 57.46 243.95 247.70 -200.90
40 2451483 77832 2451487 578 187 512359 4331 456 757 1249940 2525 697 1 1 2 1 1 4 22 71.63 113.89 69.47 977.24 1528.34 1575.86 2505.58 137.55 0.00 1077.34 1528.34 1665.89 2605.68 2743.23 -47.52
41 2451483 77832 2451569 1105 187 512359 4331 456 757 1249940 2525 697 1 1 11 1 1 4 51 43.92 94.86 52.17 2177.19 2660.67 2239.92 4837.86 102.17 106.42 1209.21 2554.25 2656.42 3763.46 3865.63 314.33
42 2451483 77832 2451536 1096 187 512359 4331 456 757 1249940 2525 697 1 2 20 1 3 4 50 15.41 17.41 6.26 557.50 313.00 770.50 870.50 9.20 159.63 330.50 153.37 162.57 483.87 493.07 -617.13
43 2451483 77832 2451521 1460 187 512359 4331 456 757 1249940 2525 697 2 1 6 1 3 4 65 34.29 75.43 18.10 3726.45 1176.50 2228.85 4902.95 70.59 0.00 1176.50 1176.50 1247.09 2353.00 2423.59 -1052.35
44 2451483 77832 2451518 1862 187 512359 4331 456 757 1249940 2525 697 2 1 3 1 3 4 37 35.86 89.29 0.00 3303.73 0.00 1326.82 3303.73 0.00 0.00 1090.02 0.00 0.00 1090.02 1090.02 -1326.82
45 2451945 25492 2451977 1555 395 1553493 1391 89 505 1123302 983 681 2 2 6 1 1 5 57 69.75 192.51 102.03 5157.36 5815.71 3975.75 10973.07 174.47 0.00 2633.40 5815.71 5990.18 8449.11 8623.58 1839.96
46 2451945 25492 2451960 1607 395 1553493 1391 89 505 1123302 983 681 2 2 20 1 3 5 50 42.11 58.95 46.57 619.00 2328.50 2105.50 2947.50 162.99 0.00 58.50 2328.50 2491.49 2387.00 2549.99 223.00
47 2451945 25492 2452011 735 395 1553493 1391 89 505 1123302 983 681 1 1 1 1 2 5 89 70.02 77.72 55.18 2006.06 4911.02 6231.78 6917.08 147.33 0.00 2766.12 4911.02 5058.35 7677.14 7824.47 -1320.76
48 2451945 25492 2451956 1071 395 1553493 1391 89 505 1123302 983 681 1 1 19 1 1 5 69 21.00 24.36 13.64 739.68 941.16 1449.00 1680.84 9.41 0.00 487.14 941.16 950.57 1428.30 1437.71 -507.84
49 2451945 25492 2451954 653 395 1553493 1391 89 505 1123302 983 681 1 2 16 1 1 5 26 26.29 28.65 18.33 268.32 476.58 683.54 744.90 33.36 0.00 186.16 476.58 509.94 662.74 696.10 -206.96
50 2451945 25492 2451949 1759 395 1553493 1391 89 505 1123302 983 681 2 2 9 1 2 5 94 66.79 165.63 66.25 9341.72 6227.50 6278.26 15569.22 560.47 0.00 2491.00 6227.50 6787.97 8718.50 9278.97 -50.76
51 2451945 25492 2452018 323 395 1553493 1391 89 505 1123302 983 681 1 1 14 1 1 5 37 16.03 20.67 0.62 741.85 22.94 593.11 764.79 0.00 0.00 367.04 22.94 22.94 389.98 389.98 -570.17
52 2451945 25492 2452044 339 395 1553493 1391 89 505 1123302 983 681 2 2 10 1 2 5 51 10.48 30.18 23.84 323.34 1215.84 534.48 1539.18 23.58 36.47 122.91 1179.37 1202.95 1302.28 1325.86 644.89
53 2451945 25492 2452046 1379 395 1553493 1391 89 505 1123302 983 681 1 2 8 1 2 5 45 67.42 113.26 41.90 3211.20 1885.50 3033.90 5096.70 56.56 0.00 2497.05 1885.50 1942.06 4382.55 4439.11 -1148.40
54 2451945 25492 2452060 341 395 1553493 1391 89 505 1123302 983 681 2 2 6 1 1 5 3 47.96 84.88 1.69 249.57 5.07 143.88 254.64 0.20 0.00 30.54 5.07 5.27 35.61 35.81 -138.81
55 2451945 25492 2452065 1909 395 1553493 1391 89 505 1123302 983 681 1 2 2 1 3 5 71 68.25 152.19 4.56 10481.73 323.76 4845.75 10805.49 29.13 0.00 648.23 323.76 352.89 971.99 1001.12 -4521.99
56 2451945 25492 2451997 853 395 1553493 1391 89 505 1123302 983 681 2 1 7 1 3 5 57 25.26 42.18 2.53 2260.05 144.21 1439.82 2404.26 8.65 0.00 624.72 144.21 152.86 768.93 777.58 -1295.61
57 2451945 25492 2451977 305 395 1553493 1391 89 505 1123302 983 681 2 1 16 1 2 5 66 66.72 166.80 90.07 5064.18 5944.62 4403.52 11008.80 416.12 0.00 1651.32 5944.62 6360.74 7595.94 8012.06 1541.10
58 2451945 25492 2452005 1701 395 1553493 1391 89 505 1123302 983 681 2 1 9 1 1 5 60 30.82 56.70 29.48 1633.20 1768.80 1849.20 3402.00 0.00 1715.73 475.80 53.07 53.07 528.87 528.87 -1796.13
59 2451945 25492 2452002 115 395 1553493 1391 89 505 1123302 983 681 2 1 7 1 1 5 13 19.64 34.17 17.76 213.33 230.88 255.32 444.21 6.92 0.00 75.40 230.88 237.80 306.28 313.20 -24.44
60 2451945 25492 2451998 591 395 1553493 1391 89 505 1123302 983 681 2 2 7 1 1 5 63 9.36 19.74 16.38 211.68 1031.94 589.68 1243.62 35.39 526.28 522.27 505.66 541.05 1027.93 1063.32 -84.02
61 2451534 69300 2451633 1333 701 202409 1164 472 718 215362 6843 951 2 2 1 1 2 6 12 56.04 96.38 89.63 81.00 1075.56 672.48 1156.56 96.80 0.00 69.36 1075.56 1172.36 1144.92 1241.72 403.08
62 2451534 69300 2451644 127 701 202409 1164 472 718 215362 6843 951 1 1 10 1 3 6 73 36.58 41.70 35.44 456.98 2587.12 2670.34 3044.10 77.61 0.00 1247.57 2587.12 2664.73 3834.69 3912.30 -83.22
63 2451534 69300 2451610 1618 701 202409 1164 472 718 215362 6843 951 2 2 10 1 1 6 91 48.63 65.16 3.25 5633.81 295.75 4425.33 5929.56 2.95 0.00 2489.76 295.75 298.70 2785.51 2788.46 -4129.58
64 2451534 69300 2451651 1063 701 202409 1164 472 718 215362 6843 951 2 1 8 1 3 6 51 42.52 121.60 38.91 4217.19 1984.41 2168.52 6201.60 0.00 754.07 557.94 1230.34 1230.34 1788.28 1788.28 -938.18
65 2451534 69300 2451639 1111 701 202409 1164 472 718 215362 6843 951 1 1 1 1 1 6 1 99.76 206.50 0.00 206.50 0.00 99.76 206.50 0.00 0.00 33.04 0.00 0.00 33.04 33.04 -99.76
66 2451534 69300 2451583 1550 701 202409 1164 472 718 215362 6843 951 1 2 5 1 2 6 83 39.67 47.60 34.74 1067.38 2883.42 3292.61 3950.80 259.50 0.00 1026.71 2883.42 3142.92 3910.13 4169.63 -409.19
67 2451534 69300 2451576 1612 701 202409 1164 472 718 215362 6843 951 1 2 5 1 1 6 63 97.02 121.27 103.07 1146.60 6493.41 6112.26 7640.01 12.98 6233.67 2597.49 259.74 272.72 2857.23 2870.21 -5852.52
68 2451534 69300 2451604 949 701 202409 1164 472 718 215362 6843 951 2 2 2 1 3 6 11 16.62 23.76 2.61 232.65 28.71 182.82 261.36 2.29 0.00 73.15 28.71 31.00 101.86 104.15 -154.11
69 2451178 76807 2451181 1309 271 1161066 3908 303 91 233980 782 777 2 1 10 1 3 7 47 92.35 229.02 114.51 5381.97 5381.97 4340.45 10763.94 53.81 0.00 4843.35 5381.97 5435.78 10225.32 10279.13 1041.52
70 2451178 76807 2451279 1897 271 1161066 3908 303 91 233980 782 777 1 1 4 1 1 7 44 52.52 126.04 122.25 166.76 5379.00 2310.88 5545.76 430.32 0.00 1219.68 5379.00 5809.32 6598.68 7029.00 3068.12
71 2451178 76807 2451240 712 271 1161066 3908 303 91 233980 782 777 2 2 15 1 3 7 87 4.47 4.82 3.85 84.39 334.95 388.89 419.34 30.14 0.00 108.75 334.95 365.09 443.70 473.84 -53.94
72 2451178 76807 2451210 469 271 1161066 3908 303 91 233980 782 777 1 1 3 1 3 7 9 70.18 106.67 44.80 556.83 403.20 631.62 960.03 0.00 249.98 470.34 153.22 153.22 623.56 623.56 -478.40
73 2451178 76807 2451201 404 271 1161066 3908 303 91 233980 782 777 1 2 20 1 2 7 13 49.14 63.88 31.94 415.22 415.22 638.82 830.44 6.56 87.19 215.80 328.03 334.59 543.83 550.39 -310.79
74 2451178 76807 2451287 262 271 1161066 3908 303 91 233980 782 777 1 1 6 1 1 7 52 51.52 79.85 59.08 1080.04 3072.16 2679.04 4152.20 0.00 0.00 2034.24 3072.16 3072.16 5106.40 5106.40 393.12
75 2451178 76807 2451268 442 271 1161066 3908 303 91 233980 782 777 1 2 19 1 3 7 1 64.29 145.93 135.71 10.22 135.71 64.29 145.93 0.00 0.00 72.96 135.71 135.71 208.67 208.67 71.42
76 2451178 76807 2451243 542 271 1161066 3908 303 91 233980 782 777 2 2 20 1 2 7 44 94.24 201.67 12.10 8341.08 532.40 4146.56 8873.48 21.29 0.00 4170.32 532.40 553.69 4702.72 4724.01 -3614.16
77 2452190 51596 2452220 1093 108 1572482 5456 830 825 1895897 5705 479 1 2 19 1 1 8 76 55.63 72.31 54.23 1374.08 4121.48 4227.88 5495.56 82.42 0.00 164.16 4121.48 4203.90 4285.64 4368.06 -106.40
78 2452190 51596 2452307 1233 108 1572482 5456 830 825 1895897 5705 479 1 2 20 1 3 8 33 31.08 66.20 35.74 1005.18 1179.42 1025.64 2184.60 106.14 0.00 633.27 1179.42 1285.56 1812.69 1918.83 153.78
79 2452190 51596 2452216 1603 108 1572482 5456 830 825 1895897 5705 479 1 2 8 1 1 8 55 45.57 83.84 66.23 968.55 3642.65 2506.35 4611.20 218.55 0.00 1383.25 3642.65 3861.20 5025.90 5244.45 1136.30
80 2452190 51596 2452213 1541 108 1572482 5456 830 825 1895897 5705 479 1 1 14 1 1 8 70 34.71 71.50 50.05 1501.50 3503.50 2429.70 5005.00 0.00 0.00 2051.70 3503.50 3503.50 5555.20 5555.20 1073.80
81 2452190 51596 2452242 1245 108 1572482 5456 830 825 1895897 5705 479 2 2 17 1 3 8 10 28.39 67.00 7.37 596.30 73.70 283.90 670.00 1.47 0.00 180.90 73.70 75.17 254.60 256.07 -210.20
82 2452190 51596 2452221 621 108 1572482 5456 830 825 1895897 5705 479 2 1 2 1 1 8 87 88.69 201.32 30.19 14888.31 2626.53 7716.03 17514.84 0.00 0.00 1050.09 2626.53 2626.53 3676.62 3676.62 -5089.50
83 2452190 51596 2452276 163 108 1572482 5456 830 825 1895897 5705 479 1 1 13 1 2 8 22 46.33 81.54 44.84 807.40 986.48 1019.26 1793.88 49.32 0.00 807.18 986.48 1035.80 1793.66 1842.98 -32.78
84 2452190 51596 2452305 849 108 1572482 5456 830 825 1895897 5705 479 1 2 13 1 1 8 96 79.34 204.69 83.92 11593.92 8056.32 7616.64 19650.24 644.50 0.00 392.64 8056.32 8700.82 8448.96 9093.46 439.68
85 2452190 51596 2452267 1225 108 1572482 5456 830 825 1895897 5705 479 1 1 13 1 1 8 91 44.37 108.70 61.95 4254.25 5637.45 4037.67 9891.70 56.37 0.00 197.47 5637.45 5693.82 5834.92 5891.29 1599.78
86 2452190 51596 2452309 1009 108 1572482 5456 830 825 1895897 5705 479 1 2 4 1 2 8 44 70.93 75.18 10.52 2845.04 462.88 3120.92 3307.92 36.66 4.62 1223.64 458.26 494.92 1681.90 1718.56 -2662.66
87 2452190 51596 2452211 253 108 1572482 5456 830 825 1895897 5705 479 2 2 18 1 3 8 33 54.70 140.03 137.22 92.73 4528.26 1805.10 4620.99 90.56 0.00 2079.33 4528.26 4618.82 6607.59 6698.15 2723.16
88 2452190 51596 2452243 1695 108 1572482 5456 830 825 1895897 5705 479 1 1 3 1 1 8 59 25.18 37.01 0.37 2161.76 21.83 1485.62 2183.59 0.74 3.27 567.58 18.56 19.30 586.14 586.88 -1467.06
89 2452190 51596 2452305 617 108 1572482 5456 830 825 1895897 5705 479 1 1 5 1 1 8 64 5.57 7.07 1.83 335.36 117.12 356.48 452.48 0.82 105.40 153.60 11.72 12.54 165.32 166.14 -344.76
90 2452190 51596 2452192 1429 108 1572482 5456 830 825 1895897 5705 479 1 1 11 1 3 8 44 58.29 112.49 22.49 3960.00 989.56 2564.76 4949.56 89.06 0.00 247.28 989.56 1078.62 1236.84 1325.90 -1575.20
91 2452190 51596 2452242 1353 108 1572482 5456 830 825 1895897 5705 479 2 1 17 1 3 8 93 18.56 18.93 3.97 1391.28 369.21 1726.08 1760.49 0.00 0.00 704.01 369.21 369.21 1073.22 1073.22 -1356.87
92 2450900 56256 2450988 302 676 1815460 4197 581 248 1833962 39 23 1 1 10 1 3 9 16 96.14 256.69 10.26 3942.88 164.16 1538.24 4107.04 0.00 0.00 2053.44 164.16 164.16 2217.60 2217.60 -1374.08
93 2450900 56256 2450943 1316 676 1815460 4197 581 248 1833962 39 23 2 1 17 1 3 9 29 76.54 210.48 134.70 2197.62 3906.30 2219.66 6103.92 156.25 0.00 365.98 3906.30 4062.55 4272.28 4428.53 1686.64
94 2450900 56256 2450988 721 676 1815460 4197 581 248 1833962 39 23 2 1 2 1 2 9 75 77.80 126.03 113.42 945.75 8506.50 5835.00 9452.25 58.69 2637.01 2646.00 5869.49 5928.18 8515.49 8574.18 34.49
95 2450900 56256 2451000 824 676 1815460 4197 581 248 1833962 39 23 2 1 11 1 3 9 92 47.71 59.16 33.12 2395.68 3047.04 4389.32 5442.72 60.94 0.00 2012.96 3047.04 3107.98 5060.00 5120.94 -1342.28
96 2450900 56256 2450994 502 676 1815460 4197 581 248 1833962 39 23 1 2 6 1 1 9 30 84.41 243.10 126.41 3500.70 3792.30 2532.30 7293.00 303.38 0.00 802.20 3792.30 4095.68 4594.50 4897.88 1260.00
97 2450900 56256 2450983 1609 676 1815460 4197 581 248 1833962 39 23 2 2 4 1 2 9 94 93.91 145.56 1.45 13546.34 136.30 8827.54 13682.64 8.17 0.00 2325.56 136.30 144.47 2461.86 2470.03 -8691.24
98 2450900 56256 2450902 1165 676 1815460 4197 581 248 1833962 39 23 1 1 13 1 1 9 79 74.37 135.35 102.86 2566.71 8125.94 5875.23 10692.65 162.51 0.00 1496.26 8125.94 8288.45 9622.20 9784.71 2250.71

web_site (first 100 rows)

WEB_SITE_SK WEB_SITE_ID WEB_REC_START_DATE WEB_REC_END_DATE WEB_NAME WEB_OPEN_DATE_SK WEB_CLOSE_DATE_SK WEB_CLASS WEB_MANAGER WEB_MKT_ID WEB_MKT_CLASS WEB_MKT_DESC WEB_MARKET_MANAGER WEB_COMPANY_ID WEB_COMPANY_NAME WEB_STREET_NUMBER WEB_STREET_NAME WEB_STREET_TYPE WEB_SUITE_NUMBER WEB_CITY WEB_COUNTY WEB_STATE WEB_ZIP WEB_COUNTRY WEB_GMT_OFFSET WEB_TAX_PERCENTAGE
0 1 AAAAAAAABAAAAAAA 1997-08-16 None site_0 2450807 NaN Unknown Ronald Shaffer 4 Grey lines ought to result indeed centres. Tod Well similar decisions used to keep hardly democratic, personal priorities. Joe George 6 cally 51 Dogwood Sunset Ln Suite 330 Midway Williamson County TN 31904 United States -5 0.1
1 2 AAAAAAAACAAAAAAA 1997-08-16 2000-08-15 site_0 2450798 2448973.0 Unknown Tommy Jones 6 Completely excellent things ought to pro Lucky passengers know. Red details will not hang alive, international s David Myers 4 ese 358 Ridge Wilson Cir. Suite 150 Midway Williamson County TN 31904 United States -5 0.0
Source tables may have typos, unclear names, incorrect column types, etc. We clean these tables.

stg_store (first 100 rows)

store_id store_surrogate_key store_floor_space company_id store_country store_state store_street_type store_hours store_county market_manager store_gmt_offset store_city store_tax_percentage employee_count store_suite_number store_street_name store_manager market_id division_id record_end_date record_start_date store_close_date store_street_number store_zip_code
0 AAAAAAAABAAAAAAA 1 5250760 1 United States TN Way 8AM-4PM Williamson County Charles Bartley -5 Midway 0.03 245 Suite 250 Spring William Ward 2 1 NaT 1997-03-13 2451189.0 767 31904
1 AAAAAAAACAAAAAAA 2 5285950 1 United States TN Dr. 8AM-4PM Williamson County David Lamontagne -5 Midway 0.03 236 Suite 410 Sycamore Scott Smith 8 1 2000-03-12 1997-03-13 NaN 255 31904

stg_store.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"store_renamed" AS (
    -- Rename: Renaming columns
    -- S_STORE_SK -> store_surrogate_key
    -- S_STORE_ID -> store_id
    -- S_REC_START_DATE -> record_start_date
    -- S_REC_END_DATE -> record_end_date
    -- S_CLOSED_DATE_SK -> store_close_date
    -- S_STORE_NAME -> store_name
    -- S_NUMBER_EMPLOYEES -> employee_count
    -- S_FLOOR_SPACE -> store_floor_space
    -- S_HOURS -> store_hours
    -- S_MANAGER -> store_manager
    -- S_MARKET_ID -> market_id
    -- S_GEOGRAPHY_CLASS -> geography_class
    -- S_MARKET_DESC -> market_description
    -- S_MARKET_MANAGER -> market_manager
    -- S_DIVISION_ID -> division_id
    -- S_DIVISION_NAME -> division_name
    -- S_COMPANY_ID -> company_id
    -- S_COMPANY_NAME -> company_name
    -- S_STREET_NUMBER -> store_street_number
    -- S_STREET_NAME -> store_street_name
    -- S_STREET_TYPE -> store_street_type
    -- S_SUITE_NUMBER -> store_suite_number
    -- S_CITY -> store_city
    -- S_COUNTY -> store_county
    -- S_STATE -> store_state
    -- S_ZIP -> store_zip_code
    -- S_COUNTRY -> store_country
    -- S_GMT_OFFSET -> store_gmt_offset
    -- S_TAX_PRECENTAGE -> store_tax_percentage
    SELECT 
        "S_STORE_SK" AS "store_surrogate_key",
        "S_STORE_ID" AS "store_id",
        "S_REC_START_DATE" AS "record_start_date",
        "S_REC_END_DATE" AS "record_end_date",
        "S_CLOSED_DATE_SK" AS "store_close_date",
        "S_STORE_NAME" AS "store_name",
        "S_NUMBER_EMPLOYEES" AS "employee_count",
        "S_FLOOR_SPACE" AS "store_floor_space",
        "S_HOURS" AS "store_hours",
        "S_MANAGER" AS "store_manager",
        "S_MARKET_ID" AS "market_id",
        "S_GEOGRAPHY_CLASS" AS "geography_class",
        "S_MARKET_DESC" AS "market_description",
        "S_MARKET_MANAGER" AS "market_manager",
        "S_DIVISION_ID" AS "division_id",
        "S_DIVISION_NAME" AS "division_name",
        "S_COMPANY_ID" AS "company_id",
        "S_COMPANY_NAME" AS "company_name",
        "S_STREET_NUMBER" AS "store_street_number",
        "S_STREET_NAME" AS "store_street_name",
        "S_STREET_TYPE" AS "store_street_type",
        "S_SUITE_NUMBER" AS "store_suite_number",
        "S_CITY" AS "store_city",
        "S_COUNTY" AS "store_county",
        "S_STATE" AS "store_state",
        "S_ZIP" AS "store_zip_code",
        "S_COUNTRY" AS "store_country",
        "S_GMT_OFFSET" AS "store_gmt_offset",
        "S_TAX_PRECENTAGE" AS "store_tax_percentage"
    FROM "store"
),

"store_renamed_trimmed" AS (
    -- Trim Leading and Trailing Spaces
    SELECT
        "store_surrogate_key",
        "store_id",
        "record_start_date",
        "record_end_date",
        "store_close_date",
        "store_name",
        "employee_count",
        "store_floor_space",
        "store_hours",
        "store_manager",
        "market_id",
        "geography_class",
        "market_description",
        "market_manager",
        "division_id",
        "division_name",
        "company_id",
        "company_name",
        "store_street_number",
        "store_street_type",
        "store_suite_number",
        "store_city",
        "store_county",
        "store_state",
        "store_zip_code",
        "store_country",
        "store_gmt_offset",
        "store_tax_percentage",
        TRIM("store_street_name") AS "store_street_name"
    FROM "store_renamed"
),

"store_renamed_trimmed_cleaned" AS (
    -- Clean unusual string values: 
    -- store_name: The problem is that 'able' and 'ought' are common English words rather than typical store names. They appear to be placeholders or errors in the data entry process. Since there are no clear correct store names to map these to, and we don't have additional context about what these stores might actually be, the most appropriate action is to map them to empty strings. 
    -- market_description: The problem is that both values in the market_description column are incomplete sentences that lack clear market descriptions. They appear to be truncated or nonsensical fragments rather than meaningful market descriptions. The correct approach would be to map these meaningless values to empty strings, as they do not provide any useful information about the market. 
    -- store_street_type: The problem is inconsistency in abbreviation formatting and an uncommon abbreviation. 'Dr.' is period-terminated while 'Wy' is not. 'Wy' is an uncommon abbreviation for 'Way'. The correct values should be consistently formatted and use standard abbreviations. 
    SELECT
        "store_surrogate_key",
        "store_id",
        "record_start_date",
        "record_end_date",
        "store_close_date",
        CASE
            WHEN "store_name" = 'able' THEN ''
            WHEN "store_name" = 'ought' THEN ''
            ELSE "store_name"
        END AS "store_name",
        "employee_count",
        "store_floor_space",
        "store_hours",
        "store_manager",
        "market_id",
        "geography_class",
        CASE
            WHEN "market_description" = 'Enough high areas stop expectations. Elaborate, local is' THEN ''
            WHEN "market_description" = 'Parliamentary candidates wait then heavy, keen mil' THEN ''
            ELSE "market_description"
        END AS "market_description",
        "market_manager",
        "division_id",
        "division_name",
        "company_id",
        "company_name",
        "store_street_number",
        CASE
            WHEN "store_street_type" = 'Wy' THEN 'Way'
            ELSE "store_street_type"
        END AS "store_street_type",
        "store_suite_number",
        "store_city",
        "store_county",
        "store_state",
        "store_zip_code",
        "store_country",
        "store_gmt_offset",
        "store_tax_percentage",
        "store_street_name"
    FROM "store_renamed_trimmed"
),

"store_renamed_trimmed_cleaned_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- store_name: ['']
    -- geography_class: ['Unknown']
    -- market_description: ['']
    -- division_name: ['Unknown']
    -- company_name: ['Unknown']
    SELECT 
        CASE
            WHEN "store_name" = '' THEN NULL
            ELSE "store_name"
        END AS "store_name",
        CASE
            WHEN "geography_class" = 'Unknown' THEN NULL
            ELSE "geography_class"
        END AS "geography_class",
        CASE
            WHEN "market_description" = '' THEN NULL
            ELSE "market_description"
        END AS "market_description",
        CASE
            WHEN "division_name" = 'Unknown' THEN NULL
            ELSE "division_name"
        END AS "division_name",
        CASE
            WHEN "company_name" = 'Unknown' THEN NULL
            ELSE "company_name"
        END AS "company_name",
        "store_id",
        "store_surrogate_key",
        "store_floor_space",
        "store_close_date",
        "company_id",
        "store_country",
        "store_state",
        "store_street_type",
        "store_hours",
        "store_county",
        "store_zip_code",
        "market_manager",
        "store_gmt_offset",
        "record_end_date",
        "store_city",
        "store_tax_percentage",
        "employee_count",
        "record_start_date",
        "store_suite_number",
        "store_street_name",
        "store_manager",
        "market_id",
        "division_id",
        "store_street_number"
    FROM "store_renamed_trimmed_cleaned"
),

"store_renamed_trimmed_cleaned_null_casted" AS (
    -- Column Type Casting: 
    -- record_end_date: from VARCHAR to DATE
    -- record_start_date: from VARCHAR to DATE
    -- store_close_date: from DECIMAL to DATE
    -- store_street_number: from INT to VARCHAR
    -- store_zip_code: from INT to VARCHAR
    SELECT
        "store_name",
        "geography_class",
        "market_description",
        "division_name",
        "company_name",
        "store_id",
        "store_surrogate_key",
        "store_floor_space",
        "company_id",
        "store_country",
        "store_state",
        "store_street_type",
        "store_hours",
        "store_county",
        "market_manager",
        "store_gmt_offset",
        "store_city",
        "store_tax_percentage",
        "employee_count",
        "store_suite_number",
        "store_street_name",
        "store_manager",
        "market_id",
        "division_id",
        CAST("record_end_date" AS DATE) AS "record_end_date",
        CAST("record_start_date" AS DATE) AS "record_start_date",
        "store_close_date" AS "store_close_date",
        CAST("store_street_number" AS VARCHAR) AS "store_street_number",
        CAST("store_zip_code" AS VARCHAR) AS "store_zip_code"
    FROM "store_renamed_trimmed_cleaned_null"
),

"store_renamed_trimmed_cleaned_null_casted_missing_handled" AS (
    -- Handling missing values: There are 6 columns with unacceptable missing values
    -- company_name has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- division_name has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- geography_class has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- market_description has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- record_end_date has 50.0 percent missing. Strategy: 🔄 Unchanged
    -- store_name has 100.0 percent missing. Strategy: 🗑️ Drop Column
    SELECT
        "store_id",
        "store_surrogate_key",
        "store_floor_space",
        "company_id",
        "store_country",
        "store_state",
        "store_street_type",
        "store_hours",
        "store_county",
        "market_manager",
        "store_gmt_offset",
        "store_city",
        "store_tax_percentage",
        "employee_count",
        "store_suite_number",
        "store_street_name",
        "store_manager",
        "market_id",
        "division_id",
        "record_end_date",
        "record_start_date",
        "store_close_date",
        "store_street_number",
        "store_zip_code"
    FROM "store_renamed_trimmed_cleaned_null_casted"
)

-- COCOON BLOCK END
SELECT * FROM "store_renamed_trimmed_cleaned_null_casted_missing_handled"

stg_store.yml (Document the table)

version: 2
models:
- name: stg_store
  description: The table is about retail stores. It contains details like store ID,
    name, location, size, employees, operating hours, and management. It also includes
    information on the store's market, division, and company. Financial details like
    tax percentage and geographical data like GMT offset are provided. The table tracks
    when store records were created, updated, or if the store closed.
  columns:
  - name: store_id
    description: Unique identifier for the store
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Although not mentioned in the initial list, the store_id column
        is present in the sample data and appears to be a unique identifier for each
        store. For this table, where each row represents a unique store, the store_id
        is likely to be unique across all rows.
  - name: store_surrogate_key
    description: Surrogate key for the store
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This is an artificial key created to uniquely identify each store.
        In a well-designed database, this should be unique for each store entry.
  - name: store_floor_space
    description: Floor space of the store in square units
    tests:
    - not_null
  - name: company_id
    description: Unique identifier for the company
    tests:
    - not_null
  - name: store_country
    description: Country where the store is located
    tests:
    - not_null
  - name: store_state
    description: State where the store is located
    tests:
    - not_null
    - accepted_values:
        values:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
  - name: store_street_type
    description: Type of street (e.g., Ave, St, Blvd)
    tests:
    - not_null
    - accepted_values:
        values:
        - St
        - Ave
        - Blvd
        - Dr
        - Ln
        - Rd
        - Way
        - Pl
        - Ct
        - Ter
        - Cir
        - Pkwy
        - Hwy
        - Expy
        - Fwy
        - Aly
        - Bnd
        - Crst
        - Xing
        - Sq
        - Trl
        - Loop
        - Dr.
  - name: store_hours
    description: Operating hours of the store
    tests:
    - not_null
  - name: store_county
    description: County where the store is located
    tests:
    - not_null
  - name: market_manager
    description: Name of the market manager
    tests:
    - not_null
  - name: store_gmt_offset
    description: GMT offset of the store's timezone
    tests:
    - not_null
  - name: store_city
    description: City where the store is located
    tests:
    - not_null
  - name: store_tax_percentage
    description: Tax percentage applicable to the store
    tests:
    - not_null
  - name: employee_count
    description: Number of employees in the store
    tests:
    - not_null
  - name: store_suite_number
    description: Suite number of the store
    tests:
    - not_null
  - name: store_street_name
    description: Name of the street where store is located
    tests:
    - not_null
  - name: store_manager
    description: Name of the store manager
    tests:
    - not_null
  - name: market_id
    description: Unique identifier for the market
    tests:
    - not_null
  - name: division_id
    description: Unique identifier for the division
    tests:
    - not_null
  - name: record_end_date
    description: End date of the record
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record
    tests:
    - not_null
  - name: store_close_date
    description: Date when the store was closed
    cocoon_meta:
      missing_acceptable: Not applicable for stores still in operation.
  - name: store_street_number
    description: Street number of the store
    tests:
    - not_null
  - name: store_zip_code
    description: ZIP code of the store location
    tests:
    - not_null

stg_item (first 100 rows)

UNIT_OF_MEASURE ITEM_DESCRIPTION MANUFACTURER_ID CONTAINER_TYPE SUBCATEGORY CATEGORY_NAME CATEGORY_ID MANAGER_ID SIZE_ ITEM_SURROGATE_KEY CURRENT_PRICE FORMULATION_CODE COLOR ITEM_ID WHOLESALE_COST SUBCATEGORY_ID BRAND_NAME PRODUCT_NAME BRAND_ID RECORD_END_DATE RECORD_START_DATE
0 Teaspoon None 52 Unknown Pop Music 5 6 None 1 27.02 3663peru009490160959 spring AAAAAAAABAAAAAAA 23.23 3 exportischolar #2 ought 5003002 NaT 1997-10-27
1 Bunch False opportunities would run alone with a views. Early approaches would show inc, european intentions; important, main passages shall know urban, 294 Unknown dresses Women 1 98 small 2 1.12 516steel060826230906 rosy AAAAAAAACAAAAAAA 0.38 1 amalgamalg #1 able 1001001 2000-10-26 1997-10-27
2 Cup False opportunities would run alone with a views. Early approaches would show inc, european intentions; important, main passages shall know urban, 294 Unknown decor Home 7 18 None 3 7.11 516steel060826230906 sienna AAAAAAAACAAAAAAA 0.38 7 brandbrand #4 pri 1001001 NaT 2000-10-27
3 Tablespoon Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 479 Unknown infants Children 3 26 extralarge 4 1.35 610157moccasin018327 red AAAAAAAAEAAAAAAA 0.85 2 importoexporti #1 ese 3002001 1999-10-27 1997-10-27
4 Cup Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 220 Unknown shirts Men 2 27 small 5 4.00 42214rosy28066558020 pink AAAAAAAAEAAAAAAA 1.76 2 importoimporto #2 anti 2002002 2001-10-26 1999-10-28
5 Bundle Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 212 Unknown pants Men 2 6 large 6 0.85 42214rosy28066558020 moccasin AAAAAAAAEAAAAAAA 1.76 3 exportiimporto #1 cally 2002002 NaT 2001-10-27
6 Teaspoon Anxious accounts must catch also years. Revolutionary, large directors used to embrace then mo 214 Unknown newborn Children 3 64 small 7 9.94 6moccasin24027188872 spring AAAAAAAAHAAAAAAA 6.75 1 amalgexporti #2 ation 3001002 NaT 1997-10-27
7 Carton F 630 Unknown toddlers Children 3 25 extralarge 8 2.76 35123wheat3256343398 turquoise AAAAAAAAIAAAAAAA 0.85 3 exportiexporti #1 eing 3003001 2000-10-26 1997-10-27
8 Tablespoon F 630 Unknown swimwear Women 1 3 medium 9 4.46 35123wheat3256343398 wheat AAAAAAAAIAAAAAAA 0.85 3 edu packamalg #2 st 1004002 NaT 2000-10-27
9 Teaspoon Classical services go trousers. However great galleries might say needs. Assumptions change very in favour of the notes. Teeth woul 350 Unknown scanners Electronics 10 34 None 10 8.94 8159007505thistle447 pale AAAAAAAAKAAAAAAA 4.11 8 namelessunivamalg #11 bar 10008011 1999-10-27 1997-10-27
10 Bunch Correct, fo 625 Unknown estate Jewelry 6 26 None 11 54.87 snow1543775706017405 yellow AAAAAAAAKAAAAAAA 4.11 14 edu packbrand #4 oughtought 10008011 2001-10-26 1999-10-28
11 Tablespoon Corporate, important facilities claim trying, external sides. Elements used to expect home pr 264 Unknown furniture Home 7 19 None 12 6.54 968467777sky92069287 royal AAAAAAAAKAAAAAAA 4.11 14 corpnameless #3 able 10008011 NaT 2001-10-27
12 Bundle Hard, private departments spoil more quickly possible members; clear troops fail only needs. 167 Unknown costumes Jewelry 6 51 None 13 8.76 883208731996blue7862 olive AAAAAAAANAAAAAAA 7.62 12 importobrand #6 priought 6012006 NaT 1997-10-27
13 Dram Teachers carry by the children; old democrats enco 460 Unknown hockey Sports 8 6 None 14 1.85 1144670162goldenrod2 red AAAAAAAAOAAAAAAA 0.59 7 brandnameless #5 eseought 8007005 2000-10-26 1997-10-27
14 Pound Teachers carry by the children; old democrats enco 86 Unknown Country Music 5 11 None 15 2.57 1144670162goldenrod2 royal AAAAAAAAOAAAAAAA 0.59 2 importoscholar #2 anti 5002002 NaT 2000-10-27
15 Pound Dominant, christian pp. may not raise 117 Unknown fragrances Women 1 23 large 16 0.31 36933056603steel7373 bisque AAAAAAAAABAAAAAA 0.14 2 importoamalg #1 cally 1002001 1999-10-27 1997-10-27
16 Dram Dominant, christian pp. may not raise 117 Unknown accessories Men 2 41 extralarge 17 6.49 452645olive281530722 snow AAAAAAAAABAAAAAA 0.14 1 amalgimporto #2 ation 1002001 2001-10-26 1999-10-28
17 Carton None 117 Unknown fragrances Women 1 63 medium 18 0.87 452645olive281530722 rosy AAAAAAAAABAAAAAA 0.48 2 importoamalg #1 eingought 1002001 NaT 2001-10-27
18 Ton None 364 Unknown sports-apparel Men 2 13 large 19 10.61 85seashell1303417084 smoke AAAAAAAADBAAAAAA 4.77 4 edu packimporto #2 stought 2004002 NaT 1997-10-27
19 Gram Legal, foreign days know losses; briefly equivalent arguments will expect today. New, front grounds look hot, other aspects. Actually national husbands show usually of course other stations; huge, k 995 Unknown maternity Women 1 21 extralarge 20 29.35 97245417ivory0043452 tan AAAAAAAAEBAAAAAA 18.78 3 exportiamalg #1 bar 1003001 2000-10-26 1997-10-27
20 Pallet Legal, foreign days know losses; briefly equivalent arguments will expect today. New, front grounds look hot, other aspects. Actually national husbands show usually of course other stations; huge, k 995 Unknown consignment Jewelry 6 4 None 21 10.71 1050463678plum205437 sienna AAAAAAAAEBAAAAAA 8.46 3 corpbrand #6 oughtable 6016006 NaT 2000-10-27
21 Each Members endure already near additional details. Ministers should ignore whole times. Bright, brief beliefs become highly bright men; o 169 Unknown karaoke Electronics 10 40 None 22 7.11 4900684033pink844758 sandy AAAAAAAAGBAAAAAA 3.27 5 scholarunivamalg #6 able 10005006 1999-10-27 1997-10-27
22 Bunch Below long minutes make primarily by a months. Secure effects get much upo 260 Unknown karaoke Electronics 10 44 None 23 3.73 569seashell149755477 papaya AAAAAAAAGBAAAAAA 1.41 5 scholarunivamalg #7 priable 10005006 2001-10-26 1999-10-28
23 Ton Below long minutes make primarily by a months. Secure effects get much upo 260 Unknown dresses Women 1 10 medium 24 2.61 569seashell149755477 lime AAAAAAAAGBAAAAAA 0.86 1 amalgamalg #1 eseable 10005006 NaT 2001-10-27
24 Bundle Major brothers must not mean true annual, aware workers. Regulations will let more mechanisms. English pictures take tha 338 Unknown swimwear Women 1 18 large 25 75.28 90papaya546284022999 purple AAAAAAAAJBAAAAAA 50.43 4 edu packamalg #2 anti 1004002 NaT 1997-10-27
25 Box Hands cannot show just administrative studies. Powerful orders come fiscal thanks. Major, certain nurses work still relative pa 26 Unknown sports-apparel Men 2 31 small 26 2.77 thistle3370503164308 spring AAAAAAAAKBAAAAAA 1.91 4 edu packimporto #1 cally 2004001 2000-10-26 1997-10-27
26 Pound New, only police shall start generally left, important holidays. Inte 734 Unknown diamonds Jewelry 6 31 None 27 8.57 thistle3370503164308 orchid AAAAAAAAKBAAAAAA 1.91 4 importocorp #4 ation 2004001 NaT 2000-10-27
27 Dram External, actual teache 886 Unknown toddlers Children 3 32 medium 28 0.15 56715743614hot522158 turquoise AAAAAAAAMBAAAAAA 0.07 3 exportiexporti #1 eingable 3003001 1999-10-27 1997-10-27
28 Carton None 209 Unknown swimwear Women 1 35 large 29 1.04 56715743614hot522158 yellow AAAAAAAAMBAAAAAA 0.07 3 edu packamalg #2 stable 3003001 2001-10-26 1999-10-28
29 Bundle None 732 Unknown mens-watches Jewelry 6 32 None 30 86.00 spring82346236549375 gainsboro AAAAAAAAMBAAAAAA 62.78 8 namelesscorp #7 bar 6008007 NaT 2001-10-27
30 Each None 167 Unknown fishing Sports 8 98 None 31 8.48 7wheat78839382233684 lawn AAAAAAAAPBAAAAAA 3.30 15 scholarmaxi #2 oughtpri 8015002 NaT 1997-10-27
31 Dram Different numbers might not visit; rights used to remember. Labour students must put as slowly possible children. Never 431 Unknown curtains-and-drapes Home 7 7 None 32 1.77 royal348530153475607 turquoise AAAAAAAAACAAAAAA 1.00 4 edu packbrand #3 able 7004003 2000-10-26 1997-10-27
32 Carton None 154 Unknown toddlers Children 3 51 medium 33 7.86 36972puff56515747175 plum AAAAAAAAACAAAAAA 1.00 4 exportiexporti #2 pripri 3003002 NaT 2000-10-27
33 Pallet Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 553 Unknown personal Electronics 10 58 None 34 2.07 29171thistle61991621 honeydew AAAAAAAACCAAAAAA 1.49 7 brandunivamalg #1 esepri 10007001 1999-10-27 1997-10-27
34 Teaspoon Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 553 Unknown arts Books 9 5 None 35 2.32 khaki119648424197997 green AAAAAAAACCAAAAAA 1.11 1 amalgmaxi #12 anti 10007001 2001-10-26 1999-10-28
35 Case Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 553 Unknown dresses Women 1 37 medium 36 91.42 khaki119648424197997 thistle AAAAAAAACCAAAAAA 34.73 1 amalgamalg #1 cally 1001001 NaT 2001-10-27
36 Bundle Clearly due proceedings should compensate particular, main agreements. Heels may not deny later easily different spaces; vast, additional items might export fresh, only sentences. Patients expand 489 Unknown accessories Men 2 28 small 37 2.42 8violet4563425031455 rose AAAAAAAAFCAAAAAA 0.87 1 amalgimporto #2 ation 2001002 NaT 1997-10-27
37 Bunch Cheap problems can draw please over good stars. Either long children would pass similar, different metres; base, large surroundings 933 Unknown sports-apparel Men 2 36 medium 38 16.70 5red3080638918015686 violet AAAAAAAAGCAAAAAA 8.01 4 edu packimporto #1 eingpri 2004001 2000-10-26 1997-10-27
38 None Cheap problems can draw please over good stars. Either long children would pass similar, different metres; base, large surroundings 368 Unknown business Books 9 34 None 39 5.07 5red3080638918015686 sandy AAAAAAAAGCAAAAAA 8.01 2 importomaxi #4 stpri 2004001 NaT 2000-10-27
39 Pallet Deep good activities should resist to a substances; that is beautiful businessmen like problems. Late huge meet 147 Unknown lighting Home 7 64 None 40 9.93 olive423496330709355 sandy AAAAAAAAICAAAAAA 8.63 8 namelessbrand #1 bar 7008001 1999-10-27 1997-10-27
40 Bunch Deep good activities should resist to a substances; that is beautiful businessmen like problems. Late huge meet 310 Unknown toddlers Children 3 85 small 41 4.40 09031176427khaki3414 red AAAAAAAAICAAAAAA 8.63 8 exportiexporti #2 oughtese 7008001 2001-10-26 1999-10-28
41 Cup Once straight tools migh 540 Unknown Pop Music 5 64 None 42 9.15 09031176427khaki3414 powder AAAAAAAAICAAAAAA 8.63 3 exportischolar #1 able 5003001 NaT 2001-10-27
42 Pallet None 301 Unknown travel Books 9 19 None 43 6.08 19orchid108200357725 firebrick AAAAAAAALCAAAAAA 4.86 10 univunivamalg #8 priese 9010008 NaT 1997-10-27
43 Case None 124 Unknown Rock Music 5 59 None 44 5.20 salmon36671081354930 chocolate AAAAAAAAMCAAAAAA 1.71 1 amalgscholar #1 esese 5001001 2000-10-26 1997-10-27
44 None None 459 Unknown mens-watches Jewelry 6 15 None 45 0.37 salmon36671081354930 khaki AAAAAAAAMCAAAAAA 1.71 1 namelesscorp #6 anti 5001001 NaT 2000-10-27
45 Teaspoon Emotional, nuclear farmers can understand also in t 252 Unknown costumes Jewelry 6 19 None 46 98.66 115838salmon36529828 saddle AAAAAAAAOCAAAAAA 85.83 12 importobrand #7 cally 6012007 1999-10-27 1997-10-27
46 Dram Emotional, nuclear farmers can understand also in t 99 Unknown women's watches Shoes 4 5 small 47 3.00 115838salmon36529828 peru AAAAAAAAOCAAAAAA 1.74 1 amalgedu pack #2 ation 6012007 2001-10-26 1999-10-28
47 Dram Emotional, nuclear farmers can understand also in t 41 Unknown Rock Music 5 21 None 48 1.45 03879white9235299949 thistle AAAAAAAAOCAAAAAA 1.74 1 amalgscholar #1 eingese 5001001 NaT 2001-10-27
48 None None 443 Unknown school-uniforms Children 3 56 large 49 8.01 027315130steel656106 powder AAAAAAAABDAAAAAA 2.48 4 edu packexporti #2 stese 3004002 NaT 1997-10-27
49 Cup Activities cover 140 Unknown athletic-wear Shoes 4 72 small 50 4.99 1446003050medium4139 papaya AAAAAAAACDAAAAAA 3.54 4 edu packedu pack #1 bar 4004001 2000-10-26 1997-10-27
50 Gram International, likely trees put carefully variations. Eventually silent observations might think better changes. Western, aggressive gardens protect furthermore stars. Yesterday adequate action 140 Unknown toddlers Children 3 33 extralarge 51 3.99 1446003050medium4139 sky AAAAAAAACDAAAAAA 1.99 3 exportiexporti #2 oughtanti 3003002 NaT 2000-10-27
51 Pound Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 865 Unknown infants Children 3 33 medium 52 2.99 moccasin133060463675 rose AAAAAAAAEDAAAAAA 2.15 2 importoexporti #1 able 3002001 1999-10-27 1997-10-27
52 Case Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 865 Unknown memory Electronics 10 14 None 53 8.26 moccasin133060463675 peru AAAAAAAAEDAAAAAA 2.47 10 univamalgamalg #3 prianti 3002001 2001-10-26 1999-10-28
53 Ounce Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 865 Unknown dresses Women 1 40 medium 54 37.84 turquoise29355882814 khaki AAAAAAAAEDAAAAAA 20.05 1 amalgamalg #1 eseanti 1001001 NaT 2001-10-27
54 Cup Applicable versions feel so silly peasants. Lessons make relatively for example medical leaves. Details might want criminal, id 47 Unknown swimwear Women 1 18 medium 55 0.99 7975726dodger7126990 ghost AAAAAAAAHDAAAAAA 0.79 4 edu packamalg #2 anti 1004002 NaT 1997-10-27
55 Teaspoon Events might shape successfully; recent flowers should trace alike hard questions. Small areas could not give easy, enthusiastic ends. Obvious 412 Unknown disk-drives Electronics 10 5 None 56 7.44 45885navy00969807009 hot AAAAAAAAIDAAAAAA 3.94 11 amalgamalgamalg #6 cally 10011006 2000-10-26 1997-10-27
56 Dozen Events might shape successfully; recent flowers should trace alike hard questions. Small areas could not give easy, enthusiastic ends. Obvious 591 Unknown school-uniforms Children 3 24 medium 57 4.58 611purple39006426349 red AAAAAAAAIDAAAAAA 3.94 11 edu packexporti #2 ation 10011006 NaT 2000-10-27
57 Pound Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 187 Unknown kids Shoes 4 4 small 58 0.87 602196716medium47751 blush AAAAAAAAKDAAAAAA 0.71 3 exportiedu pack #1 einganti 4003001 1999-10-27 1997-10-27
58 Teaspoon Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 413 Unknown school-uniforms Children 3 57 medium 59 38.82 602196716medium47751 sandy AAAAAAAAKDAAAAAA 15.13 3 edu packexporti #2 stanti 3004002 2001-10-26 1999-10-28
59 None Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 849 Unknown women's watches Jewelry 6 19 None 60 4.87 602196716medium47751 indian AAAAAAAAKDAAAAAA 15.13 9 maxicorp #5 bar 3004002 NaT 2001-10-27
60 Case None 785 Unknown musicals Electronics 10 22 None 61 0.50 83227powder377577506 gainsboro AAAAAAAANDAAAAAA 0.22 6 corpunivamalg #11 oughtcally 10006011 NaT 1997-10-27
61 Bunch Either british authorities would receive slightly. Yesterday unique clothes work seldom old sales. Famous, possible programmes take reall 633 Unknown bracelets Jewelry 6 84 None 62 3.49 206thistle2954355697 violet AAAAAAAAODAAAAAA 1.18 4 edu packcorp #7 able 6004007 2000-10-26 1997-10-27
62 Ton None 633 Unknown shirts Men 2 41 medium 63 4.34 206thistle2954355697 red AAAAAAAAODAAAAAA 1.18 2 importoimporto #2 prically 6004007 NaT 2000-10-27
63 Tablespoon Both new conditions ask acute, ashamed pupils. Short, poor fami 322 Unknown optics Sports 8 14 None 64 2.02 2tan8009172776437677 maroon AAAAAAAAAEAAAAAA 1.69 9 maxinameless #5 esecally 8009005 1999-10-27 1997-10-27
64 Bundle Both new conditions ask acute, ashamed pupils. Short, poor fami 363 Unknown scanners Electronics 10 27 None 65 73.24 567702bisque83928674 blue AAAAAAAAAEAAAAAA 54.19 8 namelessunivamalg #15 anti 10008015 2001-10-26 1999-10-28
65 Bundle Conservatives exert ahead for a 121 Unknown science Books 9 51 None 66 6.67 438189282firebrick54 purple AAAAAAAAAEAAAAAA 54.19 8 maximaxi #7 cally 10008015 NaT 2001-10-27
66 Ounce None 285 Unknown fiction Books 9 57 None 67 1.47 583spring53597495026 black AAAAAAAADEAAAAAA 0.83 15 scholarunivamalg #8 ation 9015008 NaT 1997-10-27
67 Carton None 76 Unknown sports-apparel Men 2 35 small 68 6.93 16294729rose54248882 navy AAAAAAAAEEAAAAAA 3.11 4 edu packimporto #1 eingcally 2004001 2000-10-26 1997-10-27
68 Gross Modern, golden faces illustrate previously grounds. Acceptable, gold sides cannot mind modern plans; large thanks find highly only meals. Enormous, popular teachers 76 Unknown fragrances Women 1 28 large 69 5.67 972807876turquoise30 pale AAAAAAAAEEAAAAAA 3.11 2 importoamalg #2 stcally 2004001 NaT 2000-10-27
69 Dram Factors sha 445 Unknown Classical Music 5 52 None 70 9.79 purple89249207875245 rose AAAAAAAAGEAAAAAA 4.40 4 edu packscholar #1 bar 5004001 1999-10-27 1997-10-27
70 Ounce General stars believe for example at a 445 Unknown sports Books 9 26 None 71 3.21 purple89249207875245 lavender AAAAAAAAGEAAAAAA 2.53 14 edu packunivamalg #12 oughtation 9014012 2001-10-26 1999-10-28
71 Ton None 445 Unknown fragrances Women 1 27 medium 72 5.31 5peru941765840464570 blush AAAAAAAAGEAAAAAA 2.53 2 importoamalg #1 able 1002001 NaT 2001-10-27
72 Tablespoon None 653 Unknown maternity Women 1 3 small 73 41.16 03293333saddle019730 misty AAAAAAAAJEAAAAAA 27.57 3 exportiamalg #2 priation 1003002 NaT 1997-10-27
73 Carton Clergy ought 954 Unknown sports-apparel Men 2 17 small 74 3.91 8341981838751coral30 papaya AAAAAAAAKEAAAAAA 1.44 4 edu packimporto #1 eseation 2004001 2000-10-26 1997-10-27
74 Tablespoon Here distant classes would not prove therefore objectives. Public books improve of course politi 954 Unknown stereos Electronics 10 12 None 75 3.26 965042tomato56650663 wheat AAAAAAAAKEAAAAAA 1.30 4 exportiamalgamalg #8 anti 2004001 NaT 2000-10-27
75 Ounce Around single relations clear heavily over a controls. Arms could leave signs. T 46 Unknown travel Books 9 32 None 76 3.84 140503351631sienna87 puff AAAAAAAAMEAAAAAA 2.76 10 univunivamalg #5 cally 9010005 1999-10-27 1997-10-27
76 Ounce Around single relations clear heavily over a controls. Arms could leave signs. T 46 Unknown toddlers Children 3 88 small 77 0.90 140503351631sienna87 purple AAAAAAAAMEAAAAAA 2.76 3 exportiexporti #2 ation 3003002 2001-10-26 1999-10-28
77 Pound Around single relations clear heavily over a controls. Arms could leave signs. T 515 Unknown rings Jewelry 6 70 None 78 0.23 85716779158spring390 royal AAAAAAAAMEAAAAAA 0.14 6 corpcorp #7 eingation 3003002 NaT 2001-10-27
78 Ounce None 385 Unknown televisions Electronics 10 2 None 79 2.87 sandy027498424299031 papaya AAAAAAAAPEAAAAAA 1.37 9 maxiunivamalg #12 station 10009012 NaT 1997-10-27
79 Bundle Particular, armed costs ought to spin certainly. Events get in the costs. Late, parliamentary foods shall not arrest there able men. Other, difficult officers hold high interests. Model shares dre 376 Unknown kids Shoes 4 38 None 80 2.16 26985wheat7381826860 yellow AAAAAAAAAFAAAAAA 1.59 3 exportiedu pack #1 bar 4003001 2000-10-26 1997-10-27
80 Box Particular, armed costs ought to spin certainly. Events get in the costs. Late, parliamentary foods shall not arrest there able men. Other, difficult officers hold high interests. Model shares dre 37 Unknown mens Shoes 4 68 large 81 3.65 26985wheat7381826860 cyan AAAAAAAAAFAAAAAA 3.13 3 importoedu pack #2 oughting 4002002 NaT 2000-10-27
81 Dram None 306 Unknown athletic-wear Shoes 4 53 small 82 1.43 0340aquamarine369806 violet AAAAAAAACFAAAAAA 1.17 4 edu packedu pack #1 able 4004001 1999-10-27 1997-10-27
82 Each Children could not influence most flat, careful figures. Local, true stars could commend. As scottish blocks want still old benefits. Skills should not try precisely. Y 622 Unknown pendants Jewelry 6 5 None 83 4.25 146048520linen957568 misty AAAAAAAACFAAAAAA 1.17 4 brandcorp #4 pring 4004001 2001-10-26 1999-10-28
83 Gross Cultural, cultural contracts assume colours. Close legitimate flowers watch enough british reasons. Probably old years must set recently intensive words. Elderly factors go otherwise useless months. 662 Unknown sports-apparel Men 2 3 large 84 1.41 8587plum853813979789 grey AAAAAAAACFAAAAAA 1.26 4 edu packimporto #1 eseing 2004001 NaT 2001-10-27
84 Ounce Again common customers should make hardly proposals. Close groups can prevent after a cars. Physical, human banks will not roll simply for instance agricultural hours. Northern centre 156 Unknown pants Men 2 66 small 85 39.31 859187711467pale4603 sky AAAAAAAAFFAAAAAA 34.98 3 exportiimporto #2 anti 2003002 NaT 1997-10-27
85 Pallet Parents like only new demands. Current players let charges. Specific, young towns realise however countr 985 Unknown diamonds Jewelry 6 2 None 86 0.87 642534525118salmon94 powder AAAAAAAAGFAAAAAA 0.74 2 importocorp #7 cally 6002007 2000-10-26 1997-10-27
86 Bunch Lives must rule better now sem 985 Unknown newborn Children 3 57 small 87 4.51 66917821011ghost0861 sky AAAAAAAAGFAAAAAA 1.53 2 amalgexporti #2 ation 3001002 NaT 2000-10-27
87 Gross Fears obtain still blind, active others. Forever numerous signs last even here civil strate 87 Unknown newborn Children 3 24 large 88 7.29 97346sandy2527135842 snow AAAAAAAAIFAAAAAA 3.71 1 amalgexporti #1 eingeing 3001001 1999-10-27 1997-10-27
88 Bundle None 967 Unknown accessories Men 2 5 large 89 4.79 97346sandy2527135842 coral AAAAAAAAIFAAAAAA 3.44 1 amalgimporto #2 sting 3001001 2001-10-26 1999-10-28
89 Teaspoon Both french meanings cannot tackle then 907 Unknown Rock Music 5 35 None 90 1.18 97346sandy2527135842 blue AAAAAAAAIFAAAAAA 0.44 1 amalgscholar #1 bar 3001001 NaT 2001-10-27
90 Pound None 176 Unknown musicals Electronics 10 74 None 91 0.64 2925royal36510681005 lace AAAAAAAALFAAAAAA 0.28 6 corpunivamalg #7 oughtst 10006007 NaT 1997-10-27
91 None Employers w 547 Unknown optics Sports 8 12 None 92 4.48 1906778941seashell97 indian AAAAAAAAMFAAAAAA 2.64 9 maxinameless #3 able 8009003 2000-10-26 1997-10-27
92 Pound Employers w 290 Unknown fishing Sports 8 90 None 93 1.06 082sienna17917347780 cyan AAAAAAAAMFAAAAAA 0.61 15 scholarmaxi #4 prist 8015004 NaT 2000-10-27
93 Box Institutions ought to provide good agents; large, comfortable 254 Unknown shirts Men 2 33 small 94 0.11 46040088turquoise736 orange AAAAAAAAOFAAAAAA 0.06 2 importoimporto #1 esest 2002001 1999-10-27 1997-10-27
94 Tablespoon Institutions ought to provide good agents; large, comfortable 276 Unknown Pop Music 5 95 None 95 2.55 414160524grey3616827 pale AAAAAAAAOFAAAAAA 1.30 3 exportischolar #2 anti 5003002 2001-10-26 1999-10-28
95 Pound None 54 Unknown bridal Jewelry 6 17 None 96 4.19 20988791004papaya520 cream AAAAAAAAOFAAAAAA 1.30 3 amalgcorp #1 cally 6001001 NaT 2001-10-27
96 Gross None 275 Unknown fiction Books 9 5 None 97 57.09 96goldenrod451188509 rose AAAAAAAABGAAAAAA 32.54 15 scholarunivamalg #2 ation 9015002 NaT 1997-10-27
97 Ton Opportunities clear there. Basic rules ask british locations. More financial visits construct other funds. Unk 302 Unknown outdoor Sports 8 24 None 98 3.16 01882924064yellow241 medium AAAAAAAACGAAAAAA 2.18 8 namelessnameless #9 eingst 8008009 2000-10-26 1997-10-27
98 Pound Opportunities clear there. Basic rules ask british locations. More financial visits construct other funds. Unk 302 Unknown karaoke Electronics 10 19 None 99 4.81 215235wheat677989979 salmon AAAAAAAACGAAAAAA 2.18 5 scholarunivamalg #15 stst 8008009 NaT 2000-10-27

stg_item.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"item_renamed" AS (
    -- Rename: Renaming columns
    -- I_ITEM_SK -> ITEM_SURROGATE_KEY
    -- I_ITEM_ID -> ITEM_ID
    -- I_REC_START_DATE -> RECORD_START_DATE
    -- I_REC_END_DATE -> RECORD_END_DATE
    -- I_ITEM_DESC -> ITEM_DESCRIPTION
    -- I_CURRENT_PRICE -> CURRENT_PRICE
    -- I_WHOLESALE_COST -> WHOLESALE_COST
    -- I_BRAND_ID -> BRAND_ID
    -- I_BRAND -> BRAND_NAME
    -- I_CLASS_ID -> SUBCATEGORY_ID
    -- I_CLASS -> SUBCATEGORY
    -- I_CATEGORY_ID -> CATEGORY_ID
    -- I_CATEGORY -> CATEGORY_NAME
    -- I_MANUFACT_ID -> MANUFACTURER_ID
    -- I_MANUFACT -> MANUFACTURER
    -- I_SIZE -> SIZE_
    -- I_FORMULATION -> FORMULATION_CODE
    -- I_COLOR -> COLOR
    -- I_UNITS -> UNIT_OF_MEASURE
    -- I_CONTAINER -> CONTAINER_TYPE
    -- I_MANAGER_ID -> MANAGER_ID
    -- I_PRODUCT_NAME -> PRODUCT_NAME
    SELECT 
        "I_ITEM_SK" AS "ITEM_SURROGATE_KEY",
        "I_ITEM_ID" AS "ITEM_ID",
        "I_REC_START_DATE" AS "RECORD_START_DATE",
        "I_REC_END_DATE" AS "RECORD_END_DATE",
        "I_ITEM_DESC" AS "ITEM_DESCRIPTION",
        "I_CURRENT_PRICE" AS "CURRENT_PRICE",
        "I_WHOLESALE_COST" AS "WHOLESALE_COST",
        "I_BRAND_ID" AS "BRAND_ID",
        "I_BRAND" AS "BRAND_NAME",
        "I_CLASS_ID" AS "SUBCATEGORY_ID",
        "I_CLASS" AS "SUBCATEGORY",
        "I_CATEGORY_ID" AS "CATEGORY_ID",
        "I_CATEGORY" AS "CATEGORY_NAME",
        "I_MANUFACT_ID" AS "MANUFACTURER_ID",
        "I_MANUFACT" AS "MANUFACTURER",
        "I_SIZE" AS "SIZE_",
        "I_FORMULATION" AS "FORMULATION_CODE",
        "I_COLOR" AS "COLOR",
        "I_UNITS" AS "UNIT_OF_MEASURE",
        "I_CONTAINER" AS "CONTAINER_TYPE",
        "I_MANAGER_ID" AS "MANAGER_ID",
        "I_PRODUCT_NAME" AS "PRODUCT_NAME"
    FROM "item"
),

"item_renamed_trimmed" AS (
    -- Trim Leading and Trailing Spaces
    SELECT
        "ITEM_SURROGATE_KEY",
        "ITEM_ID",
        "RECORD_START_DATE",
        "RECORD_END_DATE",
        "CURRENT_PRICE",
        "WHOLESALE_COST",
        "BRAND_ID",
        "BRAND_NAME",
        "SUBCATEGORY_ID",
        "SUBCATEGORY",
        "CATEGORY_ID",
        "CATEGORY_NAME",
        "MANUFACTURER_ID",
        "MANUFACTURER",
        "SIZE_",
        "FORMULATION_CODE",
        "COLOR",
        "UNIT_OF_MEASURE",
        "CONTAINER_TYPE",
        "MANAGER_ID",
        "PRODUCT_NAME",
        TRIM("ITEM_DESCRIPTION") AS "ITEM_DESCRIPTION"
    FROM "item_renamed"
),

"item_renamed_trimmed_cleaned" AS (
    -- Clean unusual string values: 
    -- SUBCATEGORY: The SUBCATEGORY column has several issues: 1. Misspelling: 'karoke' should be 'karaoke' 2. Inconsistent use of singular/plural: e.g., 'dresses' vs 'shirt', 'pants' vs 'accessories' 3. Inconsistent hyphenation: e.g., 'sports-apparel' vs 'mens watch' 4. Typo: 'birdal' should be 'bridal' 5. Inconsistent capitalization: most are lowercase, but some like 'pop' and 'rock' might refer to music genres To standardize, we'll use lowercase, plural forms where applicable, and add hyphens for compound terms. Music genres will be capitalized. 
    -- MANUFACTURER: The problem is that all values in the MANUFACTURER column are nonsensical combinations of word fragments, not representing real manufacturers. These values appear to be randomly generated strings or corrupted data. There are no correct or meaningful values that can be derived from these nonsensical combinations. In this case, the best approach is to map all these invalid entries to an empty string, indicating missing or invalid data. 
    -- SIZE_: The problem is that the SIZE_ column has inconsistent formatting and scale. 'extra large' uses spaces while others don't, which is inconsistent. 'petite' and 'economy' are not part of the standard size scale (small, medium, large, extra large). The correct values should follow a consistent format without spaces and use the standard size scale. 
    -- UNIT_OF_MEASURE: The problem is inconsistency in unit representations and potential redundancy. 'Lb' and 'Pound' represent the same unit of weight, with 'Pound' being more descriptive. Similarly, 'Oz' and 'Ounce' are the same unit, with 'Ounce' being the full word. 'Tsp' and 'Tbl' are abbreviations that should be spelled out for clarity. 'Unknown' is not a valid unit of measure. The correct values should use full words where possible and maintain consistency. 
    -- PRODUCT_NAME: The problem is that some product names have redundant prefixes or suffixes, and some contain unexpected spaces. The correct values should be consistent, without redundancy or spaces. The most frequent patterns for each base word should be used. 
    -- ITEM_DESCRIPTION: Fail to run
    SELECT
        "ITEM_SURROGATE_KEY",
        "ITEM_ID",
        "RECORD_START_DATE",
        "RECORD_END_DATE",
        "CURRENT_PRICE",
        "WHOLESALE_COST",
        "BRAND_ID",
        "BRAND_NAME",
        "SUBCATEGORY_ID",
        CASE
            WHEN "SUBCATEGORY" = 'karoke' THEN 'karaoke'
            WHEN "SUBCATEGORY" = 'shirt' THEN 'shirts'
            WHEN "SUBCATEGORY" = 'athletic' THEN 'athletic-wear'
            WHEN "SUBCATEGORY" = 'costume' THEN 'costumes'
            WHEN "SUBCATEGORY" = 'diamond' THEN 'diamonds'
            WHEN "SUBCATEGORY" = 'infant' THEN 'infants'
            WHEN "SUBCATEGORY" = 'kid' THEN 'kids'
            WHEN "SUBCATEGORY" = 'mens watch' THEN 'mens-watches'
            WHEN "SUBCATEGORY" = 'musical' THEN 'musicals'
            WHEN "SUBCATEGORY" = 'optic' THEN 'optics'
            WHEN "SUBCATEGORY" = 'pant' THEN 'pants'
            WHEN "SUBCATEGORY" = 'scanner' THEN 'scanners'
            WHEN "SUBCATEGORY" = 'art' THEN 'arts'
            WHEN "SUBCATEGORY" = 'birdal' THEN 'bridal'
            WHEN "SUBCATEGORY" = 'bracelet' THEN 'bracelets'
            WHEN "SUBCATEGORY" = 'curtains/drapes' THEN 'curtains-and-drapes'
            WHEN "SUBCATEGORY" = 'disk drives' THEN 'disk-drives'
            WHEN "SUBCATEGORY" = 'men' THEN 'mens'
            WHEN "SUBCATEGORY" = 'pendant' THEN 'pendants'
            WHEN "SUBCATEGORY" = 'ring' THEN 'rings'
            WHEN "SUBCATEGORY" = 'sport' THEN 'sports'
            WHEN "SUBCATEGORY" = 'stereo' THEN 'stereos'
            WHEN "SUBCATEGORY" = 'television' THEN 'televisions'
            WHEN "SUBCATEGORY" = 'pop' THEN 'Pop'
            WHEN "SUBCATEGORY" = 'rock' THEN 'Rock'
            WHEN "SUBCATEGORY" = 'classical' THEN 'Classical'
            WHEN "SUBCATEGORY" = 'country' THEN 'Country'
            WHEN "SUBCATEGORY" = 'womens' THEN 'women''s watches'
            WHEN "SUBCATEGORY" = 'womens watch' THEN 'women''s watches'
            ELSE "SUBCATEGORY"
        END AS "SUBCATEGORY",
        "CATEGORY_ID",
        "CATEGORY_NAME",
        "MANUFACTURER_ID",
        CASE
            WHEN "MANUFACTURER" = 'ableantiable' THEN ''
            WHEN "MANUFACTURER" = 'anticallyeing' THEN ''
            WHEN "MANUFACTURER" = 'antieseese' THEN ''
            WHEN "MANUFACTURER" = 'ationoughtought' THEN ''
            WHEN "MANUFACTURER" = 'callyeingeing' THEN ''
            WHEN "MANUFACTURER" = 'callyese' THEN ''
            WHEN "MANUFACTURER" = 'priantianti' THEN ''
            WHEN "MANUFACTURER" = 'ableablepri' THEN ''
            WHEN "MANUFACTURER" = 'ablebarpri' THEN ''
            WHEN "MANUFACTURER" = 'ableoughtese' THEN ''
            WHEN "MANUFACTURER" = 'antieingn st' THEN ''
            WHEN "MANUFACTURER" = 'antin stn st' THEN ''
            WHEN "MANUFACTURER" = 'ationcallyought' THEN ''
            WHEN "MANUFACTURER" = 'ationeseought' THEN ''
            WHEN "MANUFACTURER" = 'barableable' THEN ''
            WHEN "MANUFACTURER" = 'barcallyese' THEN ''
            WHEN "MANUFACTURER" = 'bareseought' THEN ''
            WHEN "MANUFACTURER" = 'barprically' THEN ''
            WHEN "MANUFACTURER" = 'callyation' THEN ''
            WHEN "MANUFACTURER" = 'callyationpri' THEN ''
            WHEN "MANUFACTURER" = 'eseableought' THEN ''
            WHEN "MANUFACTURER" = 'eseantiable' THEN ''
            WHEN "MANUFACTURER" = 'eseantin st' THEN ''
            WHEN "MANUFACTURER" = 'esen stable' THEN ''
            WHEN "MANUFACTURER" = 'n stcallyought' THEN ''
            WHEN "MANUFACTURER" = 'priprically' THEN ''
            WHEN "MANUFACTURER" = 'ableablecally' THEN ''
            WHEN "MANUFACTURER" = 'ableanti' THEN ''
            WHEN "MANUFACTURER" = 'ablecallycally' THEN ''
            WHEN "MANUFACTURER" = 'antiablecally' THEN ''
            WHEN "MANUFACTURER" = 'antiationable' THEN ''
            WHEN "MANUFACTURER" = 'antieingable' THEN ''
            WHEN "MANUFACTURER" = 'antieingation' THEN ''
            WHEN "MANUFACTURER" = 'antieingpri' THEN ''
            WHEN "MANUFACTURER" = 'ationbarn st' THEN ''
            WHEN "MANUFACTURER" = 'ationcallyn st' THEN ''
            WHEN "MANUFACTURER" = 'ationeing' THEN ''
            WHEN "MANUFACTURER" = 'ationeingought' THEN ''
            WHEN "MANUFACTURER" = 'ationese' THEN ''
            WHEN "MANUFACTURER" = 'ationeseanti' THEN ''
            WHEN "MANUFACTURER" = 'barantipri' THEN ''
            WHEN "MANUFACTURER" = 'barcallyable' THEN ''
            WHEN "MANUFACTURER" = 'bareseanti' THEN ''
            WHEN "MANUFACTURER" = 'barn stable' THEN ''
            WHEN "MANUFACTURER" = 'callyable' THEN ''
            WHEN "MANUFACTURER" = 'callyantiought' THEN ''
            WHEN "MANUFACTURER" = 'callyationought' THEN ''
            WHEN "MANUFACTURER" = 'callybarpri' THEN ''
            WHEN "MANUFACTURER" = 'eingcallypri' THEN ''
            WHEN "MANUFACTURER" = 'eingpripri' THEN ''
            WHEN "MANUFACTURER" = 'eseanti' THEN ''
            WHEN "MANUFACTURER" = 'eseantiought' THEN ''
            WHEN "MANUFACTURER" = 'esecallyable' THEN ''
            WHEN "MANUFACTURER" = 'esecallypri' THEN ''
            WHEN "MANUFACTURER" = 'eseoughtable' THEN ''
            WHEN "MANUFACTURER" = 'esepriation' THEN ''
            WHEN "MANUFACTURER" = 'n stationese' THEN ''
            WHEN "MANUFACTURER" = 'n steingese' THEN ''
            WHEN "MANUFACTURER" = 'n steseeing' THEN ''
            WHEN "MANUFACTURER" = 'oughtableought' THEN ''
            WHEN "MANUFACTURER" = 'oughtbarpri' THEN ''
            WHEN "MANUFACTURER" = 'oughtpriese' THEN ''
            WHEN "MANUFACTURER" = 'priantically' THEN ''
            WHEN "MANUFACTURER" = 'prieseese' THEN ''
            WHEN "MANUFACTURER" = 'prioughtese' THEN ''
            WHEN "MANUFACTURER" = 'priprin st' THEN ''
            ELSE "MANUFACTURER"
        END AS "MANUFACTURER",
        CASE
            WHEN "SIZE_" = 'petite' THEN 'small'
            WHEN "SIZE_" = 'extra large' THEN 'extralarge'
            WHEN "SIZE_" = 'economy' THEN 'small'
            ELSE "SIZE_"
        END AS "SIZE_",
        "FORMULATION_CODE",
        "COLOR",
        CASE
            WHEN "UNIT_OF_MEASURE" = 'Lb' THEN 'Pound'
            WHEN "UNIT_OF_MEASURE" = 'Oz' THEN 'Ounce'
            WHEN "UNIT_OF_MEASURE" = 'Tsp' THEN 'Teaspoon'
            WHEN "UNIT_OF_MEASURE" = 'Tbl' THEN 'Tablespoon'
            WHEN "UNIT_OF_MEASURE" = 'Unknown' THEN ''
            ELSE "UNIT_OF_MEASURE"
        END AS "UNIT_OF_MEASURE",
        "CONTAINER_TYPE",
        "MANAGER_ID",
        CASE
            WHEN "PRODUCT_NAME" = 'ableable' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ableanti' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ableation' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ablecally' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ableeing' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ableese' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ablen st' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ableought' THEN 'able'
            WHEN "PRODUCT_NAME" = 'ablepri' THEN 'able'
            WHEN "PRODUCT_NAME" = 'antiable' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antianti' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antiation' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antically' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antieing' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antiese' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antin st' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antiought' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'antipri' THEN 'anti'
            WHEN "PRODUCT_NAME" = 'ationable' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationanti' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationation' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationcally' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationeing' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationese' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationn st' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationought' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'ationpri' THEN 'ation'
            WHEN "PRODUCT_NAME" = 'barable' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'baranti' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'baration' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'barcally' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'bareing' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'barese' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'barn st' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'barought' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'barpri' THEN 'bar'
            WHEN "PRODUCT_NAME" = 'callyable' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callyanti' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callyation' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callycally' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callyeing' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callyese' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callyn st' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callyought' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'callypri' THEN 'cally'
            WHEN "PRODUCT_NAME" = 'eingn st' THEN 'eingst'
            WHEN "PRODUCT_NAME" = 'esen st' THEN 'esest'
            WHEN "PRODUCT_NAME" = 'n st' THEN 'st'
            WHEN "PRODUCT_NAME" = 'n stable' THEN 'stable'
            WHEN "PRODUCT_NAME" = 'n stanti' THEN 'stanti'
            WHEN "PRODUCT_NAME" = 'n station' THEN 'station'
            WHEN "PRODUCT_NAME" = 'n stcally' THEN 'stcally'
            WHEN "PRODUCT_NAME" = 'n steing' THEN 'sting'
            WHEN "PRODUCT_NAME" = 'n stese' THEN 'stese'
            WHEN "PRODUCT_NAME" = 'n stn st' THEN 'stst'
            WHEN "PRODUCT_NAME" = 'n stought' THEN 'stought'
            WHEN "PRODUCT_NAME" = 'n stpri' THEN 'stpri'
            WHEN "PRODUCT_NAME" = 'oughtn st' THEN 'oughtst'
            WHEN "PRODUCT_NAME" = 'prin st' THEN 'prist'
            WHEN "PRODUCT_NAME" = 'eseeing' THEN 'eseing'
            WHEN "PRODUCT_NAME" = 'eseese' THEN 'esese'
            WHEN "PRODUCT_NAME" = 'oughteing' THEN 'oughting'
            WHEN "PRODUCT_NAME" = 'prieing' THEN 'pring'
            ELSE "PRODUCT_NAME"
        END AS "PRODUCT_NAME",
        CASE
            WHEN "ITEM_DESCRIPTION" = 'Particu' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Periods provide as distinctive, little ingredients; therefore social boys must not leave slightl' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Pictures see even healthy designs. Considerable, visual concessions last controversia' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Political parents know right; perfec' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Powers will not get influences. Electoral ports should show low, annual chains. Now young visitors may pose now however final pages. Bitterly right children suit increasing, leading el' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Principles secure best. Relevant foods mislead there so prime relations. Quickly convenient times may think men. Interesting, other bodies w' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Quite different services promote all the same. Private, marginal colleagues play of course similar, different girls. French, local girls reap here. Bad movies shorten relatively. Terms' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Rational, electronic photographs worry. Other, similar pounds might enable suddenly middle, growing months. Military, desperate funds shall not know then also various germans. Heavy' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Regional, indian casualties shall say of course legal relations. Endless, cultural animals dislike new, possible resources. Socialist, very plans wonder precisely available star' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Seats could come confident, moder' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Sensitive requirements will not supply all intelligent effects. U' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Serious, little suppliers object hot, new weeks. Votes shall prevail yet. Windows understand equal members. Average consequences go at least pales' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Short, bitter heads like then events. Assessments may hide just. Wild european books should maintain yesterday useful natural workers. Late responsible estimates would' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'So fair schools must go problems. Children should not paint in a photographs. Great, late senten' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'So new campaigns teach more straight early indians. International offices shake actual ministers. New, liable theories can see expenses. Nice, imperial teams wo' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Social, simple se' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Sure available terms know just nice, human officials. Problems used to receive. United, cheap changes get better british houses. Full bars shift often important readers; inc' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Systems loosen special, easy partners. Prime, noble windows condemn effective, nation' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Thus present women should hear for a shares; leaders must come early; immediate men will want exactly young groups. Insects may ask narrow variations. New leaders should deal' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'True potatoes sound equal heads' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Twin, particular aspects will accept only on' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Video-taped, ch' THEN ''
            WHEN "ITEM_DESCRIPTION" = 'Wide clear weeks join surely medical others; again dull effects stretch. Only, great needs may brin' THEN ''
            ELSE "ITEM_DESCRIPTION"
        END AS "ITEM_DESCRIPTION"
    FROM "item_renamed_trimmed"
),

"item_renamed_trimmed_cleaned_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- MANUFACTURER: ['']
    -- UNIT_OF_MEASURE: ['']
    -- ITEM_DESCRIPTION: ['']
    SELECT 
        CASE
            WHEN "MANUFACTURER" = '' THEN NULL
            ELSE "MANUFACTURER"
        END AS "MANUFACTURER",
        CASE
            WHEN "UNIT_OF_MEASURE" = '' THEN NULL
            ELSE "UNIT_OF_MEASURE"
        END AS "UNIT_OF_MEASURE",
        CASE
            WHEN "ITEM_DESCRIPTION" = '' THEN NULL
            ELSE "ITEM_DESCRIPTION"
        END AS "ITEM_DESCRIPTION",
        "MANUFACTURER_ID",
        "CONTAINER_TYPE",
        "SUBCATEGORY",
        "CATEGORY_NAME",
        "CATEGORY_ID",
        "RECORD_END_DATE",
        "MANAGER_ID",
        "SIZE_",
        "ITEM_SURROGATE_KEY",
        "CURRENT_PRICE",
        "RECORD_START_DATE",
        "FORMULATION_CODE",
        "COLOR",
        "ITEM_ID",
        "BRAND_ID",
        "WHOLESALE_COST",
        "SUBCATEGORY_ID",
        "BRAND_NAME",
        "PRODUCT_NAME"
    FROM "item_renamed_trimmed_cleaned"
),

"item_renamed_trimmed_cleaned_null_casted" AS (
    -- Column Type Casting: 
    -- BRAND_ID: from INT to VARCHAR
    -- RECORD_END_DATE: from VARCHAR to DATE
    -- RECORD_START_DATE: from VARCHAR to DATE
    SELECT
        "MANUFACTURER",
        "UNIT_OF_MEASURE",
        "ITEM_DESCRIPTION",
        "MANUFACTURER_ID",
        "CONTAINER_TYPE",
        "SUBCATEGORY",
        "CATEGORY_NAME",
        "CATEGORY_ID",
        "MANAGER_ID",
        "SIZE_",
        "ITEM_SURROGATE_KEY",
        "CURRENT_PRICE",
        "FORMULATION_CODE",
        "COLOR",
        "ITEM_ID",
        "WHOLESALE_COST",
        "SUBCATEGORY_ID",
        "BRAND_NAME",
        "PRODUCT_NAME",
        CAST("BRAND_ID" AS VARCHAR) AS "BRAND_ID",
        CAST("RECORD_END_DATE" AS DATE) AS "RECORD_END_DATE",
        CAST("RECORD_START_DATE" AS DATE) AS "RECORD_START_DATE"
    FROM "item_renamed_trimmed_cleaned_null"
),

"item_renamed_trimmed_cleaned_null_casted_missing_handled" AS (
    -- Handling missing values: There are 4 columns with unacceptable missing values
    -- ITEM_DESCRIPTION has 23.23 percent missing. Strategy: 🔄 Unchanged
    -- MANUFACTURER has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- SIZE_ has 52.53 percent missing. Strategy: 🔄 Unchanged
    -- UNIT_OF_MEASURE has 5.05 percent missing. Strategy: 🔄 Unchanged
    SELECT
        "UNIT_OF_MEASURE",
        "ITEM_DESCRIPTION",
        "MANUFACTURER_ID",
        "CONTAINER_TYPE",
        "SUBCATEGORY",
        "CATEGORY_NAME",
        "CATEGORY_ID",
        "MANAGER_ID",
        "SIZE_",
        "ITEM_SURROGATE_KEY",
        "CURRENT_PRICE",
        "FORMULATION_CODE",
        "COLOR",
        "ITEM_ID",
        "WHOLESALE_COST",
        "SUBCATEGORY_ID",
        "BRAND_NAME",
        "PRODUCT_NAME",
        "BRAND_ID",
        "RECORD_END_DATE",
        "RECORD_START_DATE"
    FROM "item_renamed_trimmed_cleaned_null_casted"
)

-- COCOON BLOCK END
SELECT * FROM "item_renamed_trimmed_cleaned_null_casted_missing_handled"

stg_item.yml (Document the table)

version: 2
models:
- name: stg_item
  description: The table is about items for sale. It includes details such as item
    ID, price, cost, brand, category, size, color, and product name. Each row represents
    a unique item with its characteristics. The table tracks item information over
    time with start and end dates. It likely serves as a product database for a retail
    or e-commerce system.
  columns:
  - name: UNIT_OF_MEASURE
    description: Unit of measurement for the item
    tests:
    - not_null
  - name: ITEM_DESCRIPTION
    description: Detailed description of the item
    tests:
    - not_null
  - name: MANUFACTURER_ID
    description: Unique identifier for the manufacturer
    tests:
    - not_null
  - name: CONTAINER_TYPE
    description: Container type for the item
    tests:
    - not_null
    - accepted_values:
        values:
        - Unknown
        - Box
        - Bag
        - Bottle
        - Can
        - Jar
        - Tube
        - Pouch
        - Carton
        - Crate
        - Barrel
        - Drum
        - Sack
        - Tub
        - Tank
        - Pallet
        - Tray
        - Envelope
        - Bin
        - Basket
        - Container (generic)
  - name: SUBCATEGORY
    description: Subcategory or class of the item
    tests:
    - not_null
  - name: CATEGORY_NAME
    description: Main category of the item
    tests:
    - not_null
    - accepted_values:
        values:
        - Children
        - Men
        - Women
        - Jewelry
        - Electronics
        - Books
        - Music
        - Shoes
        - Sports
        - Home
        - Beauty
        - Toys
        - Automotive
        - Garden
        - Pet Supplies
        - Food & Grocery
        - Health
  - name: CATEGORY_ID
    description: Unique identifier for the category
    tests:
    - not_null
  - name: MANAGER_ID
    description: Identifier for the item manager
    tests:
    - not_null
  - name: SIZE_
    description: Size of the item
    tests:
    - not_null
    - accepted_values:
        values:
        - tiny
        - small
        - medium
        - large
        - extralarge
        - huge
        - gigantic
  - name: ITEM_SURROGATE_KEY
    description: Surrogate key for the item
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column appears to be a unique identifier for each item. For
        this table, each row represents a unique item or a version of an item over
        time. ITEM_SURROGATE_KEY is unique across rows in the given sample, and its
        name suggests it's designed to be a unique identifier.
  - name: CURRENT_PRICE
    description: Current selling price of the item
    tests:
    - not_null
  - name: FORMULATION_CODE
    description: Unique product formulation code
    tests:
    - not_null
  - name: COLOR
    description: Color of the item
    tests:
    - not_null
  - name: ITEM_ID
    description: Unique alphanumeric identifier for the item
    tests:
    - not_null
  - name: WHOLESALE_COST
    description: Wholesale cost of the item
    tests:
    - not_null
  - name: SUBCATEGORY_ID
    description: Unique identifier for the subcategory
    tests:
    - not_null
  - name: BRAND_NAME
    description: Brand name of the item
    tests:
    - not_null
  - name: PRODUCT_NAME
    description: Name of the product
    tests:
    - not_null
  - name: BRAND_ID
    description: Unique identifier for the brand
    tests:
    - not_null
  - name: RECORD_END_DATE
    description: End date of the item record
    cocoon_meta:
      missing_acceptable: Still active records don't have an end date.
  - name: RECORD_START_DATE
    description: Start date of the item record
    tests:
    - not_null

stg_inventory (first 100 rows)

item_id warehouse_id quantity_on_hand inventory_date
0 1 1 211.0 4850816.0
1 2 1 235.0 4850816.0
2 4 1 859.0 4850816.0
3 7 1 704.0 4850816.0
4 8 1 891.0 4850816.0
5 10 1 834.0 4850816.0
6 13 1 591.0 4850816.0
7 14 1 579.0 4850816.0
8 16 1 622.0 4850816.0
9 19 1 745.0 4850816.0
10 20 1 405.0 4850816.0
11 22 1 NaN 4850816.0
12 25 1 676.0 4850816.0
13 26 1 865.0 4850816.0
14 28 1 24.0 4850816.0
15 31 1 170.0 4850816.0
16 32 1 797.0 4850816.0
17 34 1 332.0 4850816.0
18 37 1 618.0 4850816.0
19 38 1 909.0 4850816.0
20 40 1 738.0 4850816.0
21 43 1 699.0 4850816.0
22 44 1 975.0 4850816.0
23 46 1 551.0 4850816.0
24 49 1 857.0 4850816.0
25 50 1 894.0 4850816.0
26 52 1 279.0 4850816.0
27 55 1 206.0 4850816.0
28 56 1 746.0 4850816.0
29 58 1 NaN 4850816.0
30 61 1 154.0 4850816.0
31 62 1 888.0 4850816.0
32 64 1 773.0 4850816.0
33 67 1 107.0 4850816.0
34 68 1 801.0 4850816.0
35 70 1 749.0 4850816.0
36 73 1 419.0 4850816.0
37 74 1 541.0 4850816.0
38 76 1 359.0 4850816.0
39 79 1 578.0 4850816.0
40 80 1 42.0 4850816.0
41 82 1 83.0 4850816.0
42 85 1 192.0 4850816.0
43 86 1 567.0 4850816.0
44 88 1 710.0 4850816.0
45 91 1 282.0 4850816.0
46 92 1 631.0 4850816.0
47 94 1 587.0 4850816.0
48 97 1 645.0 4850816.0
49 98 1 667.0 4850816.0
50 100 1 26.0 4850816.0
51 103 1 224.0 4850816.0
52 104 1 901.0 4850816.0
53 106 1 887.0 4850816.0
54 109 1 455.0 4850816.0
55 110 1 784.0 4850816.0
56 112 1 742.0 4850816.0
57 115 1 978.0 4850816.0
58 116 1 207.0 4850816.0
59 118 1 462.0 4850816.0
60 121 1 406.0 4850816.0
61 122 1 559.0 4850816.0
62 124 1 999.0 4850816.0
63 127 1 870.0 4850816.0
64 128 1 982.0 4850816.0
65 130 1 700.0 4850816.0
66 133 1 26.0 4850816.0
67 134 1 356.0 4850816.0
68 136 1 143.0 4850816.0
69 139 1 838.0 4850816.0
70 140 1 846.0 4850816.0
71 142 1 657.0 4850816.0
72 145 1 181.0 4850816.0
73 146 1 730.0 4850816.0
74 148 1 49.0 4850816.0
75 151 1 652.0 4850816.0
76 152 1 861.0 4850816.0
77 154 1 329.0 4850816.0
78 157 1 286.0 4850816.0
79 158 1 NaN 4850816.0
80 160 1 62.0 4850816.0
81 163 1 894.0 4850816.0
82 164 1 463.0 4850816.0
83 166 1 458.0 4850816.0
84 169 1 696.0 4850816.0
85 170 1 450.0 4850816.0
86 172 1 842.0 4850816.0
87 175 1 79.0 4850816.0
88 176 1 260.0 4850816.0
89 178 1 894.0 4850816.0
90 181 1 4.0 4850816.0
91 182 1 281.0 4850816.0
92 184 1 797.0 4850816.0
93 187 1 981.0 4850816.0
94 188 1 58.0 4850816.0
95 190 1 834.0 4850816.0
96 193 1 54.0 4850816.0
97 194 1 856.0 4850816.0
98 196 1 803.0 4850816.0

stg_inventory.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"inventory_renamed" AS (
    -- Rename: Renaming columns
    -- INV_DATE_SK -> inventory_date
    -- INV_ITEM_SK -> item_id
    -- INV_WAREHOUSE_SK -> warehouse_id
    -- INV_QUANTITY_ON_HAND -> quantity_on_hand
    SELECT 
        "INV_DATE_SK" AS "inventory_date",
        "INV_ITEM_SK" AS "item_id",
        "INV_WAREHOUSE_SK" AS "warehouse_id",
        "INV_QUANTITY_ON_HAND" AS "quantity_on_hand"
    FROM "inventory"
),

"inventory_renamed_casted" AS (
    -- Column Type Casting: 
    -- inventory_date: from INT to DATE
    SELECT
        "item_id",
        "warehouse_id",
        "quantity_on_hand",
        julian(DATE '1858-11-17' + CAST("inventory_date" AS INTEGER)) AS "inventory_date"
    FROM "inventory_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "inventory_renamed_casted"

stg_inventory.yml (Document the table)

version: 2
models:
- name: stg_inventory
  description: The table is about inventory. It contains details of inventory items
    in warehouses. Each record represents an item's quantity on hand at a specific
    warehouse on a particular date. The table includes date, item, warehouse, and
    quantity information. This allows tracking of inventory levels across different
    locations and times.
  columns:
  - name: item_id
    description: Unique identifier for inventory item
    tests:
    - not_null
  - name: warehouse_id
    description: Unique identifier for warehouse location
    tests:
    - not_null
  - name: quantity_on_hand
    description: Current quantity of item in stock
    tests:
    - not_null
  - name: inventory_date
    description: Date of inventory record
    tests:
    - not_null

stg_time_dim (first 100 rows)

time_surrogate_key time_id seconds_since_midnight hour_ minute_ second_ time_period shift sub_shift meal_time
0 0 AAAAAAAABAAAAAAA 0 0 0 0 AM third night None
1 1 AAAAAAAACAAAAAAA 1 0 0 1 AM third night None
2 2 AAAAAAAADAAAAAAA 2 0 0 2 AM third night None
3 3 AAAAAAAAEAAAAAAA 3 0 0 3 AM third night None
4 4 AAAAAAAAFAAAAAAA 4 0 0 4 AM third night None
5 5 AAAAAAAAGAAAAAAA 5 0 0 5 AM third night None
6 6 AAAAAAAAHAAAAAAA 6 0 0 6 AM third night None
7 7 AAAAAAAAIAAAAAAA 7 0 0 7 AM third night None
8 8 AAAAAAAAJAAAAAAA 8 0 0 8 AM third night None
9 9 AAAAAAAAKAAAAAAA 9 0 0 9 AM third night None
10 10 AAAAAAAALAAAAAAA 10 0 0 10 AM third night None
11 11 AAAAAAAAMAAAAAAA 11 0 0 11 AM third night None
12 12 AAAAAAAANAAAAAAA 12 0 0 12 AM third night None
13 13 AAAAAAAAOAAAAAAA 13 0 0 13 AM third night None
14 14 AAAAAAAAPAAAAAAA 14 0 0 14 AM third night None
15 15 AAAAAAAAABAAAAAA 15 0 0 15 AM third night None
16 16 AAAAAAAABBAAAAAA 16 0 0 16 AM third night None
17 17 AAAAAAAACBAAAAAA 17 0 0 17 AM third night None
18 18 AAAAAAAADBAAAAAA 18 0 0 18 AM third night None
19 19 AAAAAAAAEBAAAAAA 19 0 0 19 AM third night None
20 20 AAAAAAAAFBAAAAAA 20 0 0 20 AM third night None
21 21 AAAAAAAAGBAAAAAA 21 0 0 21 AM third night None
22 22 AAAAAAAAHBAAAAAA 22 0 0 22 AM third night None
23 23 AAAAAAAAIBAAAAAA 23 0 0 23 AM third night None
24 24 AAAAAAAAJBAAAAAA 24 0 0 24 AM third night None
25 25 AAAAAAAAKBAAAAAA 25 0 0 25 AM third night None
26 26 AAAAAAAALBAAAAAA 26 0 0 26 AM third night None
27 27 AAAAAAAAMBAAAAAA 27 0 0 27 AM third night None
28 28 AAAAAAAANBAAAAAA 28 0 0 28 AM third night None
29 29 AAAAAAAAOBAAAAAA 29 0 0 29 AM third night None
30 30 AAAAAAAAPBAAAAAA 30 0 0 30 AM third night None
31 31 AAAAAAAAACAAAAAA 31 0 0 31 AM third night None
32 32 AAAAAAAABCAAAAAA 32 0 0 32 AM third night None
33 33 AAAAAAAACCAAAAAA 33 0 0 33 AM third night None
34 34 AAAAAAAADCAAAAAA 34 0 0 34 AM third night None
35 35 AAAAAAAAECAAAAAA 35 0 0 35 AM third night None
36 36 AAAAAAAAFCAAAAAA 36 0 0 36 AM third night None
37 37 AAAAAAAAGCAAAAAA 37 0 0 37 AM third night None
38 38 AAAAAAAAHCAAAAAA 38 0 0 38 AM third night None
39 39 AAAAAAAAICAAAAAA 39 0 0 39 AM third night None
40 40 AAAAAAAAJCAAAAAA 40 0 0 40 AM third night None
41 41 AAAAAAAAKCAAAAAA 41 0 0 41 AM third night None
42 42 AAAAAAAALCAAAAAA 42 0 0 42 AM third night None
43 43 AAAAAAAAMCAAAAAA 43 0 0 43 AM third night None
44 44 AAAAAAAANCAAAAAA 44 0 0 44 AM third night None
45 45 AAAAAAAAOCAAAAAA 45 0 0 45 AM third night None
46 46 AAAAAAAAPCAAAAAA 46 0 0 46 AM third night None
47 47 AAAAAAAAADAAAAAA 47 0 0 47 AM third night None
48 48 AAAAAAAABDAAAAAA 48 0 0 48 AM third night None
49 49 AAAAAAAACDAAAAAA 49 0 0 49 AM third night None
50 50 AAAAAAAADDAAAAAA 50 0 0 50 AM third night None
51 51 AAAAAAAAEDAAAAAA 51 0 0 51 AM third night None
52 52 AAAAAAAAFDAAAAAA 52 0 0 52 AM third night None
53 53 AAAAAAAAGDAAAAAA 53 0 0 53 AM third night None
54 54 AAAAAAAAHDAAAAAA 54 0 0 54 AM third night None
55 55 AAAAAAAAIDAAAAAA 55 0 0 55 AM third night None
56 56 AAAAAAAAJDAAAAAA 56 0 0 56 AM third night None
57 57 AAAAAAAAKDAAAAAA 57 0 0 57 AM third night None
58 58 AAAAAAAALDAAAAAA 58 0 0 58 AM third night None
59 59 AAAAAAAAMDAAAAAA 59 0 0 59 AM third night None
60 60 AAAAAAAANDAAAAAA 60 0 1 0 AM third night None
61 61 AAAAAAAAODAAAAAA 61 0 1 1 AM third night None
62 62 AAAAAAAAPDAAAAAA 62 0 1 2 AM third night None
63 63 AAAAAAAAAEAAAAAA 63 0 1 3 AM third night None
64 64 AAAAAAAABEAAAAAA 64 0 1 4 AM third night None
65 65 AAAAAAAACEAAAAAA 65 0 1 5 AM third night None
66 66 AAAAAAAADEAAAAAA 66 0 1 6 AM third night None
67 67 AAAAAAAAEEAAAAAA 67 0 1 7 AM third night None
68 68 AAAAAAAAFEAAAAAA 68 0 1 8 AM third night None
69 69 AAAAAAAAGEAAAAAA 69 0 1 9 AM third night None
70 70 AAAAAAAAHEAAAAAA 70 0 1 10 AM third night None
71 71 AAAAAAAAIEAAAAAA 71 0 1 11 AM third night None
72 72 AAAAAAAAJEAAAAAA 72 0 1 12 AM third night None
73 73 AAAAAAAAKEAAAAAA 73 0 1 13 AM third night None
74 74 AAAAAAAALEAAAAAA 74 0 1 14 AM third night None
75 75 AAAAAAAAMEAAAAAA 75 0 1 15 AM third night None
76 76 AAAAAAAANEAAAAAA 76 0 1 16 AM third night None
77 77 AAAAAAAAOEAAAAAA 77 0 1 17 AM third night None
78 78 AAAAAAAAPEAAAAAA 78 0 1 18 AM third night None
79 79 AAAAAAAAAFAAAAAA 79 0 1 19 AM third night None
80 80 AAAAAAAABFAAAAAA 80 0 1 20 AM third night None
81 81 AAAAAAAACFAAAAAA 81 0 1 21 AM third night None
82 82 AAAAAAAADFAAAAAA 82 0 1 22 AM third night None
83 83 AAAAAAAAEFAAAAAA 83 0 1 23 AM third night None
84 84 AAAAAAAAFFAAAAAA 84 0 1 24 AM third night None
85 85 AAAAAAAAGFAAAAAA 85 0 1 25 AM third night None
86 86 AAAAAAAAHFAAAAAA 86 0 1 26 AM third night None
87 87 AAAAAAAAIFAAAAAA 87 0 1 27 AM third night None
88 88 AAAAAAAAJFAAAAAA 88 0 1 28 AM third night None
89 89 AAAAAAAAKFAAAAAA 89 0 1 29 AM third night None
90 90 AAAAAAAALFAAAAAA 90 0 1 30 AM third night None
91 91 AAAAAAAAMFAAAAAA 91 0 1 31 AM third night None
92 92 AAAAAAAANFAAAAAA 92 0 1 32 AM third night None
93 93 AAAAAAAAOFAAAAAA 93 0 1 33 AM third night None
94 94 AAAAAAAAPFAAAAAA 94 0 1 34 AM third night None
95 95 AAAAAAAAAGAAAAAA 95 0 1 35 AM third night None
96 96 AAAAAAAABGAAAAAA 96 0 1 36 AM third night None
97 97 AAAAAAAACGAAAAAA 97 0 1 37 AM third night None
98 98 AAAAAAAADGAAAAAA 98 0 1 38 AM third night None

stg_time_dim.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"time_dim_renamed" AS (
    -- Rename: Renaming columns
    -- T_TIME_SK -> time_surrogate_key
    -- T_TIME_ID -> time_id
    -- T_TIME -> seconds_since_midnight
    -- T_HOUR -> hour_
    -- T_MINUTE -> minute_
    -- T_SECOND -> second_
    -- T_AM_PM -> time_period
    -- T_SHIFT -> shift
    -- T_SUB_SHIFT -> sub_shift
    -- T_MEAL_TIME -> meal_time
    SELECT 
        "T_TIME_SK" AS "time_surrogate_key",
        "T_TIME_ID" AS "time_id",
        "T_TIME" AS "seconds_since_midnight",
        "T_HOUR" AS "hour_",
        "T_MINUTE" AS "minute_",
        "T_SECOND" AS "second_",
        "T_AM_PM" AS "time_period",
        "T_SHIFT" AS "shift",
        "T_SUB_SHIFT" AS "sub_shift",
        "T_MEAL_TIME" AS "meal_time"
    FROM "time_dim"
),

"time_dim_renamed_casted" AS (
    -- Column Type Casting: 
    -- meal_time: from DECIMAL to VARCHAR
    SELECT
        "time_surrogate_key",
        "time_id",
        "seconds_since_midnight",
        "hour_",
        "minute_",
        "second_",
        "time_period",
        "shift",
        "sub_shift",
        CAST("meal_time" AS VARCHAR) AS "meal_time"
    FROM "time_dim_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "time_dim_renamed_casted"

stg_time_dim.yml (Document the table)

version: 2
models:
- name: stg_time_dim
  description: The table is about time details. It includes a time ID, hour, minute,
    second, and AM/PM indicator. It also categorizes time into shifts, sub-shifts,
    and meal times. The table appears to break down each moment of the day into various
    time-related attributes for analysis purposes.
  columns:
  - name: time_surrogate_key
    description: Surrogate key for time dimension
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key for the time dimension. For this
        table, each row represents a unique second of the day. A surrogate key is
        designed to be a unique identifier for each row in a dimension table, so it
        should be unique across rows.
  - name: time_id
    description: Unique identifier for each time entry
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for each time entry.
        For this table, each row represents a unique second of the day. Based on the
        samples, it appears to be a unique alphanumeric code for each second. It should
        be unique across rows.
  - name: seconds_since_midnight
    description: Time in seconds since midnight
    tests:
    - not_null
  - name: hour_
    description: Hour of the day in 24-hour format
    tests:
    - not_null
  - name: minute_
    description: Minute of the hour
    tests:
    - not_null
  - name: second_
    description: Second of the minute
    tests:
    - not_null
  - name: time_period
    description: Indicates whether time is AM or PM
    tests:
    - not_null
    - accepted_values:
        values:
        - AM
        - PM
  - name: shift
    description: Work shift category (e.g., first, second, third)
    tests:
    - not_null
    - accepted_values:
        values:
        - first
        - second
        - third
  - name: sub_shift
    description: Sub-category of work shift (e.g., day, night)
    tests:
    - not_null
    - accepted_values:
        values:
        - day
        - night
        - evening
        - swing
  - name: meal_time
    description: Indicates meal time (breakfast, lunch, dinner)
    cocoon_meta:
      missing_acceptable: Not every time of day is associated with a meal.

stg_catalog_sales (first 100 rows)

sale_date_key sale_time_key shipping_date_id billing_customer_id billing_customer_demographics_id billing_household_demographics_id billing_address_id shipping_customer_id shipping_customer_demographics_id shipping_household_demographics_id shipping_address_id call_center_id catalog_page_id shipping_mode_id warehouse_key item_id promotion_id order_number quantity CS_WHOLESALE_COST unit_list_price unit_sales_price total_discount_amount total_sales_price total_wholesale_cost total_list_price total_tax_amount coupon_amount total_shipping_cost net_paid net_paid_with_tax net_paid_with_shipping net_paid_with_shipping_and_tax net_profit
0 2450815.0 38212.0 2450886 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 62.0 3.0 1.0 1286 1 1 47 27.70 44.32 42.99 62.51 2020.53 1301.90 2083.04 101.02 0.00 1041.52 2020.53 2121.55 3062.05 3163.07 718.63
1 2450815.0 38212.0 2450846 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 31.0 8.0 1.0 476 3 1 20 87.55 260.89 153.92 2139.40 3078.40 1751.00 5217.80 71.41 1292.92 1356.60 1785.48 1856.89 3142.08 3213.49 34.48
2 2450815.0 38212.0 2450868 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 76.0 2.0 1.0 1558 1 1 19 69.86 88.72 29.27 1129.55 556.13 1327.34 1685.68 33.36 0.00 168.53 556.13 589.49 724.66 758.02 -771.21
3 2450815.0 38212.0 2450851 153.0 1822764 5775.0 986 153.0 1822764 5775 986 1 89.0 15.0 1.0 961 2 1 50 70.00 205.10 188.69 820.50 9434.50 3500.00 10255.00 377.38 0.00 4307.00 9434.50 9811.88 13741.50 14118.88 5934.50
4 2450815.0 29485.0 2450904 601.0 797995 6189.0 583 601.0 797995 6189 583 2 64.0 18.0 1.0 115 2 2 56 67.54 166.82 18.35 8314.32 1027.60 3782.24 9341.92 0.00 0.00 3736.32 1027.60 1027.60 4763.92 4763.92 -2754.64
5 2450815.0 29485.0 2450890 601.0 797995 6189.0 583 601.0 797995 6189 583 2 75.0 8.0 1.0 110 2 2 88 20.08 60.03 20.41 3486.56 1796.08 1767.04 5282.64 13.82 1598.51 1056.00 197.57 211.39 1253.57 1267.39 -1569.47
6 2450815.0 29485.0 2450849 601.0 797995 6189.0 583 601.0 797995 6189 583 2 39.0 4.0 1.0 146 3 2 31 40.88 51.91 6.22 1416.39 192.82 1267.28 1609.21 11.56 0.00 321.78 192.82 204.38 514.60 526.16 -1074.46
7 2450815.0 29485.0 2450889 601.0 797995 6189.0 583 601.0 797995 6189 583 2 49.0 8.0 1.0 1744 3 2 100 49.56 137.77 5.51 13226.00 551.00 4956.00 13777.00 0.00 0.00 3306.00 551.00 551.00 3857.00 3857.00 -4405.00
8 2450815.0 29485.0 2450868 601.0 797995 6189.0 583 601.0 797995 6189 583 2 69.0 17.0 1.0 236 3 2 30 72.82 88.84 71.07 533.10 2132.10 2184.60 2665.20 21.32 0.00 133.20 2132.10 2153.42 2265.30 2286.62 -52.50
9 2450815.0 29485.0 2450831 601.0 797995 6189.0 583 601.0 797995 6189 583 2 64.0 1.0 1.0 482 1 2 40 94.56 277.06 2.77 10971.60 110.80 3782.40 11082.40 2.21 0.00 664.80 110.80 113.01 775.60 777.81 -3671.60
10 2450815.0 29485.0 2450839 601.0 797995 6189.0 583 601.0 797995 6189 583 2 108.0 8.0 1.0 646 2 2 40 25.96 54.51 15.80 1548.40 632.00 1038.40 2180.40 22.75 176.96 1090.00 455.04 477.79 1545.04 1567.79 -583.36
11 2450815.0 29485.0 2450825 601.0 797995 6189.0 583 601.0 797995 6189 583 2 14.0 20.0 1.0 1762 2 2 45 5.95 12.97 8.81 187.20 396.45 267.75 583.65 3.96 0.00 17.10 396.45 400.41 413.55 417.51 128.70
12 2450815.0 29485.0 2450837 601.0 797995 6189.0 583 601.0 797995 6189 583 2 13.0 7.0 1.0 400 1 2 34 43.69 105.29 82.12 787.78 2792.08 1485.46 3579.86 55.84 0.00 930.58 2792.08 2847.92 3722.66 3778.50 1306.62
13 2450815.0 29485.0 2450822 601.0 797995 6189.0 583 601.0 797995 6189 583 2 106.0 16.0 1.0 952 3 2 59 78.90 84.42 82.73 99.71 4881.07 4655.10 4980.78 292.86 0.00 1444.32 4881.07 5173.93 6325.39 6618.25 225.97
14 2450815.0 29485.0 2450895 601.0 797995 6189.0 583 601.0 797995 6189 583 2 17.0 19.0 1.0 404 2 2 94 41.36 105.88 50.82 5175.64 4777.08 3887.84 9952.72 191.08 0.00 497.26 4777.08 4968.16 5274.34 5465.42 889.24
15 2450815.0 29485.0 2450892 601.0 797995 6189.0 583 601.0 797995 6189 583 2 74.0 18.0 1.0 781 2 2 38 26.96 51.22 35.85 584.06 1362.30 1024.48 1946.36 108.98 0.00 642.20 1362.30 1471.28 2004.50 2113.48 337.82
16 2450815.0 29485.0 2450862 601.0 797995 6189.0 583 601.0 797995 6189 583 2 23.0 16.0 1.0 727 2 2 45 9.54 23.37 21.50 84.15 967.50 429.30 1051.65 21.76 725.62 294.30 241.88 263.64 536.18 557.94 -187.42
17 2450815.0 29485.0 2450834 601.0 797995 6189.0 583 601.0 797995 6189 583 2 63.0 5.0 1.0 596 1 2 41 39.04 108.92 75.15 1384.57 3081.15 1600.64 4465.72 215.68 0.00 1964.72 3081.15 3296.83 5045.87 5261.55 1480.51
18 2450815.0 10687.0 2450864 572.0 437897 6622.0 147 572.0 437897 6622 147 2 28.0 5.0 1.0 1198 2 3 99 75.88 178.31 156.91 2118.60 15534.09 7512.12 17652.69 1398.06 0.00 6884.46 15534.09 16932.15 22418.55 23816.61 8021.97
19 2450815.0 10687.0 2450905 572.0 437897 6622.0 147 572.0 437897 6622 147 2 47.0 10.0 1.0 1435 3 3 90 34.57 89.53 68.04 1934.10 6123.60 3111.30 8057.70 428.65 0.00 1449.90 6123.60 6552.25 7573.50 8002.15 3012.30
20 2450815.0 10687.0 2450846 572.0 437897 6622.0 147 572.0 437897 6622 147 2 7.0 2.0 1.0 886 2 3 75 8.44 14.43 6.34 606.75 475.50 633.00 1082.25 33.28 0.00 10.50 475.50 508.78 486.00 519.28 -157.50
21 2450815.0 10687.0 2450900 572.0 437897 6622.0 147 572.0 437897 6622 147 2 67.0 7.0 1.0 1537 3 3 45 45.24 59.26 53.33 266.85 2399.85 2035.80 2666.70 191.98 0.00 479.70 2399.85 2591.83 2879.55 3071.53 364.05
22 2450815.0 10687.0 2450893 572.0 437897 6622.0 147 572.0 437897 6622 147 2 31.0 4.0 1.0 1826 2 3 33 89.04 217.25 52.14 5448.63 1720.62 2938.32 7169.25 68.82 0.00 3584.46 1720.62 1789.44 5305.08 5373.90 -1217.70
23 2450815.0 10687.0 2450904 572.0 437897 6622.0 147 572.0 437897 6622 147 2 52.0 18.0 1.0 1238 1 3 25 72.16 98.13 29.43 1717.50 735.75 1804.00 2453.25 29.43 0.00 834.00 735.75 765.18 1569.75 1599.18 -1068.25
24 2450815.0 10687.0 2450820 572.0 437897 6622.0 147 572.0 437897 6622 147 2 77.0 7.0 1.0 247 3 3 56 12.62 28.39 20.72 429.52 1160.32 706.72 1589.84 4.87 1079.09 0.00 81.23 86.10 81.23 86.10 -625.49
25 NaN NaN 2450835 NaN 3755 NaN 652 NaN 3755 2480 652 2 NaN NaN NaN 922 1 4 33 8.80 23.49 NaN 77.55 NaN NaN 775.17 34.88 0.00 NaN NaN NaN 976.47 1011.35 407.22
26 2450815.0 74512.0 2450888 383.0 3755 2480.0 652 383.0 3755 2480 652 2 107.0 13.0 1.0 610 1 4 63 65.85 181.74 23.62 9961.56 1488.06 4148.55 11449.62 29.76 0.00 3663.45 1488.06 1517.82 5151.51 5181.27 -2660.49
27 2450815.0 74512.0 2450825 383.0 3755 2480.0 652 383.0 3755 2480 652 2 88.0 13.0 1.0 1171 2 4 90 47.29 55.32 7.19 4331.70 647.10 4256.10 4978.80 38.82 0.00 1542.60 647.10 685.92 2189.70 2228.52 -3609.00
28 2450815.0 74512.0 2450870 383.0 3755 2480.0 652 383.0 3755 2480 652 2 53.0 8.0 1.0 1106 3 4 68 51.19 135.65 82.74 3597.88 5626.32 3480.92 9224.20 337.57 0.00 922.08 5626.32 5963.89 6548.40 6885.97 2145.40
29 2450815.0 74512.0 2450891 383.0 3755 2480.0 652 383.0 3755 2480 652 2 7.0 17.0 1.0 1820 2 4 12 35.46 59.57 5.36 650.52 64.32 425.52 714.84 4.50 0.00 250.08 64.32 68.82 314.40 318.90 -361.20
30 2450815.0 74512.0 2450897 383.0 3755 2480.0 652 383.0 3755 2480 652 2 23.0 16.0 1.0 880 2 4 79 49.20 118.57 92.48 2061.11 7305.92 3886.80 9367.03 219.17 0.00 3371.72 7305.92 7525.09 10677.64 10896.81 3419.12
31 2450816.0 53201.0 2450857 801.0 90299 3797.0 495 801.0 90299 3797 495 1 29.0 20.0 1.0 1495 2 5 24 33.13 86.13 18.94 1612.56 454.56 795.12 2067.12 9.09 0.00 330.72 454.56 463.65 785.28 794.37 -340.56
32 2450816.0 53201.0 2450887 801.0 90299 3797.0 495 801.0 90299 3797 495 1 90.0 2.0 1.0 1735 3 5 88 61.57 91.12 87.47 321.20 7697.36 5418.16 8018.56 307.89 0.00 3046.56 7697.36 8005.25 10743.92 11051.81 2279.20
33 2450816.0 53201.0 2450831 801.0 90299 3797.0 495 801.0 90299 3797 495 1 105.0 3.0 1.0 730 2 5 33 79.68 165.73 97.78 2242.35 3226.74 2629.44 5469.09 64.53 0.00 273.24 3226.74 3291.27 3499.98 3564.51 597.30
34 2450816.0 53201.0 2450896 801.0 90299 3797.0 495 801.0 90299 3797 495 1 40.0 18.0 1.0 602 2 5 7 30.89 78.46 15.69 439.39 109.83 216.23 549.22 5.49 0.00 241.64 109.83 115.32 351.47 356.96 -106.40
35 2450816.0 53201.0 2450818 801.0 90299 3797.0 495 801.0 90299 3797 495 1 78.0 16.0 1.0 1766 1 5 50 22.47 28.53 24.53 200.00 1226.50 1123.50 1426.50 85.85 0.00 256.50 1226.50 1312.35 1483.00 1568.85 103.00
36 2450816.0 53201.0 2450821 801.0 90299 3797.0 495 801.0 90299 3797 495 1 44.0 12.0 1.0 1754 1 5 24 91.40 95.05 38.02 1368.72 912.48 2193.60 2281.20 54.74 0.00 638.64 912.48 967.22 1551.12 1605.86 -1281.12
37 2450816.0 53201.0 2450847 801.0 90299 3797.0 495 801.0 90299 3797 495 1 69.0 14.0 1.0 1928 3 5 84 24.03 29.79 17.57 1026.48 1475.88 2018.52 2502.36 10.92 383.72 650.16 1092.16 1103.08 1742.32 1753.24 -926.36
38 2450816.0 53201.0 2450834 801.0 90299 3797.0 495 801.0 90299 3797 495 1 16.0 10.0 1.0 199 2 5 2 51.27 111.76 103.93 15.66 207.86 102.54 223.52 0.00 0.00 93.86 207.86 207.86 301.72 301.72 105.32
39 2450816.0 53201.0 2450853 801.0 90299 3797.0 495 801.0 90299 3797 495 1 95.0 9.0 1.0 1387 3 5 17 38.62 106.59 68.21 652.46 1159.57 656.54 1812.03 33.04 57.97 199.24 1101.60 1134.64 1300.84 1333.88 445.06
40 2450816.0 53201.0 2450861 801.0 90299 3797.0 495 801.0 90299 3797 495 1 9.0 16.0 1.0 988 1 5 34 42.47 118.49 41.47 2618.68 1409.98 1443.98 4028.66 52.45 535.79 1571.14 874.19 926.64 2445.33 2497.78 -569.79
41 2450816.0 53201.0 2450881 801.0 90299 3797.0 495 801.0 90299 3797 495 1 98.0 13.0 1.0 190 3 5 7 67.40 138.17 56.64 570.71 396.48 471.80 967.19 23.78 0.00 483.56 396.48 420.26 880.04 903.82 -75.32
42 2450816.0 47169.0 2450856 351.0 528859 5567.0 122 351.0 528859 5567 122 1 47.0 18.0 1.0 82 1 6 21 41.74 85.14 6.81 1644.93 143.01 876.54 1787.94 7.15 0.00 697.20 143.01 150.16 840.21 847.36 -733.53
43 2450816.0 47169.0 2450842 351.0 528859 5567.0 122 351.0 528859 5567 122 1 6.0 19.0 1.0 910 1 6 43 79.58 210.09 44.11 7137.14 1896.73 3421.94 9033.87 4.55 1782.92 361.20 113.81 118.36 475.01 479.56 -3308.13
44 2450816.0 47169.0 2450873 351.0 528859 5567.0 122 351.0 528859 5567 122 1 56.0 2.0 1.0 502 1 6 57 21.60 26.35 24.24 120.27 1381.68 1231.20 1501.95 0.00 0.00 600.78 1381.68 1381.68 1982.46 1982.46 150.48
45 2450816.0 47169.0 2450829 351.0 528859 5567.0 122 351.0 528859 5567 122 1 34.0 15.0 1.0 1268 1 6 12 83.45 207.79 91.42 1396.44 1097.04 1001.40 2493.48 65.82 0.00 1072.08 1097.04 1162.86 2169.12 2234.94 95.64
46 2450816.0 47169.0 2450865 351.0 528859 5567.0 122 351.0 528859 5567 122 1 81.0 18.0 1.0 446 3 6 75 63.50 133.35 17.33 8701.50 1299.75 4762.50 10001.25 13.25 857.83 1399.50 441.92 455.17 1841.42 1854.67 -4320.58
47 2450816.0 47169.0 2450872 351.0 528859 5567.0 122 351.0 528859 5567 122 1 78.0 13.0 1.0 1783 3 6 32 33.46 69.26 67.18 66.56 2149.76 1070.72 2216.32 193.47 0.00 221.44 2149.76 2343.23 2371.20 2564.67 1079.04
48 2450816.0 47169.0 2450842 351.0 528859 5567.0 122 351.0 528859 5567 122 1 27.0 4.0 1.0 1252 1 6 30 38.50 57.75 25.41 970.20 762.30 1155.00 1732.50 38.11 0.00 796.80 762.30 800.41 1559.10 1597.21 -392.70
49 2450816.0 47169.0 2450850 351.0 528859 5567.0 122 351.0 528859 5567 122 1 62.0 18.0 1.0 1192 3 6 53 9.92 25.69 9.24 871.85 489.72 525.76 1361.57 15.08 112.63 122.43 377.09 392.17 499.52 514.60 -148.67
50 2450816.0 47169.0 2450874 351.0 528859 5567.0 122 351.0 528859 5567 122 1 54.0 11.0 1.0 374 1 6 56 1.84 5.35 3.31 114.24 185.36 103.04 299.60 14.82 0.00 104.72 185.36 200.18 290.08 304.90 82.32
51 2450816.0 64129.0 2450879 427.0 192069 5664.0 106 427.0 192069 5664 106 2 89.0 8.0 1.0 1339 2 7 48 18.55 52.49 49.34 151.20 2368.32 890.40 2519.52 88.10 165.78 604.32 2202.54 2290.64 2806.86 2894.96 1312.14
52 2450816.0 64129.0 2450856 427.0 192069 5664.0 106 427.0 192069 5664 106 2 27.0 2.0 1.0 1006 1 7 69 93.62 245.28 208.48 2539.20 14385.12 6459.78 16924.32 0.00 1006.95 7954.32 13378.17 13378.17 21332.49 21332.49 6918.39
53 2450816.0 64129.0 2450819 427.0 192069 5664.0 106 427.0 192069 5664 106 2 65.0 6.0 1.0 217 3 7 22 40.21 95.29 4.76 1991.66 104.72 884.62 2096.38 0.00 0.00 1027.18 104.72 104.72 1131.90 1131.90 -779.90
54 2450816.0 64129.0 2450829 427.0 192069 5664.0 106 427.0 192069 5664 106 2 103.0 7.0 1.0 1051 3 7 26 10.72 19.29 4.82 376.22 125.32 278.72 501.54 5.01 0.00 55.12 125.32 130.33 180.44 185.45 -153.40
55 2450817.0 34427.0 2450865 814.0 271788 6362.0 536 814.0 271788 6362 536 1 53.0 13.0 1.0 256 1 8 46 47.13 76.35 64.13 562.12 2949.98 2167.98 3512.10 146.90 501.49 350.98 2448.49 2595.39 2799.47 2946.37 280.51
56 2450817.0 34427.0 2450885 814.0 271788 6362.0 536 814.0 271788 6362 536 1 41.0 18.0 1.0 223 2 8 83 64.16 150.13 48.04 8473.47 3987.32 5325.28 12460.79 159.49 0.00 3862.82 3987.32 4146.81 7850.14 8009.63 -1337.96
57 2450817.0 34427.0 2450907 814.0 271788 6362.0 536 814.0 271788 6362 536 1 45.0 5.0 1.0 1567 1 8 15 72.17 199.18 161.33 567.75 2419.95 1082.55 2987.70 217.79 0.00 1045.65 2419.95 2637.74 3465.60 3683.39 1337.40
58 2450817.0 34427.0 2450886 814.0 271788 6362.0 536 814.0 271788 6362 536 1 3.0 3.0 1.0 14 2 8 27 90.20 183.10 3.66 4844.88 98.82 2435.40 4943.70 3.91 33.59 2273.94 65.23 69.14 2339.17 2343.08 -2370.17
59 2450817.0 34427.0 2450884 814.0 271788 6362.0 536 814.0 271788 6362 536 1 53.0 2.0 1.0 1066 2 8 1 66.72 166.80 106.75 60.05 106.75 66.72 166.80 0.00 0.00 0.00 106.75 106.75 106.75 106.75 40.03
60 2450817.0 34427.0 2450840 814.0 271788 6362.0 536 814.0 271788 6362 536 1 21.0 2.0 1.0 856 3 8 62 2.33 3.86 0.57 203.98 35.34 144.46 239.32 0.00 0.00 18.60 35.34 35.34 53.94 53.94 -109.12
61 2450817.0 34427.0 2450875 814.0 271788 6362.0 536 814.0 271788 6362 536 1 16.0 16.0 1.0 1796 2 8 49 51.74 83.81 4.19 3901.38 205.31 2535.26 4106.69 10.26 0.00 862.40 205.31 215.57 1067.71 1077.97 -2329.95
62 2450817.0 34427.0 2450886 814.0 271788 6362.0 536 814.0 271788 6362 536 1 71.0 19.0 1.0 1255 3 8 57 34.01 77.54 40.32 2121.54 2298.24 1938.57 4419.78 0.00 0.00 1104.66 2298.24 2298.24 3402.90 3402.90 359.67
63 2450817.0 34427.0 2450847 814.0 271788 6362.0 536 814.0 271788 6362 536 1 67.0 4.0 1.0 1657 2 8 29 6.77 12.45 3.61 256.36 104.69 196.33 361.05 1.04 0.00 53.94 104.69 105.73 158.63 159.67 -91.64
64 2450817.0 34427.0 2450905 814.0 271788 6362.0 536 814.0 271788 6362 536 1 6.0 20.0 1.0 1556 3 8 4 6.26 14.83 5.04 39.16 20.16 25.04 59.32 0.00 0.00 11.84 20.16 20.16 32.00 32.00 -4.88
65 2450817.0 45097.0 2450877 674.0 804458 4395.0 579 674.0 804458 4395 579 1 2.0 12.0 1.0 1844 3 9 6 48.56 143.73 137.98 34.50 827.88 291.36 862.38 0.00 0.00 155.22 827.88 827.88 983.10 983.10 536.52
66 2450817.0 45097.0 2450858 674.0 804458 4395.0 579 674.0 804458 4395 579 1 1.0 12.0 1.0 1579 1 9 38 62.96 64.84 42.14 862.60 1601.32 2392.48 2463.92 41.31 224.18 1059.44 1377.14 1418.45 2436.58 2477.89 -1015.34
67 2450817.0 45097.0 2450889 674.0 804458 4395.0 579 674.0 804458 4395 579 1 14.0 19.0 1.0 1243 2 9 23 57.35 108.39 80.20 648.37 1844.60 1319.05 2492.97 0.00 0.00 1096.87 1844.60 1844.60 2941.47 2941.47 525.55
68 2450817.0 45097.0 2450872 674.0 804458 4395.0 579 674.0 804458 4395 579 1 52.0 12.0 1.0 760 3 9 5 33.22 55.14 18.19 184.75 90.95 166.10 275.70 5.45 0.00 74.40 90.95 96.40 165.35 170.80 -75.15
69 2450817.0 45097.0 2450825 674.0 804458 4395.0 579 674.0 804458 4395 579 1 94.0 14.0 1.0 440 3 9 72 95.14 268.29 233.41 2511.36 16805.52 6850.08 19316.88 840.27 0.00 2704.32 16805.52 17645.79 19509.84 20350.11 9955.44
70 2450817.0 45097.0 2450847 674.0 804458 4395.0 579 674.0 804458 4395 579 1 61.0 12.0 1.0 1588 3 9 44 97.85 172.21 92.99 3485.68 4091.56 4305.40 7577.24 0.00 0.00 3409.56 4091.56 4091.56 7501.12 7501.12 -213.84
71 2450817.0 80602.0 2450868 276.0 23666 1703.0 340 276.0 23666 1703 340 2 36.0 7.0 1.0 1474 3 10 74 74.83 184.83 103.50 6018.42 7659.00 5537.42 13677.42 689.31 0.00 1230.62 7659.00 8348.31 8889.62 9578.93 2121.58
72 2450817.0 80602.0 2450854 276.0 23666 1703.0 340 276.0 23666 1703 340 2 43.0 6.0 1.0 1090 1 10 22 76.14 203.29 168.73 760.32 3712.06 1675.08 4472.38 222.72 0.00 402.38 3712.06 3934.78 4114.44 4337.16 2036.98
73 2450817.0 80602.0 2450902 276.0 23666 1703.0 340 276.0 23666 1703 340 2 50.0 9.0 1.0 1460 1 10 76 43.24 74.80 63.58 852.72 4832.08 3286.24 5684.80 289.92 0.00 56.24 4832.08 5122.00 4888.32 5178.24 1545.84
74 2450817.0 80602.0 2450830 276.0 23666 1703.0 340 276.0 23666 1703 340 2 25.0 10.0 1.0 241 3 10 55 21.09 48.29 34.28 770.55 1885.40 1159.95 2655.95 131.97 0.00 796.40 1885.40 2017.37 2681.80 2813.77 725.45
75 2450817.0 80602.0 2450884 276.0 23666 1703.0 340 276.0 23666 1703 340 2 54.0 18.0 1.0 829 2 10 90 98.27 142.49 2.84 12568.50 255.60 8844.30 12824.10 15.33 0.00 127.80 255.60 270.93 383.40 398.73 -8588.70
76 2450817.0 80602.0 2450848 276.0 23666 1703.0 340 276.0 23666 1703 340 2 24.0 5.0 1.0 1861 1 10 95 4.18 12.12 7.39 449.35 702.05 397.10 1151.40 42.12 0.00 91.20 702.05 744.17 793.25 835.37 304.95
77 2450817.0 80602.0 2450859 276.0 23666 1703.0 340 276.0 23666 1703 340 2 33.0 3.0 1.0 1321 3 10 17 67.47 185.54 124.31 1040.91 2113.27 1146.99 3154.18 64.24 507.18 346.80 1606.09 1670.33 1952.89 2017.13 459.10
78 2450817.0 80602.0 2450820 276.0 23666 1703.0 340 276.0 23666 1703 340 2 90.0 17.0 1.0 1327 1 10 63 84.32 222.60 115.75 6731.55 7292.25 5312.16 14023.80 291.69 0.00 3786.30 7292.25 7583.94 11078.55 11370.24 1980.09
79 2450817.0 80602.0 2450891 276.0 23666 1703.0 340 276.0 23666 1703 340 2 93.0 3.0 1.0 1483 1 10 4 87.55 95.42 5.72 358.80 22.88 350.20 381.68 0.22 0.00 83.96 22.88 23.10 106.84 107.06 -327.32
80 2450818.0 64115.0 2450883 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 10.0 10.0 1.0 1615 2 11 81 45.42 129.44 50.48 6395.76 4088.88 3679.02 10484.64 367.99 0.00 2621.16 4088.88 4456.87 6710.04 7078.03 409.86
81 2450818.0 64115.0 2450876 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 65.0 9.0 1.0 721 2 11 30 93.79 114.42 75.51 1167.30 2265.30 2813.70 3432.60 31.71 1472.44 308.70 792.86 824.57 1101.56 1133.27 -2020.84
82 2450818.0 64115.0 2450869 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 95.0 14.0 1.0 490 3 11 33 54.16 107.23 27.87 2618.88 919.71 1787.28 3538.59 45.98 0.00 1698.51 919.71 965.69 2618.22 2664.20 -867.57
83 2450818.0 64115.0 2450829 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 68.0 13.0 1.0 1052 1 11 76 27.04 64.35 7.72 4303.88 586.72 2055.04 4890.60 11.73 0.00 1515.44 586.72 598.45 2102.16 2113.89 -1468.32
84 2450818.0 64115.0 2450888 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 71.0 6.0 1.0 1346 3 11 5 60.75 83.83 19.28 322.75 96.40 303.75 419.15 3.85 0.00 62.85 96.40 100.25 159.25 163.10 -207.35
85 2450818.0 64115.0 2450831 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 65.0 9.0 1.0 1028 2 11 78 49.40 143.75 103.50 3139.50 8073.00 3853.20 11212.50 403.65 0.00 4260.36 8073.00 8476.65 12333.36 12737.01 4219.80
86 2450818.0 64115.0 2450898 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 42.0 17.0 1.0 1094 2 11 32 14.57 30.15 3.31 858.88 105.92 466.24 964.80 4.23 0.00 231.36 105.92 110.15 337.28 341.51 -360.32
87 2450818.0 64115.0 2450841 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 72.0 20.0 1.0 862 2 11 11 14.54 27.77 1.38 290.29 15.18 159.94 305.47 0.60 0.00 9.13 15.18 15.78 24.31 24.91 -144.76
88 2450818.0 64115.0 2450834 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 41.0 3.0 1.0 1978 3 11 56 96.00 270.72 97.45 9703.12 5457.20 5376.00 15160.32 36.01 4256.61 4699.52 1200.59 1236.60 5900.11 5936.12 -4175.41
89 2450818.0 64115.0 2450875 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 40.0 9.0 1.0 1990 3 11 43 1.71 4.85 1.06 162.97 45.58 73.53 208.55 3.19 0.00 14.19 45.58 48.77 59.77 62.96 -27.95
90 2450818.0 64115.0 2450855 731.0 1046123 5715.0 107 731.0 1046123 5715 107 2 35.0 11.0 1.0 356 1 11 86 73.25 139.90 8.39 11309.86 721.54 6299.50 12031.40 28.86 0.00 239.94 721.54 750.40 961.48 990.34 -5577.96
91 2450818.0 81128.0 2450860 748.0 83584 2773.0 362 748.0 83584 2773 362 1 58.0 12.0 1.0 520 1 12 75 59.96 82.74 77.77 372.75 5832.75 4497.00 6205.50 291.63 0.00 434.25 5832.75 6124.38 6267.00 6558.63 1335.75
92 2450818.0 81128.0 2450869 748.0 83584 2773.0 362 748.0 83584 2773 362 1 84.0 5.0 1.0 631 2 12 40 86.12 120.56 114.53 241.20 4581.20 3444.80 4822.40 274.87 0.00 1108.80 4581.20 4856.07 5690.00 5964.87 1136.40
93 2450818.0 81128.0 2450846 748.0 83584 2773.0 362 748.0 83584 2773 362 1 21.0 6.0 1.0 728 1 12 41 57.21 159.04 98.60 2478.04 4042.60 2345.61 6520.64 0.00 0.00 1956.11 4042.60 4042.60 5998.71 5998.71 1696.99
94 2450818.0 81128.0 2450879 748.0 83584 2773.0 362 748.0 83584 2773 362 1 8.0 1.0 1.0 578 3 12 79 63.39 148.33 93.44 4336.31 7381.76 5007.81 11718.07 180.85 3764.69 1756.96 3617.07 3797.92 5374.03 5554.88 -1390.74
95 2450818.0 81128.0 2450832 748.0 83584 2773.0 362 748.0 83584 2773 362 1 37.0 18.0 1.0 1924 3 12 89 74.58 146.17 62.85 7415.48 5593.65 6637.62 13009.13 335.61 0.00 4683.18 5593.65 5929.26 10276.83 10612.44 -1043.97
96 2450818.0 81128.0 2450892 748.0 83584 2773.0 362 748.0 83584 2773 362 1 11.0 16.0 1.0 835 3 12 84 80.29 89.12 34.75 4567.08 2919.00 6744.36 7486.08 116.76 0.00 2394.84 2919.00 3035.76 5313.84 5430.60 -3825.36
97 2450818.0 31835.0 2450855 22.0 1502404 6833.0 662 22.0 1502404 6833 662 2 35.0 2.0 1.0 484 3 13 51 43.78 114.26 22.85 4661.91 1165.35 2232.78 5827.26 23.30 0.00 2563.77 1165.35 1188.65 3729.12 3752.42 -1067.43
98 2450818.0 31835.0 2450881 22.0 1502404 6833.0 662 22.0 1502404 6833 662 2 18.0 9.0 1.0 1760 3 13 100 13.66 16.93 2.03 1490.00 203.00 1366.00 1693.00 0.00 0.00 220.00 203.00 203.00 423.00 423.00 -1163.00

stg_catalog_sales.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"catalog_sales_renamed" AS (
    -- Rename: Renaming columns
    -- CS_SOLD_DATE_SK -> sale_date_key
    -- CS_SOLD_TIME_SK -> sale_time_key
    -- CS_SHIP_DATE_SK -> shipping_date_id
    -- CS_BILL_CUSTOMER_SK -> billing_customer_id
    -- CS_BILL_CDEMO_SK -> billing_customer_demographics_id
    -- CS_BILL_HDEMO_SK -> billing_household_demographics_id
    -- CS_BILL_ADDR_SK -> billing_address_id
    -- CS_SHIP_CUSTOMER_SK -> shipping_customer_id
    -- CS_SHIP_CDEMO_SK -> shipping_customer_demographics_id
    -- CS_SHIP_HDEMO_SK -> shipping_household_demographics_id
    -- CS_SHIP_ADDR_SK -> shipping_address_id
    -- CS_CALL_CENTER_SK -> call_center_id
    -- CS_CATALOG_PAGE_SK -> catalog_page_id
    -- CS_SHIP_MODE_SK -> shipping_mode_id
    -- CS_WAREHOUSE_SK -> warehouse_key
    -- CS_ITEM_SK -> item_id
    -- CS_PROMO_SK -> promotion_id
    -- CS_ORDER_NUMBER -> order_number
    -- CS_QUANTITY -> quantity
    -- CS_LIST_PRICE -> unit_list_price
    -- CS_SALES_PRICE -> unit_sales_price
    -- CS_EXT_DISCOUNT_AMT -> total_discount_amount
    -- CS_EXT_SALES_PRICE -> total_sales_price
    -- CS_EXT_WHOLESALE_COST -> total_wholesale_cost
    -- CS_EXT_LIST_PRICE -> total_list_price
    -- CS_EXT_TAX -> total_tax_amount
    -- CS_COUPON_AMT -> coupon_amount
    -- CS_EXT_SHIP_COST -> total_shipping_cost
    -- CS_NET_PAID -> net_paid
    -- CS_NET_PAID_INC_TAX -> net_paid_with_tax
    -- CS_NET_PAID_INC_SHIP -> net_paid_with_shipping
    -- CS_NET_PAID_INC_SHIP_TAX -> net_paid_with_shipping_and_tax
    -- CS_NET_PROFIT -> net_profit
    SELECT 
        "CS_SOLD_DATE_SK" AS "sale_date_key",
        "CS_SOLD_TIME_SK" AS "sale_time_key",
        "CS_SHIP_DATE_SK" AS "shipping_date_id",
        "CS_BILL_CUSTOMER_SK" AS "billing_customer_id",
        "CS_BILL_CDEMO_SK" AS "billing_customer_demographics_id",
        "CS_BILL_HDEMO_SK" AS "billing_household_demographics_id",
        "CS_BILL_ADDR_SK" AS "billing_address_id",
        "CS_SHIP_CUSTOMER_SK" AS "shipping_customer_id",
        "CS_SHIP_CDEMO_SK" AS "shipping_customer_demographics_id",
        "CS_SHIP_HDEMO_SK" AS "shipping_household_demographics_id",
        "CS_SHIP_ADDR_SK" AS "shipping_address_id",
        "CS_CALL_CENTER_SK" AS "call_center_id",
        "CS_CATALOG_PAGE_SK" AS "catalog_page_id",
        "CS_SHIP_MODE_SK" AS "shipping_mode_id",
        "CS_WAREHOUSE_SK" AS "warehouse_key",
        "CS_ITEM_SK" AS "item_id",
        "CS_PROMO_SK" AS "promotion_id",
        "CS_ORDER_NUMBER" AS "order_number",
        "CS_QUANTITY" AS "quantity",
        "CS_WHOLESALE_COST",
        "CS_LIST_PRICE" AS "unit_list_price",
        "CS_SALES_PRICE" AS "unit_sales_price",
        "CS_EXT_DISCOUNT_AMT" AS "total_discount_amount",
        "CS_EXT_SALES_PRICE" AS "total_sales_price",
        "CS_EXT_WHOLESALE_COST" AS "total_wholesale_cost",
        "CS_EXT_LIST_PRICE" AS "total_list_price",
        "CS_EXT_TAX" AS "total_tax_amount",
        "CS_COUPON_AMT" AS "coupon_amount",
        "CS_EXT_SHIP_COST" AS "total_shipping_cost",
        "CS_NET_PAID" AS "net_paid",
        "CS_NET_PAID_INC_TAX" AS "net_paid_with_tax",
        "CS_NET_PAID_INC_SHIP" AS "net_paid_with_shipping",
        "CS_NET_PAID_INC_SHIP_TAX" AS "net_paid_with_shipping_and_tax",
        "CS_NET_PROFIT" AS "net_profit"
    FROM "catalog_sales"
)

-- COCOON BLOCK END
SELECT * FROM "catalog_sales_renamed"

stg_catalog_sales.yml (Document the table)

version: 2
models:
- name: stg_catalog_sales
  description: The table is about catalog sales transactions. It includes details
    such as sale date, customer information, item details, order quantities, various
    price points (wholesale, list, sales), discounts, taxes, shipping costs, and profit
    margins. Each row represents a single item in an order, with associated timestamps,
    customer demographics, and financial breakdowns.
  columns:
  - name: sale_date_key
    description: Date of sale in surrogate key format
    tests:
    - not_null
  - name: sale_time_key
    description: Time of sale in surrogate key format
    tests:
    - not_null
  - name: shipping_date_id
    description: Shipping date surrogate key
    tests:
    - not_null
  - name: billing_customer_id
    description: Billing customer surrogate key
    tests:
    - not_null
  - name: billing_customer_demographics_id
    description: Billing customer demographics surrogate key
    tests:
    - not_null
  - name: billing_household_demographics_id
    description: Billing household demographics surrogate key
    tests:
    - not_null
  - name: billing_address_id
    description: Billing address surrogate key
    tests:
    - not_null
  - name: shipping_customer_id
    description: Shipping customer surrogate key
    tests:
    - not_null
  - name: shipping_customer_demographics_id
    description: Shipping customer demographics surrogate key
    tests:
    - not_null
  - name: shipping_household_demographics_id
    description: Shipping household demographics surrogate key
    tests:
    - not_null
  - name: shipping_address_id
    description: Shipping address surrogate key
    tests:
    - not_null
  - name: call_center_id
    description: Call center surrogate key
    tests:
    - not_null
  - name: catalog_page_id
    description: Catalog page surrogate key
    tests:
    - not_null
  - name: shipping_mode_id
    description: Shipping mode surrogate key
    tests:
    - not_null
  - name: warehouse_key
    description: Warehouse identifier in surrogate key format
    tests:
    - not_null
  - name: item_id
    description: Item surrogate key
    tests:
    - not_null
  - name: promotion_id
    description: Promotion surrogate key
    tests:
    - not_null
  - name: order_number
    description: Order number
    tests:
    - not_null
  - name: quantity
    description: Quantity of items sold
    tests:
    - not_null
  - name: CS_WHOLESALE_COST
    description: Wholesale cost of the item sold
    tests:
    - not_null
  - name: unit_list_price
    description: List price per unit
    tests:
    - not_null
  - name: unit_sales_price
    description: Sales price per unit
    tests:
    - not_null
  - name: total_discount_amount
    description: Extended discount amount
    tests:
    - not_null
  - name: total_sales_price
    description: Extended sales price
    tests:
    - not_null
  - name: total_wholesale_cost
    description: Extended wholesale cost
    tests:
    - not_null
  - name: total_list_price
    description: Extended list price
    tests:
    - not_null
  - name: total_tax_amount
    description: Extended tax amount
    tests:
    - not_null
  - name: coupon_amount
    description: Coupon amount applied to the sale
    tests:
    - not_null
  - name: total_shipping_cost
    description: Extended shipping cost
    tests:
    - not_null
  - name: net_paid
    description: Net amount paid
    tests:
    - not_null
  - name: net_paid_with_tax
    description: Net paid including tax
    tests:
    - not_null
  - name: net_paid_with_shipping
    description: Net paid including shipping
    tests:
    - not_null
  - name: net_paid_with_shipping_and_tax
    description: Net paid including shipping and tax
    tests:
    - not_null
  - name: net_profit
    description: Net profit
    tests:
    - not_null

stg_ship_mode (first 100 rows)

carrier_name contract_id shipping_service_type shipping_method_code ship_mode_surrogate_key ship_mode_id
0 UPS YvxVaJI10 EXPRESS AIR 1 AAAAAAAABAAAAAAA
1 FEDEX ldhM8IvpzHgdbBgDfI NEXT DAY AIR 2 AAAAAAAACAAAAAAA
2 AIRBORNE 6Hzzp4JkzjqD8MGXLCDa OVERNIGHT AIR 3 AAAAAAAADAAAAAAA
3 USPS UaAJjKDnL4gTOqbpj TWO DAY AIR 4 AAAAAAAAEAAAAAAA
4 DHL HVDFCcQ LIBRARY AIR 5 AAAAAAAAFAAAAAAA
5 TBS Ek REGULAR SURFACE 6 AAAAAAAAGAAAAAAA
6 ZHOU hGoF18SLDDPBj EXPRESS SURFACE 7 AAAAAAAAHAAAAAAA
7 ZOUROS yVfotg7Tio3MVhBg6Bkn NEXT DAY SURFACE 8 AAAAAAAAIAAAAAAA
8 MSC Xjy3ZPuiDjzHlRx14Z3 OVERNIGHT SURFACE 9 AAAAAAAAJAAAAAAA
9 LATVIAN P7FBIt8yd TWO DAY SURFACE 10 AAAAAAAAKAAAAAAA
10 ALLIANCE OrDuVy2H LIBRARY SURFACE 11 AAAAAAAALAAAAAAA
11 ORIENTAL GNJr3g5i7oorKqtX REGULAR SEA 12 AAAAAAAAMAAAAAAA
12 BAVARIAN qENFQ EXPRESS SEA 13 AAAAAAAANAAAAAAA
13 BOXBUNDLES A5BYO1qH8HGTTN NEXT DAY SEA 14 AAAAAAAAOAAAAAAA
14 GREAT EASTERN uukTktPYycct8 OVERNIGHT SEA 15 AAAAAAAAPAAAAAAA
15 DIAMOND 2mM8l TWO DAY SEA 16 AAAAAAAAABAAAAAA
16 None 5FKNB0j8aaqTB LIBRARY SEA 17 AAAAAAAABBAAAAAA
17 GERMAN I3uCelXtjP REGULAR BIKE 18 AAAAAAAACBAAAAAA
18 HARMSTORF fop0bcSd91J26IVpR EXPRESS BIKE 19 AAAAAAAADBAAAAAA
19 PRIVATE CARRIER O9V6oF8RJnLMmZYd1 NEXT DAY BIKE 20 AAAAAAAAEBAAAAAA

stg_ship_mode.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"ship_mode_renamed" AS (
    -- Rename: Renaming columns
    -- SM_SHIP_MODE_SK -> ship_mode_surrogate_key
    -- SM_SHIP_MODE_ID -> ship_mode_id
    -- SM_TYPE -> shipping_service_type
    -- SM_CODE -> shipping_method_code
    -- SM_CARRIER -> carrier_name
    -- SM_CONTRACT -> contract_id
    SELECT 
        "SM_SHIP_MODE_SK" AS "ship_mode_surrogate_key",
        "SM_SHIP_MODE_ID" AS "ship_mode_id",
        "SM_TYPE" AS "shipping_service_type",
        "SM_CODE" AS "shipping_method_code",
        "SM_CARRIER" AS "carrier_name",
        "SM_CONTRACT" AS "contract_id"
    FROM "ship_mode"
),

"ship_mode_renamed_cleaned" AS (
    -- Clean unusual string values: 
    -- carrier_name: The problem is that some carrier names have typos or inconsistent formatting. BARIAN is likely a misspelling of "BAVARIAN". GERMA is probably a truncation of "GERMAN". RUPEKSA doesn't seem to be a known carrier name and may be a data entry error. PRIVATECARRIER is inconsistent with the formatting of other entries, which are typically all uppercase without spaces. The correct values should be standardized to all uppercase, with typos and inconsistencies corrected. 
    SELECT
        "ship_mode_surrogate_key",
        "ship_mode_id",
        "shipping_service_type",
        "shipping_method_code",
        CASE
            WHEN "carrier_name" = 'BARIAN' THEN 'BAVARIAN'
            WHEN "carrier_name" = 'GERMA' THEN 'GERMAN'
            WHEN "carrier_name" = 'RUPEKSA' THEN ''
            WHEN "carrier_name" = 'PRIVATECARRIER' THEN 'PRIVATE CARRIER'
            ELSE "carrier_name"
        END AS "carrier_name",
        "contract_id"
    FROM "ship_mode_renamed"
),

"ship_mode_renamed_cleaned_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- carrier_name: ['']
    SELECT 
        CASE
            WHEN "carrier_name" = '' THEN NULL
            ELSE "carrier_name"
        END AS "carrier_name",
        "contract_id",
        "shipping_service_type",
        "shipping_method_code",
        "ship_mode_surrogate_key",
        "ship_mode_id"
    FROM "ship_mode_renamed_cleaned"
)

-- COCOON BLOCK END
SELECT * FROM "ship_mode_renamed_cleaned_null"

stg_ship_mode.yml (Document the table)

version: 2
models:
- name: stg_ship_mode
  description: The table is about shipping modes. It includes details such as a unique
    identifier, ship mode ID, type of shipping, shipping code, carrier name, and contract
    information. Each row represents a different shipping option, ranging from express
    to library shipping, with various carriers like UPS, FedEx, and DHL.
  columns:
  - name: carrier_name
    description: Name of the shipping company
    tests:
    - not_null
  - name: contract_id
    description: Unique contract identifier for the shipping mode
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column represents a unique contract identifier for the shipping
        mode. For this table, each row is a different shipping option. contract_id
        appears to be unique across rows, as it likely identifies a specific contract
        for each shipping service.
  - name: shipping_service_type
    description: Type or category of shipping service
    tests:
    - not_null
    - accepted_values:
        values:
        - EXPRESS
        - NEXT DAY
        - OVERNIGHT
        - REGULAR
        - TWO DAY
        - SAME DAY
        - STANDARD
        - PRIORITY
        - ECONOMY
        - INTERNATIONAL
        - GROUND
        - EXPEDITED
        - THREE DAY
        - FREIGHT
        - LIBRARY
  - name: shipping_method_code
    description: Code representing the shipping method
    tests:
    - not_null
    - accepted_values:
        values:
        - SEA
        - SURFACE
        - AIR
        - BIKE
        - RAIL
        - ROAD
        - EXPRESS
        - STANDARD
        - ECONOMY
        - OVERNIGHT
        - SAME_DAY
        - TWO_DAY
        - FREIGHT
        - COURIER
        - POSTAL
        - PICKUP
        - DROPOFF
  - name: ship_mode_surrogate_key
    description: Surrogate key for the shipping mode
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key for the shipping mode. For this table,
        each row is a different shipping option. As a surrogate key, it is designed
        to be unique for each row in the table.
  - name: ship_mode_id
    description: Unique identifier for the shipping mode
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a unique identifier for the shipping mode. For this
        table, each row is a different shipping option. ship_mode_id appears to be
        unique across rows, as it's specifically designed to identify each shipping
        mode uniquely.

stg_catalog_returns (first 100 rows)

return_date_id return_time_id item_id refunded_customer_id refunded_customer_demo_id refunded_household_demo_id refunded_address_id returning_customer_id returning_customer_demo_id returning_household_demo_id returning_address_id call_center_id catalog_page_id shipping_mode_id warehouse_id return_reason_id order_number return_quantity return_amount return_tax return_amount_with_tax return_fee return_shipping_cost refunded_cash reversed_charge store_credit net_loss
0 2450926 45816 952 601 797995.0 6189.0 583.0 601.0 797995.0 4703.0 583.0 2.0 106 2.0 1.0 1.0 2 47 3888.31 233.29 4121.60 91.23 1348.90 3577.24 186.64 124.43 1673.42
1 2450946 74710 404 601 797995.0 6189.0 583.0 809.0 665550.0 991.0 832.0 2.0 17 2.0 1.0 1.0 2 49 2490.18 99.60 2589.78 52.54 1867.39 323.72 931.57 1234.89 2019.53
2 2451065 71104 1820 383 3755.0 2480.0 652.0 311.0 700704.0 5571.0 485.0 2.0 7 13.0 1.0 1.0 4 12 64.32 4.50 68.82 22.97 78.60 1.28 55.47 7.57 106.07
3 2450955 28638 988 801 90299.0 3797.0 495.0 681.0 1168758.0 7154.0 197.0 1.0 9 12.0 1.0 1.0 5 20 829.40 49.76 879.16 60.00 308.00 622.05 176.24 31.11 417.76
4 2451024 44538 1783 351 528859.0 5567.0 122.0 27.0 737861.0 54.0 647.0 1.0 78 12.0 1.0 1.0 6 6 403.08 36.27 439.35 4.58 199.44 354.71 27.57 20.80 240.29
5 2450993 10904 374 351 528859.0 5567.0 122.0 8.0 1289384.0 1410.0 436.0 1.0 54 7.0 1.0 1.0 6 7 23.17 1.85 25.02 19.85 7.07 6.25 9.64 7.28 28.77
6 2451018 60162 1844 674 NaN NaN NaN 994.0 NaN NaN 335.0 NaN 2 NaN NaN NaN 9 3 413.94 0.00 NaN NaN NaN 318.73 35.22 59.99 185.36
7 2450929 30343 721 731 1046123.0 5715.0 107.0 927.0 865466.0 4658.0 697.0 2.0 65 14.0 1.0 1.0 11 17 1283.67 51.34 1335.01 71.97 58.31 449.28 183.56 650.83 181.62
8 2451061 53881 1094 731 1046123.0 5715.0 107.0 53.0 1827904.0 2936.0 968.0 2.0 42 11.0 1.0 1.0 11 9 29.79 1.19 30.98 91.16 59.67 0.00 20.85 8.94 152.02
9 2451042 11891 835 748 83584.0 2773.0 362.0 188.0 1816862.0 2974.0 286.0 1.0 11 2.0 1.0 1.0 12 61 2119.75 84.79 2204.54 30.32 271.45 1441.43 529.08 149.24 386.56
10 2451038 37877 1760 22 1502404.0 6833.0 662.0 294.0 1764552.0 4145.0 491.0 2.0 18 3.0 1.0 1.0 13 27 54.81 0.00 54.81 7.04 146.07 12.05 40.19 2.57 153.11
11 2450870 64669 370 22 1502404.0 6833.0 662.0 573.0 1482438.0 6726.0 614.0 2.0 43 18.0 1.0 1.0 13 18 100.44 5.02 105.46 70.47 196.92 9.03 82.26 9.15 272.41
12 2450956 64639 110 957 189998.0 3839.0 327.0 61.0 1639056.0 2195.0 287.0 2.0 56 17.0 1.0 1.0 16 40 407.60 32.60 440.20 2.01 296.40 362.76 19.72 25.12 331.01
13 2450944 15515 1762 957 189998.0 3839.0 327.0 292.0 1218513.0 1645.0 377.0 2.0 75 13.0 1.0 1.0 16 44 2157.76 43.15 2200.91 46.29 1280.84 1834.09 51.78 271.89 1370.28
14 2450991 44014 1582 3 599432.0 3708.0 937.0 895.0 1075366.0 3615.0 511.0 1.0 9 12.0 1.0 1.0 18 10 339.60 30.56 370.16 25.06 157.70 196.96 45.64 97.00 213.32
15 2451002 16008 1045 3 599432.0 3708.0 937.0 809.0 452924.0 4311.0 451.0 1.0 33 5.0 1.0 1.0 18 44 2618.44 235.65 2854.09 83.74 5117.64 968.82 65.98 1583.64 5437.03
16 2450989 38620 916 389 27132.0 4828.0 171.0 287.0 326203.0 512.0 421.0 2.0 100 8.0 1.0 1.0 19 44 6201.80 186.05 6387.85 29.08 1162.48 5891.71 173.65 136.44 1377.61
17 2451073 22065 722 751 1766792.0 2633.0 674.0 993.0 517281.0 2882.0 283.0 2.0 100 6.0 1.0 1.0 21 50 1654.00 82.70 1736.70 83.07 1034.00 1223.96 391.33 38.71 1199.77
18 2450986 71718 1936 242 541252.0 6015.0 978.0 550.0 640677.0 6379.0 728.0 1.0 30 14.0 1.0 1.0 22 3 12.87 0.90 13.77 84.18 124.62 0.90 9.45 2.52 209.70
19 2451003 73516 1738 242 541252.0 6015.0 978.0 346.0 125760.0 4274.0 988.0 1.0 45 3.0 1.0 1.0 22 30 2822.70 28.22 2850.92 25.25 1266.60 1072.62 122.50 1627.58 1320.07
20 2450869 71183 1430 242 541252.0 6015.0 978.0 328.0 1893150.0 6361.0 172.0 1.0 21 18.0 1.0 1.0 22 2 64.64 5.17 69.81 66.56 77.08 1.93 52.04 10.67 148.81
21 2450918 10436 992 703 600082.0 6661.0 87.0 371.0 178127.0 666.0 805.0 1.0 73 9.0 1.0 1.0 23 8 85.92 1.71 87.63 0.94 50.00 65.29 13.61 7.02 52.65
22 2451063 64648 200 764 1379528.0 6492.0 56.0 473.0 487719.0 1868.0 817.0 1.0 61 11.0 1.0 1.0 26 17 1603.95 128.31 1732.26 92.88 1262.08 914.25 517.27 172.43 1483.27
23 2450908 35973 1171 42 643025.0 4008.0 791.0 519.0 445572.0 6601.0 383.0 1.0 52 3.0 1.0 1.0 28 43 793.35 63.46 856.81 97.48 582.65 476.01 193.57 123.77 743.59
24 2451074 54503 1549 262 511666.0 7070.0 274.0 422.0 1020642.0 2223.0 357.0 2.0 82 13.0 1.0 1.0 31 28 1098.16 98.83 1196.99 51.07 299.32 680.85 208.65 208.66 449.22
25 2450993 7690 343 388 174162.0 3089.0 663.0 393.0 1678181.0 4527.0 73.0 1.0 22 5.0 1.0 1.0 32 13 419.25 37.73 456.98 27.33 259.87 234.78 184.47 0.00 324.93
26 2450906 74103 805 486 1309701.0 1516.0 378.0 488.0 1596473.0 703.0 286.0 1.0 35 9.0 1.0 1.0 33 1 7.80 0.31 8.11 57.79 7.22 3.51 2.35 1.94 65.32
27 2450983 83387 832 919 717893.0 914.0 888.0 899.0 733587.0 4279.0 571.0 2.0 54 7.0 1.0 1.0 35 32 5100.48 306.02 5406.50 83.98 377.60 5100.48 0.00 0.00 767.60
28 2450938 36423 946 988 467550.0 5112.0 321.0 221.0 1235634.0 3167.0 500.0 2.0 86 19.0 1.0 1.0 36 2 88.24 0.88 89.12 6.73 33.22 1.76 78.69 7.79 40.83
29 2450977 47666 1072 988 467550.0 5112.0 321.0 75.0 1897118.0 4028.0 538.0 2.0 52 1.0 1.0 1.0 36 69 1440.72 100.85 1541.57 2.22 0.00 720.36 36.01 684.35 103.07
30 2450963 75037 640 817 785079.0 1788.0 250.0 849.0 3803.0 6272.0 388.0 2.0 7 9.0 1.0 1.0 37 14 377.58 30.20 407.78 95.44 684.32 332.27 19.93 25.38 809.96
31 2450887 20595 560 61 1286495.0 4976.0 457.0 250.0 349487.0 5628.0 816.0 2.0 103 13.0 1.0 1.0 38 68 9568.28 669.77 10238.05 71.11 2192.32 2105.02 3433.09 4030.17 2933.20
32 2451012 37487 1036 898 1785329.0 2560.0 991.0 876.0 1456966.0 2056.0 99.0 2.0 26 15.0 1.0 1.0 39 39 4710.03 0.00 4710.03 53.59 2302.56 3815.12 635.38 259.53 2356.15
33 2450965 37170 1522 283 157402.0 4874.0 146.0 523.0 1865664.0 3345.0 426.0 1.0 74 9.0 1.0 1.0 40 40 1108.40 55.42 1163.82 77.46 408.80 1030.81 76.03 1.56 541.68
34 2450975 65871 1309 159 1915909.0 7059.0 962.0 338.0 488417.0 5969.0 168.0 2.0 72 11.0 1.0 1.0 42 10 815.70 65.25 880.95 24.41 674.50 40.78 23.24 751.68 764.16
35 2451040 77649 1220 183 1623252.0 3721.0 390.0 385.0 187670.0 4723.0 129.0 1.0 58 8.0 1.0 1.0 44 16 405.60 16.22 421.82 22.13 89.44 324.48 55.16 25.96 127.79
36 2450946 31349 1612 183 1623252.0 3721.0 390.0 971.0 1481620.0 29.0 38.0 1.0 108 11.0 1.0 1.0 44 20 1854.60 37.09 1891.69 51.41 927.20 1075.66 646.52 132.42 1015.70
37 2451061 54565 1400 305 527683.0 6708.0 486.0 217.0 252890.0 3009.0 728.0 2.0 98 18.0 1.0 1.0 45 1 9.89 0.09 9.98 5.19 16.60 5.43 2.14 2.32 21.88
38 2450858 74844 361 305 527683.0 6708.0 486.0 422.0 1717248.0 6779.0 510.0 2.0 27 10.0 1.0 1.0 45 38 1472.50 103.07 1575.57 84.52 17.10 265.05 386.38 821.07 204.69
39 2450949 54638 1717 871 830328.0 6585.0 842.0 7.0 853051.0 4346.0 994.0 2.0 78 12.0 1.0 1.0 46 50 1329.50 79.77 1409.27 30.45 52.00 1076.89 166.72 85.89 162.22
40 2450967 36814 1820 871 830328.0 6585.0 842.0 246.0 1490672.0 3850.0 581.0 2.0 36 8.0 1.0 1.0 46 70 6902.00 207.06 7109.06 42.78 1401.40 5107.48 1740.68 53.84 1651.24
41 2451006 18610 1837 722 553976.0 3877.0 331.0 648.0 1555212.0 401.0 143.0 2.0 74 10.0 1.0 1.0 47 49 3888.64 0.00 3888.64 43.74 3295.74 2605.38 667.29 615.97 3339.48
42 2450968 52092 166 375 1166269.0 3010.0 504.0 422.0 1491876.0 7131.0 339.0 1.0 43 10.0 1.0 1.0 48 10 892.10 26.76 918.86 75.24 1040.80 811.81 72.26 8.03 1142.80
43 2450993 56863 1405 786 196899.0 2059.0 219.0 658.0 678147.0 7063.0 932.0 1.0 53 13.0 1.0 1.0 52 14 288.82 5.77 294.59 84.41 151.76 66.42 204.60 17.80 241.94
44 2451038 23109 829 786 196899.0 2059.0 219.0 627.0 1013398.0 1201.0 404.0 1.0 84 7.0 1.0 1.0 52 33 292.05 5.84 297.89 69.38 15.18 122.66 64.36 105.03 90.40
45 2450927 46513 1322 643 1592501.0 4159.0 664.0 188.0 1308684.0 1449.0 567.0 2.0 11 2.0 1.0 1.0 55 1 21.25 0.85 22.10 94.74 2.39 17.21 0.20 3.84 97.98
46 2450983 71731 1214 127 1346606.0 6038.0 270.0 897.0 1493518.0 3358.0 445.0 2.0 92 12.0 1.0 1.0 56 4 6.04 0.06 6.10 23.32 260.68 2.53 0.42 3.09 284.06
47 2450944 44105 410 732 677128.0 5571.0 567.0 757.0 1779943.0 862.0 28.0 1.0 34 5.0 1.0 1.0 57 34 3039.60 60.79 3100.39 61.21 719.78 1215.84 291.80 1531.96 841.78
48 2450943 15203 818 732 677128.0 5571.0 567.0 948.0 89333.0 5045.0 957.0 1.0 85 6.0 1.0 1.0 57 21 82.95 4.14 87.09 57.08 62.16 47.28 15.33 20.34 123.38
49 2451039 45152 1687 940 1030863.0 6139.0 62.0 177.0 42517.0 4863.0 762.0 1.0 92 20.0 1.0 1.0 58 37 509.86 0.00 509.86 78.85 963.11 163.15 41.60 305.11 1041.96
50 2450909 69632 1342 363 683276.0 4942.0 55.0 719.0 1594118.0 4137.0 203.0 1.0 30 20.0 1.0 1.0 62 14 346.64 10.39 357.03 95.78 186.20 336.24 6.13 4.27 292.37
51 2451044 37030 520 363 683276.0 4942.0 55.0 393.0 1322943.0 2774.0 452.0 1.0 47 19.0 1.0 1.0 62 11 126.94 0.00 126.94 71.55 112.75 49.50 56.53 20.91 184.30
52 2450919 69296 631 363 683276.0 4942.0 55.0 799.0 1828157.0 6005.0 453.0 1.0 44 3.0 1.0 1.0 62 33 218.79 17.50 236.29 23.13 464.64 94.07 115.98 8.74 505.27
53 2450863 46270 1735 758 1148029.0 2853.0 124.0 919.0 1126300.0 3007.0 314.0 1.0 5 2.0 1.0 1.0 63 54 2701.08 162.06 2863.14 3.08 2132.46 594.23 1896.16 210.69 2297.60
54 2450986 37706 1928 758 1148029.0 2853.0 124.0 122.0 1718117.0 3509.0 748.0 1.0 105 5.0 1.0 1.0 63 8 171.20 6.84 178.04 83.12 29.52 20.54 58.75 91.91 119.48
55 2450987 42160 680 621 1225267.0 960.0 53.0 750.0 1014769.0 971.0 373.0 2.0 93 19.0 1.0 1.0 64 11 434.17 26.05 460.22 55.21 248.05 347.33 86.84 0.00 329.31
56 2450925 54924 1316 336 785982.0 3228.0 874.0 856.0 1134477.0 4252.0 980.0 2.0 78 18.0 1.0 1.0 66 3 181.65 9.08 190.73 98.27 0.00 56.31 82.72 42.62 107.35
57 2450936 19990 1736 336 785982.0 3228.0 874.0 131.0 1110002.0 2615.0 75.0 2.0 64 8.0 1.0 1.0 66 23 458.85 36.70 495.55 35.46 305.90 293.66 165.19 0.00 378.06
58 2450920 68157 727 214 1227752.0 1090.0 181.0 436.0 1862046.0 4849.0 205.0 2.0 102 13.0 1.0 1.0 67 42 7.14 0.57 7.71 30.38 3.78 2.07 1.41 3.66 34.73
59 2450949 17521 596 214 1227752.0 1090.0 181.0 304.0 1378959.0 4311.0 910.0 2.0 63 13.0 1.0 1.0 67 39 721.11 64.89 786.00 45.74 484.38 7.21 35.69 678.21 595.01
60 2451014 60949 1262 214 1227752.0 1090.0 181.0 612.0 1195468.0 3695.0 522.0 2.0 17 10.0 1.0 1.0 67 28 182.00 12.74 194.74 11.87 49.28 127.40 3.27 51.33 73.89
61 2450909 27281 394 907 163011.0 3515.0 819.0 807.0 15782.0 1929.0 629.0 1.0 79 3.0 1.0 1.0 68 14 732.90 0.00 732.90 24.07 586.32 622.96 107.74 2.20 610.39
62 2451035 72342 1262 376 1694169.0 6315.0 708.0 985.0 398527.0 5033.0 92.0 2.0 42 10.0 1.0 1.0 71 18 547.02 38.29 585.31 58.57 40.14 54.70 443.08 49.24 137.00
63 2450991 20519 1159 24 589162.0 653.0 144.0 744.0 1117994.0 786.0 531.0 1.0 1 13.0 1.0 1.0 73 64 2634.24 210.73 2844.97 91.85 1114.24 2370.81 134.34 129.09 1416.82
64 2450942 86370 1520 448 1738817.0 4139.0 661.0 880.0 698232.0 4263.0 494.0 1.0 48 14.0 1.0 1.0 74 5 125.20 10.01 135.21 23.50 262.90 1.25 97.92 26.03 296.41
65 2450940 4395 1016 543 1096330.0 7070.0 457.0 572.0 900814.0 578.0 542.0 1.0 76 7.0 1.0 1.0 75 3 101.04 4.04 105.08 46.13 74.91 83.86 6.35 10.83 125.08
66 2450987 60432 1813 543 1096330.0 7070.0 457.0 637.0 1169478.0 2888.0 651.0 1.0 48 14.0 1.0 1.0 75 2 117.34 9.38 126.72 89.84 50.88 28.16 8.91 80.27 150.10
67 2450915 43293 274 674 1087861.0 448.0 635.0 74.0 1540251.0 1673.0 448.0 2.0 80 20.0 1.0 1.0 77 3 20.61 0.82 21.43 44.76 18.42 18.34 1.43 0.84 64.00
68 2450970 82263 1345 674 NaN NaN 635.0 NaN NaN 6513.0 NaN 2.0 89 NaN NaN 1.0 77 10 839.90 50.39 NaN NaN 425.70 NaN NaN 196.55 NaN
69 2450926 62016 187 674 1087861.0 448.0 635.0 247.0 1603603.0 380.0 757.0 2.0 39 15.0 1.0 1.0 77 36 197.28 9.86 207.14 39.53 146.52 71.02 47.97 78.29 195.91
70 2450958 34973 278 641 1516877.0 960.0 596.0 8.0 1059029.0 5992.0 108.0 1.0 44 3.0 1.0 1.0 80 40 3567.60 0.00 3567.60 96.68 2583.60 3103.81 398.85 64.94 2680.28
71 2450899 73899 1528 641 1516877.0 960.0 596.0 63.0 1206262.0 2807.0 752.0 1.0 63 7.0 1.0 1.0 80 52 2883.40 0.00 2883.40 55.61 1086.80 634.34 787.17 1461.89 1142.41
72 2450957 54159 218 942 1441792.0 4242.0 139.0 208.0 109514.0 3643.0 619.0 1.0 32 13.0 1.0 1.0 83 2 129.04 5.16 134.20 98.47 52.36 43.87 44.28 40.89 155.99
73 2451018 34791 1402 942 1441792.0 4242.0 139.0 137.0 1385649.0 6797.0 192.0 1.0 97 3.0 1.0 1.0 83 12 406.92 28.48 435.40 81.31 197.64 236.01 111.09 59.82 307.43
74 2451002 51666 1346 224 47350.0 5629.0 508.0 515.0 274687.0 2921.0 755.0 1.0 55 4.0 1.0 1.0 86 17 1077.29 43.09 1120.38 11.03 1179.97 441.68 603.82 31.79 1234.09
75 2450889 82535 1094 224 47350.0 5629.0 508.0 133.0 1494396.0 7123.0 403.0 1.0 25 17.0 1.0 1.0 86 70 5176.50 207.06 5383.56 45.50 1293.60 5072.97 92.14 11.39 1546.16
76 2451005 76680 862 224 47350.0 5629.0 508.0 617.0 398869.0 6573.0 277.0 1.0 16 2.0 1.0 1.0 86 4 623.60 24.94 648.54 12.61 95.24 56.12 380.21 187.27 132.79
77 2451050 73402 871 977 1492959.0 5894.0 829.0 464.0 1002026.0 1035.0 997.0 2.0 67 17.0 1.0 1.0 89 15 763.80 0.00 763.80 4.63 361.80 114.57 253.19 396.04 366.43
78 2450979 48909 181 24 552511.0 1551.0 838.0 912.0 1698770.0 416.0 462.0 2.0 84 7.0 1.0 1.0 92 72 5989.68 539.07 6528.75 69.34 5682.24 1497.42 4402.41 89.85 6290.65
79 2450851 76961 1850 24 552511.0 1551.0 838.0 397.0 1886218.0 6642.0 219.0 2.0 81 17.0 1.0 1.0 92 3 159.63 7.98 167.61 75.26 32.46 0.00 1.59 158.04 115.70
80 2451054 38828 128 204 1098811.0 5665.0 872.0 204.0 1098811.0 1191.0 872.0 1.0 77 10.0 1.0 1.0 93 11 648.56 38.91 687.47 70.54 108.02 142.68 318.70 187.18 217.47
81 2451058 40911 494 93 1871653.0 1166.0 126.0 834.0 469308.0 147.0 633.0 1.0 13 11.0 1.0 1.0 95 54 3159.00 31.59 3190.59 1.50 519.48 1200.42 1468.93 489.65 552.57
82 2451007 31416 220 951 1504890.0 3382.0 721.0 951.0 1504890.0 429.0 721.0 1.0 107 11.0 1.0 1.0 97 33 0.00 0.00 0.00 83.44 2611.62 0.00 0.00 0.00 2695.06
83 2451026 61592 806 659 400535.0 811.0 887.0 768.0 714707.0 1762.0 417.0 2.0 197 15.0 1.0 1.0 99 15 91.65 2.74 94.39 68.20 40.80 52.24 24.82 14.59 111.74
84 2450909 69684 1448 659 400535.0 811.0 887.0 553.0 1079964.0 6880.0 596.0 2.0 91 4.0 1.0 1.0 99 26 48.10 1.44 49.54 6.32 214.24 23.56 1.47 23.07 222.00
85 2451012 48520 559 651 896753.0 655.0 357.0 147.0 609116.0 985.0 701.0 1.0 10 15.0 1.0 1.0 100 13 352.69 14.10 366.79 52.43 4.29 193.97 80.94 77.78 70.82
86 2450963 36885 1784 623 351944.0 218.0 139.0 172.0 1026902.0 1465.0 75.0 2.0 36 11.0 1.0 1.0 101 21 119.49 0.00 119.49 72.97 2033.01 46.60 69.24 3.65 2105.98
87 2451018 3015 476 623 351944.0 218.0 139.0 469.0 1395145.0 4004.0 216.0 2.0 162 12.0 1.0 1.0 101 10 290.10 17.40 307.50 90.31 77.30 168.25 52.39 69.46 185.01
88 2450973 66374 820 410 698752.0 4094.0 836.0 924.0 615789.0 900.0 164.0 1.0 33 10.0 1.0 1.0 102 33 1898.82 151.90 2050.72 94.21 976.47 1253.22 464.83 180.77 1222.58
89 2450923 4412 440 410 698752.0 4094.0 836.0 410.0 698752.0 881.0 836.0 1.0 26 14.0 1.0 1.0 102 1 10.39 0.41 10.80 49.12 14.84 10.39 0.00 0.00 64.37
90 2450868 29430 1369 111 1835190.0 5916.0 195.0 957.0 1480884.0 1910.0 936.0 1.0 214 14.0 1.0 1.0 103 9 61.11 3.66 64.77 74.43 48.87 8.55 33.63 18.93 126.96
91 2450921 62646 316 648 421422.0 6643.0 217.0 102.0 175256.0 5750.0 44.0 1.0 84 6.0 1.0 1.0 104 26 70.46 4.22 74.68 4.70 264.94 56.36 2.96 11.14 273.86
92 2450908 36699 502 648 421422.0 6643.0 217.0 261.0 1383491.0 1012.0 133.0 1.0 20 9.0 1.0 1.0 104 5 5.30 0.05 5.35 39.83 39.80 4.45 0.84 0.01 79.68
93 2450930 23430 1810 7 621140.0 4826.0 959.0 210.0 248712.0 4060.0 808.0 2.0 24 12.0 1.0 1.0 105 12 1153.32 92.26 1245.58 89.75 29.52 542.06 48.90 562.36 211.53
94 2450886 77970 1258 481 663720.0 3159.0 551.0 438.0 519045.0 5508.0 171.0 2.0 21 20.0 1.0 1.0 107 21 1340.22 26.80 1367.02 64.34 1235.01 1018.56 192.99 128.67 1326.15
95 2450979 59967 766 770 285795.0 5220.0 645.0 902.0 92062.0 5189.0 916.0 2.0 18 17.0 1.0 1.0 108 42 776.16 69.85 846.01 58.69 161.70 69.85 289.58 416.73 290.24
96 2450989 73597 1160 615 947475.0 288.0 148.0 782.0 17546.0 4351.0 709.0 2.0 111 10.0 1.0 1.0 109 35 6849.15 273.96 7123.11 21.77 3311.70 4040.99 673.95 2134.21 3607.43
97 2450922 72030 802 450 1173022.0 2394.0 366.0 518.0 458253.0 950.0 847.0 2.0 51 18.0 1.0 1.0 110 50 403.00 32.24 435.24 81.15 76.00 120.90 104.37 177.73 189.39
98 2450979 71329 289 450 1173022.0 2394.0 366.0 518.0 1494517.0 158.0 199.0 2.0 166 2.0 1.0 1.0 110 11 840.40 58.82 899.22 69.08 336.16 344.56 476.00 19.84 464.06

stg_catalog_returns.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"catalog_returns_renamed" AS (
    -- Rename: Renaming columns
    -- CR_RETURNED_DATE_SK -> return_date_id
    -- CR_RETURNED_TIME_SK -> return_time_id
    -- CR_ITEM_SK -> item_id
    -- CR_REFUNDED_CUSTOMER_SK -> refunded_customer_id
    -- CR_REFUNDED_CDEMO_SK -> refunded_customer_demo_id
    -- CR_REFUNDED_HDEMO_SK -> refunded_household_demo_id
    -- CR_REFUNDED_ADDR_SK -> refunded_address_id
    -- CR_RETURNING_CUSTOMER_SK -> returning_customer_id
    -- CR_RETURNING_CDEMO_SK -> returning_customer_demo_id
    -- CR_RETURNING_HDEMO_SK -> returning_household_demo_id
    -- CR_RETURNING_ADDR_SK -> returning_address_id
    -- CR_CALL_CENTER_SK -> call_center_id
    -- CR_CATALOG_PAGE_SK -> catalog_page_id
    -- CR_SHIP_MODE_SK -> shipping_mode_id
    -- CR_WAREHOUSE_SK -> warehouse_id
    -- CR_REASON_SK -> return_reason_id
    -- CR_ORDER_NUMBER -> order_number
    -- CR_RETURN_QUANTITY -> return_quantity
    -- CR_RETURN_AMOUNT -> return_amount
    -- CR_RETURN_TAX -> return_tax
    -- CR_RETURN_AMT_INC_TAX -> return_amount_with_tax
    -- CR_FEE -> return_fee
    -- CR_RETURN_SHIP_COST -> return_shipping_cost
    -- CR_REFUNDED_CASH -> refunded_cash
    -- CR_REVERSED_CHARGE -> reversed_charge
    -- CR_STORE_CREDIT -> store_credit
    -- CR_NET_LOSS -> net_loss
    SELECT 
        "CR_RETURNED_DATE_SK" AS "return_date_id",
        "CR_RETURNED_TIME_SK" AS "return_time_id",
        "CR_ITEM_SK" AS "item_id",
        "CR_REFUNDED_CUSTOMER_SK" AS "refunded_customer_id",
        "CR_REFUNDED_CDEMO_SK" AS "refunded_customer_demo_id",
        "CR_REFUNDED_HDEMO_SK" AS "refunded_household_demo_id",
        "CR_REFUNDED_ADDR_SK" AS "refunded_address_id",
        "CR_RETURNING_CUSTOMER_SK" AS "returning_customer_id",
        "CR_RETURNING_CDEMO_SK" AS "returning_customer_demo_id",
        "CR_RETURNING_HDEMO_SK" AS "returning_household_demo_id",
        "CR_RETURNING_ADDR_SK" AS "returning_address_id",
        "CR_CALL_CENTER_SK" AS "call_center_id",
        "CR_CATALOG_PAGE_SK" AS "catalog_page_id",
        "CR_SHIP_MODE_SK" AS "shipping_mode_id",
        "CR_WAREHOUSE_SK" AS "warehouse_id",
        "CR_REASON_SK" AS "return_reason_id",
        "CR_ORDER_NUMBER" AS "order_number",
        "CR_RETURN_QUANTITY" AS "return_quantity",
        "CR_RETURN_AMOUNT" AS "return_amount",
        "CR_RETURN_TAX" AS "return_tax",
        "CR_RETURN_AMT_INC_TAX" AS "return_amount_with_tax",
        "CR_FEE" AS "return_fee",
        "CR_RETURN_SHIP_COST" AS "return_shipping_cost",
        "CR_REFUNDED_CASH" AS "refunded_cash",
        "CR_REVERSED_CHARGE" AS "reversed_charge",
        "CR_STORE_CREDIT" AS "store_credit",
        "CR_NET_LOSS" AS "net_loss"
    FROM "catalog_returns"
)

-- COCOON BLOCK END
SELECT * FROM "catalog_returns_renamed"

stg_catalog_returns.yml (Document the table)

version: 2
models:
- name: stg_catalog_returns
  description: The table is about catalog returns. It includes details such as return
    date, item, customer, reason, and financial information. Each row represents a
    single return transaction with associated quantities, amounts, taxes, fees, and
    shipping costs. The table also tracks refunds, reversed charges, and store credits
    for each return.
  columns:
  - name: return_date_id
    description: Return date surrogate key
    tests:
    - not_null
  - name: return_time_id
    description: Return time surrogate key
    tests:
    - not_null
  - name: item_id
    description: Item surrogate key
    tests:
    - not_null
  - name: refunded_customer_id
    description: Refunded customer surrogate key
    tests:
    - not_null
  - name: refunded_customer_demo_id
    description: Refunded customer demographics surrogate key
    tests:
    - not_null
  - name: refunded_household_demo_id
    description: Refunded household demographics surrogate key
    tests:
    - not_null
  - name: refunded_address_id
    description: Refunded address surrogate key
    tests:
    - not_null
  - name: returning_customer_id
    description: Returning customer surrogate key
    tests:
    - not_null
  - name: returning_customer_demo_id
    description: Returning customer demographics surrogate key
    tests:
    - not_null
  - name: returning_household_demo_id
    description: Returning household demographics surrogate key
    tests:
    - not_null
  - name: returning_address_id
    description: Returning address surrogate key
    tests:
    - not_null
  - name: call_center_id
    description: Call center surrogate key
    tests:
    - not_null
  - name: catalog_page_id
    description: Catalog page surrogate key
    tests:
    - not_null
  - name: shipping_mode_id
    description: Shipping mode surrogate key
    tests:
    - not_null
  - name: warehouse_id
    description: Warehouse surrogate key
    tests:
    - not_null
  - name: return_reason_id
    description: Return reason surrogate key
    tests:
    - not_null
  - name: order_number
    description: Original order number
    tests:
    - not_null
  - name: return_quantity
    description: Quantity of items returned
    tests:
    - not_null
  - name: return_amount
    description: Return amount before tax
    tests:
    - not_null
  - name: return_tax
    description: Tax amount for the return
    tests:
    - not_null
  - name: return_amount_with_tax
    description: Return amount including tax
    tests:
    - not_null
  - name: return_fee
    description: Fee associated with the return
    tests:
    - not_null
  - name: return_shipping_cost
    description: Shipping cost for the return
    tests:
    - not_null
  - name: refunded_cash
    description: Amount refunded in cash
    tests:
    - not_null
  - name: reversed_charge
    description: Amount of reversed charges
    tests:
    - not_null
  - name: store_credit
    description: Store credit issued for the return
    tests:
    - not_null
  - name: net_loss
    description: Net loss from the return
    tests:
    - not_null

stg_date_dim (first 100 rows)

date_sk date_id month_seq week_seq quarter_seq D_YEAR day_of_week month_of_year day_of_month quarter_of_year fiscal_year fiscal_quarter_seq fiscal_week_seq day_name quarter_name first_day_of_month last_day_of_month same_day_last_year same_day_last_quarter D_DATE is_current_day is_current_month is_current_quarter is_current_week is_current_year is_following_holiday is_holiday is_weekend
0 2415022 AAAAAAAAOKJNECAA 0 1 1 1900 1 1 2 1 1900 1 1 Monday 1900Q1 2415021 2415020 2414657 2414930 1900-01-02 False False False False False True False False
1 2415023 AAAAAAAAPKJNECAA 0 1 1 1900 2 1 3 1 1900 1 1 Tuesday 1900Q1 2415021 2415020 2414658 2414931 1900-01-03 False False False False False False False False
2 2415024 AAAAAAAAALJNECAA 0 1 1 1900 3 1 4 1 1900 1 1 Wednesday 1900Q1 2415021 2415020 2414659 2414932 1900-01-04 False False False False False False False False
3 2415025 AAAAAAAABLJNECAA 0 1 1 1900 4 1 5 1 1900 1 1 Thursday 1900Q1 2415021 2415020 2414660 2414933 1900-01-05 False False False False False False False False
4 2415026 AAAAAAAACLJNECAA 0 1 1 1900 5 1 6 1 1900 1 1 Friday 1900Q1 2415021 2415020 2414661 2414934 1900-01-06 False False False False False False False True
5 2415027 AAAAAAAADLJNECAA 0 1 1 1900 6 1 7 1 1900 1 1 Saturday 1900Q1 2415021 2415020 2414662 2414935 1900-01-07 False False False False False False False True
6 2415028 AAAAAAAAELJNECAA 0 1 1 1900 0 1 8 1 1900 1 1 Sunday 1900Q1 2415021 2415020 2414663 2414936 1900-01-08 False False False False False False False False
7 2415029 AAAAAAAAFLJNECAA 0 2 1 1900 1 1 9 1 1900 1 2 Monday 1900Q1 2415021 2415020 2414664 2414937 1900-01-09 False False False False False False False False
8 2415030 AAAAAAAAGLJNECAA 0 2 1 1900 2 1 10 1 1900 1 2 Tuesday 1900Q1 2415021 2415020 2414665 2414938 1900-01-10 False False False False False False False False
9 2415031 AAAAAAAAHLJNECAA 0 2 1 1900 3 1 11 1 1900 1 2 Wednesday 1900Q1 2415021 2415020 2414666 2414939 1900-01-11 False False False False False False False False
10 2415032 AAAAAAAAILJNECAA 0 2 1 1900 4 1 12 1 1900 1 2 Thursday 1900Q1 2415021 2415020 2414667 2414940 1900-01-12 False False False False False False False False
11 2415033 AAAAAAAAJLJNECAA 0 2 1 1900 5 1 13 1 1900 1 2 Friday 1900Q1 2415021 2415020 2414668 2414941 1900-01-13 False False False False False False False True
12 2415034 AAAAAAAAKLJNECAA 0 2 1 1900 6 1 14 1 1900 1 2 Saturday 1900Q1 2415021 2415020 2414669 2414942 1900-01-14 False False False False False False False True
13 2415035 AAAAAAAALLJNECAA 0 2 1 1900 0 1 15 1 1900 1 2 Sunday 1900Q1 2415021 2415020 2414670 2414943 1900-01-15 False False False False False False False False
14 2415036 AAAAAAAAMLJNECAA 0 3 1 1900 1 1 16 1 1900 1 3 Monday 1900Q1 2415021 2415020 2414671 2414944 1900-01-16 False False False False False False False False
15 2415037 AAAAAAAANLJNECAA 0 3 1 1900 2 1 17 1 1900 1 3 Tuesday 1900Q1 2415021 2415020 2414672 2414945 1900-01-17 False False False False False False False False
16 2415038 AAAAAAAAOLJNECAA 0 3 1 1900 3 1 18 1 1900 1 3 Wednesday 1900Q1 2415021 2415020 2414673 2414946 1900-01-18 False False False False False False False False
17 2415039 AAAAAAAAPLJNECAA 0 3 1 1900 4 1 19 1 1900 1 3 Thursday 1900Q1 2415021 2415020 2414674 2414947 1900-01-19 False False False False False False False False
18 2415040 AAAAAAAAAMJNECAA 0 3 1 1900 5 1 20 1 1900 1 3 Friday 1900Q1 2415021 2415020 2414675 2414948 1900-01-20 False False False False False False False True
19 2415041 AAAAAAAABMJNECAA 0 3 1 1900 6 1 21 1 1900 1 3 Saturday 1900Q1 2415021 2415020 2414676 2414949 1900-01-21 False False False False False False False True
20 2415042 AAAAAAAACMJNECAA 0 3 1 1900 0 1 22 1 1900 1 3 Sunday 1900Q1 2415021 2415020 2414677 2414950 1900-01-22 False False False False False False False False
21 2415043 AAAAAAAADMJNECAA 0 4 1 1900 1 1 23 1 1900 1 4 Monday 1900Q1 2415021 2415020 2414678 2414951 1900-01-23 False False False False False False False False
22 2415044 AAAAAAAAEMJNECAA 0 4 1 1900 2 1 24 1 1900 1 4 Tuesday 1900Q1 2415021 2415020 2414679 2414952 1900-01-24 False False False False False False False False
23 2415045 AAAAAAAAFMJNECAA 0 4 1 1900 3 1 25 1 1900 1 4 Wednesday 1900Q1 2415021 2415020 2414680 2414953 1900-01-25 False False False False False False False False
24 2415046 AAAAAAAAGMJNECAA 0 4 1 1900 4 1 26 1 1900 1 4 Thursday 1900Q1 2415021 2415020 2414681 2414954 1900-01-26 False False False False False False False False
25 2415047 AAAAAAAAHMJNECAA 0 4 1 1900 5 1 27 1 1900 1 4 Friday 1900Q1 2415021 2415020 2414682 2414955 1900-01-27 False False False False False False False True
26 2415048 AAAAAAAAIMJNECAA 0 4 1 1900 6 1 28 1 1900 1 4 Saturday 1900Q1 2415021 2415020 2414683 2414956 1900-01-28 False False False False False False False True
27 2415049 AAAAAAAAJMJNECAA 0 4 1 1900 0 1 29 1 1900 1 4 Sunday 1900Q1 2415021 2415020 2414684 2414957 1900-01-29 False False False False False False False False
28 2415050 AAAAAAAAKMJNECAA 0 5 1 1900 1 1 30 1 1900 1 5 Monday 1900Q1 2415021 2415020 2414685 2414958 1900-01-30 False False False False False False False False
29 2415051 AAAAAAAALMJNECAA 0 5 1 1900 2 1 31 1 1900 1 5 Tuesday 1900Q1 2415021 2415020 2414686 2414959 1900-01-31 False False False False False False False False
30 2415052 AAAAAAAAMMJNECAA 1 5 1 1900 3 2 1 1 1900 1 5 Wednesday 1900Q1 2415052 2415082 2414687 2414960 1900-02-01 False False False False False False False False
31 2415053 AAAAAAAANMJNECAA 1 5 1 1900 4 2 2 1 1900 1 5 Thursday 1900Q1 2415052 2415082 2414688 2414961 1900-02-02 False False False False False False False False
32 2415054 AAAAAAAAOMJNECAA 1 5 1 1900 5 2 3 1 1900 1 5 Friday 1900Q1 2415052 2415082 2414689 2414962 1900-02-03 False False False False False False False True
33 2415055 AAAAAAAAPMJNECAA 1 5 1 1900 6 2 4 1 1900 1 5 Saturday 1900Q1 2415052 2415082 2414690 2414963 1900-02-04 False False False False False False False True
34 2415056 AAAAAAAAANJNECAA 1 5 1 1900 0 2 5 1 1900 1 5 Sunday 1900Q1 2415052 2415082 2414691 2414964 1900-02-05 False False False False False False False False
35 2415057 AAAAAAAABNJNECAA 1 6 1 1900 1 2 6 1 1900 1 6 Monday 1900Q1 2415052 2415082 2414692 2414965 1900-02-06 False False False False False False False False
36 2415058 AAAAAAAACNJNECAA 1 6 1 1900 2 2 7 1 1900 1 6 Tuesday 1900Q1 2415052 2415082 2414693 2414966 1900-02-07 False False False False False False False False
37 2415059 AAAAAAAADNJNECAA 1 6 1 1900 3 2 8 1 1900 1 6 Wednesday 1900Q1 2415052 2415082 2414694 2414967 1900-02-08 False False False False False False False False
38 2415060 AAAAAAAAENJNECAA 1 6 1 1900 4 2 9 1 1900 1 6 Thursday 1900Q1 2415052 2415082 2414695 2414968 1900-02-09 False False False False False False False False
39 2415061 AAAAAAAAFNJNECAA 1 6 1 1900 5 2 10 1 1900 1 6 Friday 1900Q1 2415052 2415082 2414696 2414969 1900-02-10 False False False False False False False True
40 2415062 AAAAAAAAGNJNECAA 1 6 1 1900 6 2 11 1 1900 1 6 Saturday 1900Q1 2415052 2415082 2414697 2414970 1900-02-11 False False False False False False False True
41 2415063 AAAAAAAAHNJNECAA 1 6 1 1900 0 2 12 1 1900 1 6 Sunday 1900Q1 2415052 2415082 2414698 2414971 1900-02-12 False False False False False False False False
42 2415064 AAAAAAAAINJNECAA 1 7 1 1900 1 2 13 1 1900 1 7 Monday 1900Q1 2415052 2415082 2414699 2414972 1900-02-13 False False False False False False False False
43 2415065 AAAAAAAAJNJNECAA 1 7 1 1900 2 2 14 1 1900 1 7 Tuesday 1900Q1 2415052 2415082 2414700 2414973 1900-02-14 False False False False False False False False
44 2415066 AAAAAAAAKNJNECAA 1 7 1 1900 3 2 15 1 1900 1 7 Wednesday 1900Q1 2415052 2415082 2414701 2414974 1900-02-15 False False False False False False False False
45 2415067 AAAAAAAALNJNECAA 1 7 1 1900 4 2 16 1 1900 1 7 Thursday 1900Q1 2415052 2415082 2414702 2414975 1900-02-16 False False False False False False False False
46 2415068 AAAAAAAAMNJNECAA 1 7 1 1900 5 2 17 1 1900 1 7 Friday 1900Q1 2415052 2415082 2414703 2414976 1900-02-17 False False False False False False False True
47 2415069 AAAAAAAANNJNECAA 1 7 1 1900 6 2 18 1 1900 1 7 Saturday 1900Q1 2415052 2415082 2414704 2414977 1900-02-18 False False False False False False False True
48 2415070 AAAAAAAAONJNECAA 1 7 1 1900 0 2 19 1 1900 1 7 Sunday 1900Q1 2415052 2415082 2414705 2414978 1900-02-19 False False False False False False False False
49 2415071 AAAAAAAAPNJNECAA 1 8 1 1900 1 2 20 1 1900 1 8 Monday 1900Q1 2415052 2415082 2414706 2414979 1900-02-20 False False False False False False False False
50 2415072 AAAAAAAAAOJNECAA 1 8 1 1900 2 2 21 1 1900 1 8 Tuesday 1900Q1 2415052 2415082 2414707 2414980 1900-02-21 False False False False False False False False
51 2415073 AAAAAAAABOJNECAA 1 8 1 1900 3 2 22 1 1900 1 8 Wednesday 1900Q1 2415052 2415082 2414708 2414981 1900-02-22 False False False False False False False False
52 2415074 AAAAAAAACOJNECAA 1 8 1 1900 4 2 23 1 1900 1 8 Thursday 1900Q1 2415052 2415082 2414709 2414982 1900-02-23 False False False False False False False False
53 2415075 AAAAAAAADOJNECAA 1 8 1 1900 5 2 24 1 1900 1 8 Friday 1900Q1 2415052 2415082 2414710 2414983 1900-02-24 False False False False False False False True
54 2415076 AAAAAAAAEOJNECAA 1 8 1 1900 6 2 25 1 1900 1 8 Saturday 1900Q1 2415052 2415082 2414711 2414984 1900-02-25 False False False False False False False True
55 2415077 AAAAAAAAFOJNECAA 1 8 1 1900 0 2 26 1 1900 1 8 Sunday 1900Q1 2415052 2415082 2414712 2414985 1900-02-26 False False False False False False False False
56 2415078 AAAAAAAAGOJNECAA 1 9 1 1900 1 2 27 1 1900 1 9 Monday 1900Q1 2415052 2415082 2414713 2414986 1900-02-27 False False False False False False False False
57 2415079 AAAAAAAAHOJNECAA 1 9 1 1900 2 2 28 1 1900 1 9 Tuesday 1900Q1 2415052 2415082 2414714 2414987 1900-02-28 False False False False False False False False
58 2415080 AAAAAAAAIOJNECAA 2 9 2 1900 4 3 1 1 1900 2 9 Thursday 1900Q1 2415080 2415139 2414715 2414988 1900-03-01 False False False False False False False False
59 2415081 AAAAAAAAJOJNECAA 2 9 2 1900 5 3 2 1 1900 2 9 Friday 1900Q1 2415080 2415139 2414716 2414989 1900-03-02 False False False False False False False True
60 2415082 AAAAAAAAKOJNECAA 2 9 2 1900 6 3 3 1 1900 2 9 Saturday 1900Q1 2415080 2415139 2414717 2414990 1900-03-03 False False False False False False False True
61 2415083 AAAAAAAALOJNECAA 2 9 2 1900 0 3 4 1 1900 2 9 Sunday 1900Q1 2415080 2415139 2414718 2414991 1900-03-04 False False False False False False False False
62 2415084 AAAAAAAAMOJNECAA 2 9 2 1900 1 3 5 1 1900 2 9 Monday 1900Q1 2415080 2415139 2414719 2414992 1900-03-05 False False False False False False False False
63 2415085 AAAAAAAANOJNECAA 2 10 2 1900 2 3 6 1 1900 2 10 Tuesday 1900Q1 2415080 2415139 2414720 2414993 1900-03-06 False False False False False False False False
64 2415086 AAAAAAAAOOJNECAA 2 10 2 1900 3 3 7 1 1900 2 10 Wednesday 1900Q1 2415080 2415139 2414721 2414994 1900-03-07 False False False False False False False False
65 2415087 AAAAAAAAPOJNECAA 2 10 2 1900 4 3 8 1 1900 2 10 Thursday 1900Q1 2415080 2415139 2414722 2414995 1900-03-08 False False False False False False False False
66 2415088 AAAAAAAAAPJNECAA 2 10 2 1900 5 3 9 1 1900 2 10 Friday 1900Q1 2415080 2415139 2414723 2414996 1900-03-09 False False False False False False False True
67 2415089 AAAAAAAABPJNECAA 2 10 2 1900 6 3 10 1 1900 2 10 Saturday 1900Q1 2415080 2415139 2414724 2414997 1900-03-10 False False False False False False False True
68 2415090 AAAAAAAACPJNECAA 2 10 2 1900 0 3 11 1 1900 2 10 Sunday 1900Q1 2415080 2415139 2414725 2414998 1900-03-11 False False False False False False False False
69 2415091 AAAAAAAADPJNECAA 2 10 2 1900 1 3 12 1 1900 2 10 Monday 1900Q1 2415080 2415139 2414726 2414999 1900-03-12 False False False False False False False False
70 2415092 AAAAAAAAEPJNECAA 2 11 2 1900 2 3 13 1 1900 2 11 Tuesday 1900Q1 2415080 2415139 2414727 2415000 1900-03-13 False False False False False False False False
71 2415093 AAAAAAAAFPJNECAA 2 11 2 1900 3 3 14 1 1900 2 11 Wednesday 1900Q1 2415080 2415139 2414728 2415001 1900-03-14 False False False False False False False False
72 2415094 AAAAAAAAGPJNECAA 2 11 2 1900 4 3 15 1 1900 2 11 Thursday 1900Q1 2415080 2415139 2414729 2415002 1900-03-15 False False False False False False False False
73 2415095 AAAAAAAAHPJNECAA 2 11 2 1900 5 3 16 1 1900 2 11 Friday 1900Q1 2415080 2415139 2414730 2415003 1900-03-16 False False False False False False False True
74 2415096 AAAAAAAAIPJNECAA 2 11 2 1900 6 3 17 1 1900 2 11 Saturday 1900Q1 2415080 2415139 2414731 2415004 1900-03-17 False False False False False False False True
75 2415097 AAAAAAAAJPJNECAA 2 11 2 1900 0 3 18 1 1900 2 11 Sunday 1900Q1 2415080 2415139 2414732 2415005 1900-03-18 False False False False False False False False
76 2415098 AAAAAAAAKPJNECAA 2 11 2 1900 1 3 19 1 1900 2 11 Monday 1900Q1 2415080 2415139 2414733 2415006 1900-03-19 False False False False False False False False
77 2415099 AAAAAAAALPJNECAA 2 12 2 1900 2 3 20 1 1900 2 12 Tuesday 1900Q1 2415080 2415139 2414734 2415007 1900-03-20 False False False False False False False False
78 2415100 AAAAAAAAMPJNECAA 2 12 2 1900 3 3 21 1 1900 2 12 Wednesday 1900Q1 2415080 2415139 2414735 2415008 1900-03-21 False False False False False False False False
79 2415101 AAAAAAAANPJNECAA 2 12 2 1900 4 3 22 1 1900 2 12 Thursday 1900Q1 2415080 2415139 2414736 2415009 1900-03-22 False False False False False False False False
80 2415102 AAAAAAAAOPJNECAA 2 12 2 1900 5 3 23 1 1900 2 12 Friday 1900Q1 2415080 2415139 2414737 2415010 1900-03-23 False False False False False False False True
81 2415103 AAAAAAAAPPJNECAA 2 12 2 1900 6 3 24 1 1900 2 12 Saturday 1900Q1 2415080 2415139 2414738 2415011 1900-03-24 False False False False False False False True
82 2415104 AAAAAAAAAAKNECAA 2 12 2 1900 0 3 25 1 1900 2 12 Sunday 1900Q1 2415080 2415139 2414739 2415012 1900-03-25 False False False False False False False False
83 2415105 AAAAAAAABAKNECAA 2 12 2 1900 1 3 26 1 1900 2 12 Monday 1900Q1 2415080 2415139 2414740 2415013 1900-03-26 False False False False False False False False
84 2415106 AAAAAAAACAKNECAA 2 13 2 1900 2 3 27 1 1900 2 13 Tuesday 1900Q1 2415080 2415139 2414741 2415014 1900-03-27 False False False False False False False False
85 2415107 AAAAAAAADAKNECAA 2 13 2 1900 3 3 28 1 1900 2 13 Wednesday 1900Q1 2415080 2415139 2414742 2415015 1900-03-28 False False False False False False False False
86 2415108 AAAAAAAAEAKNECAA 2 13 2 1900 4 3 29 1 1900 2 13 Thursday 1900Q1 2415080 2415139 2414743 2415016 1900-03-29 False False False False False False False False
87 2415109 AAAAAAAAFAKNECAA 2 13 2 1900 5 3 30 1 1900 2 13 Friday 1900Q1 2415080 2415139 2414744 2415017 1900-03-30 False False False False False False False True
88 2415110 AAAAAAAAGAKNECAA 2 13 2 1900 6 3 31 1 1900 2 13 Saturday 1900Q1 2415080 2415139 2414745 2415018 1900-03-31 False False False False False False False True
89 2415111 AAAAAAAAHAKNECAA 3 13 2 1900 0 4 1 2 1900 2 13 Sunday 1900Q2 2415111 2415201 2414746 2415021 1900-04-01 False False False False False False False False
90 2415112 AAAAAAAAIAKNECAA 3 13 2 1900 1 4 2 2 1900 2 13 Monday 1900Q2 2415111 2415201 2414747 2415022 1900-04-02 False False False False False False False False
91 2415113 AAAAAAAAJAKNECAA 3 14 2 1900 2 4 3 2 1900 2 14 Tuesday 1900Q2 2415111 2415201 2414748 2415023 1900-04-03 False False False False False False False False
92 2415114 AAAAAAAAKAKNECAA 3 14 2 1900 3 4 4 2 1900 2 14 Wednesday 1900Q2 2415111 2415201 2414749 2415024 1900-04-04 False False False False False False False False
93 2415115 AAAAAAAALAKNECAA 3 14 2 1900 4 4 5 2 1900 2 14 Thursday 1900Q2 2415111 2415201 2414750 2415025 1900-04-05 False False False False False False False False
94 2415116 AAAAAAAAMAKNECAA 3 14 2 1900 5 4 6 2 1900 2 14 Friday 1900Q2 2415111 2415201 2414751 2415026 1900-04-06 False False False False False False False True
95 2415117 AAAAAAAANAKNECAA 3 14 2 1900 6 4 7 2 1900 2 14 Saturday 1900Q2 2415111 2415201 2414752 2415027 1900-04-07 False False False False False False False True
96 2415118 AAAAAAAAOAKNECAA 3 14 2 1900 0 4 8 2 1900 2 14 Sunday 1900Q2 2415111 2415201 2414753 2415028 1900-04-08 False False False False False False False False
97 2415119 AAAAAAAAPAKNECAA 3 14 2 1900 1 4 9 2 1900 2 14 Monday 1900Q2 2415111 2415201 2414754 2415029 1900-04-09 False False False False False False False False
98 2415120 AAAAAAAAABKNECAA 3 15 2 1900 2 4 10 2 1900 2 15 Tuesday 1900Q2 2415111 2415201 2414755 2415030 1900-04-10 False False False False False False False False

stg_date_dim.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"date_dim_renamed" AS (
    -- Rename: Renaming columns
    -- D_DATE_SK -> date_sk
    -- D_DATE_ID -> date_id
    -- D_MONTH_SEQ -> month_seq
    -- D_WEEK_SEQ -> week_seq
    -- D_QUARTER_SEQ -> quarter_seq
    -- D_DOW -> day_of_week
    -- D_MOY -> month_of_year
    -- D_DOM -> day_of_month
    -- D_QOY -> quarter_of_year
    -- D_FY_YEAR -> fiscal_year
    -- D_FY_QUARTER_SEQ -> fiscal_quarter_seq
    -- D_FY_WEEK_SEQ -> fiscal_week_seq
    -- D_DAY_NAME -> day_name
    -- D_QUARTER_NAME -> quarter_name
    -- D_HOLIDAY -> is_holiday
    -- D_WEEKEND -> is_weekend
    -- D_FOLLOWING_HOLIDAY -> is_following_holiday
    -- D_FIRST_DOM -> first_day_of_month
    -- D_LAST_DOM -> last_day_of_month
    -- D_SAME_DAY_LY -> same_day_last_year
    -- D_SAME_DAY_LQ -> same_day_last_quarter
    -- D_CURRENT_DAY -> is_current_day
    -- D_CURRENT_WEEK -> is_current_week
    -- D_CURRENT_MONTH -> is_current_month
    -- D_CURRENT_QUARTER -> is_current_quarter
    -- D_CURRENT_YEAR -> is_current_year
    SELECT 
        "D_DATE_SK" AS "date_sk",
        "D_DATE_ID" AS "date_id",
        "D_DATE",
        "D_MONTH_SEQ" AS "month_seq",
        "D_WEEK_SEQ" AS "week_seq",
        "D_QUARTER_SEQ" AS "quarter_seq",
        "D_YEAR",
        "D_DOW" AS "day_of_week",
        "D_MOY" AS "month_of_year",
        "D_DOM" AS "day_of_month",
        "D_QOY" AS "quarter_of_year",
        "D_FY_YEAR" AS "fiscal_year",
        "D_FY_QUARTER_SEQ" AS "fiscal_quarter_seq",
        "D_FY_WEEK_SEQ" AS "fiscal_week_seq",
        "D_DAY_NAME" AS "day_name",
        "D_QUARTER_NAME" AS "quarter_name",
        "D_HOLIDAY" AS "is_holiday",
        "D_WEEKEND" AS "is_weekend",
        "D_FOLLOWING_HOLIDAY" AS "is_following_holiday",
        "D_FIRST_DOM" AS "first_day_of_month",
        "D_LAST_DOM" AS "last_day_of_month",
        "D_SAME_DAY_LY" AS "same_day_last_year",
        "D_SAME_DAY_LQ" AS "same_day_last_quarter",
        "D_CURRENT_DAY" AS "is_current_day",
        "D_CURRENT_WEEK" AS "is_current_week",
        "D_CURRENT_MONTH" AS "is_current_month",
        "D_CURRENT_QUARTER" AS "is_current_quarter",
        "D_CURRENT_YEAR" AS "is_current_year"
    FROM "date_dim"
),

"date_dim_renamed_casted" AS (
    -- Column Type Casting: 
    -- D_DATE: from VARCHAR to DATE
    -- is_current_day: from VARCHAR to BOOLEAN
    -- is_current_month: from VARCHAR to BOOLEAN
    -- is_current_quarter: from VARCHAR to BOOLEAN
    -- is_current_week: from VARCHAR to BOOLEAN
    -- is_current_year: from VARCHAR to BOOLEAN
    -- is_following_holiday: from VARCHAR to BOOLEAN
    -- is_holiday: from VARCHAR to BOOLEAN
    -- is_weekend: from VARCHAR to BOOLEAN
    SELECT
        "date_sk",
        "date_id",
        "month_seq",
        "week_seq",
        "quarter_seq",
        "D_YEAR",
        "day_of_week",
        "month_of_year",
        "day_of_month",
        "quarter_of_year",
        "fiscal_year",
        "fiscal_quarter_seq",
        "fiscal_week_seq",
        "day_name",
        "quarter_name",
        "first_day_of_month",
        "last_day_of_month",
        "same_day_last_year",
        "same_day_last_quarter",
        CAST("D_DATE" AS DATE) AS "D_DATE",
        CASE WHEN "is_current_day" = 'N' THEN FALSE ELSE TRUE END AS "is_current_day",
        CAST(CASE WHEN "is_current_month" = 'N' THEN FALSE ELSE TRUE END AS BOOLEAN) AS "is_current_month",
        CASE WHEN "is_current_quarter" = 'N' THEN FALSE ELSE TRUE END AS "is_current_quarter",
        CASE WHEN "is_current_week" = 'N' THEN FALSE ELSE TRUE END AS "is_current_week",
        CASE WHEN "is_current_year" = 'N' THEN FALSE ELSE TRUE END AS "is_current_year",
        CAST(CASE WHEN "is_following_holiday" = 'Y' THEN true WHEN "is_following_holiday" = 'N' THEN false END AS BOOLEAN) AS "is_following_holiday",
        CASE WHEN "is_holiday" = 'N' THEN FALSE ELSE TRUE END AS "is_holiday",
        CASE 
            WHEN "is_weekend" = 'Y' THEN TRUE
            WHEN "is_weekend" = 'N' THEN FALSE
            ELSE NULL
        END AS "is_weekend"
    FROM "date_dim_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "date_dim_renamed_casted"

stg_date_dim.yml (Document the table)

version: 2
models:
- name: stg_date_dim
  description: The table is about date dimensions. It contains various attributes
    of dates, including date key, full date, year, month, day of week, quarter, fiscal
    year details, holiday indicators, and flags for current periods. This table is
    likely used as a dimension table in a data warehouse for time-based analysis and
    reporting.
  columns:
  - name: date_sk
    description: Surrogate key for the date
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column represents a surrogate key for the date. For this table,
        each row represents a unique date. The date_sk appears to be a unique identifier
        for each date, incrementing by 1 for each consecutive day.
  - name: date_id
    description: Unique identifier for the date
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for the date. It
        appears to be an alphanumeric code that uniquely identifies each date in the
        table.
  - name: month_seq
    description: Month sequence number
    tests:
    - not_null
  - name: week_seq
    description: Week sequence number
    tests:
    - not_null
  - name: quarter_seq
    description: Quarter sequence number
    tests:
    - not_null
  - name: D_YEAR
    description: Year in YYYY format
    tests:
    - not_null
  - name: day_of_week
    description: Day of the week (1-7)
    tests:
    - not_null
  - name: month_of_year
    description: Month of the year (1-12)
    tests:
    - not_null
  - name: day_of_month
    description: Day of the month (1-31)
    tests:
    - not_null
  - name: quarter_of_year
    description: Quarter of the year (1-4)
    tests:
    - not_null
  - name: fiscal_year
    description: Fiscal year
    tests:
    - not_null
  - name: fiscal_quarter_seq
    description: Fiscal year quarter sequence
    tests:
    - not_null
  - name: fiscal_week_seq
    description: Fiscal year week sequence
    tests:
    - not_null
  - name: day_name
    description: Name of the day of the week
    tests:
    - not_null
    - accepted_values:
        values:
        - Monday
        - Tuesday
        - Friday
        - Saturday
        - Sunday
        - Thursday
        - Wednesday
  - name: quarter_name
    description: Name of the quarter (e.g., 1900Q1)
    tests:
    - not_null
  - name: first_day_of_month
    description: First day of the month
    tests:
    - not_null
  - name: last_day_of_month
    description: Last day of the month
    tests:
    - not_null
  - name: same_day_last_year
    description: Date of the same day in last year
    tests:
    - not_null
  - name: same_day_last_quarter
    description: Date of the same day in last quarter
    tests:
    - not_null
  - name: D_DATE
    description: Full date in YYYY-MM-DD format
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column represents the full date in YYYY-MM-DD format. For this
        table, where each row represents a unique date, the D_DATE column uniquely
        identifies each row.
  - name: is_current_day
    description: Flag indicating if it's the current day
    tests:
    - not_null
  - name: is_current_month
    description: Flag indicating if it's the current month
    tests:
    - not_null
  - name: is_current_quarter
    description: Flag indicating if it's the current quarter
    tests:
    - not_null
  - name: is_current_week
    description: Flag indicating if it's the current week
    tests:
    - not_null
  - name: is_current_year
    description: Flag indicating if it's the current year
    tests:
    - not_null
  - name: is_following_holiday
    description: Flag indicating if following day is a holiday
    tests:
    - not_null
  - name: is_holiday
    description: Flag indicating if it's a holiday
    tests:
    - not_null
  - name: is_weekend
    description: Flag indicating if it's a weekend
    tests:
    - not_null

stg_income_band (first 100 rows)

income_band_id lower_income_limit upper_income_limit
0 1 0 10000
1 2 10001 20000
2 3 20001 30000
3 4 30001 40000
4 5 40001 50000
5 6 50001 60000
6 7 60001 70000
7 8 70001 80000
8 9 80001 90000
9 10 90001 100000
10 11 100001 110000
11 12 110001 120000
12 13 120001 130000
13 14 130001 140000
14 15 140001 150000
15 16 150001 160000
16 17 160001 170000
17 18 170001 180000
18 19 180001 190000
19 20 190001 200000

stg_income_band.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"income_band_renamed" AS (
    -- Rename: Renaming columns
    -- IB_INCOME_BAND_SK -> income_band_id
    -- IB_LOWER_BOUND -> lower_income_limit
    -- IB_UPPER_BOUND -> upper_income_limit
    SELECT 
        "IB_INCOME_BAND_SK" AS "income_band_id",
        "IB_LOWER_BOUND" AS "lower_income_limit",
        "IB_UPPER_BOUND" AS "upper_income_limit"
    FROM "income_band"
)

-- COCOON BLOCK END
SELECT * FROM "income_band_renamed"

stg_income_band.yml (Document the table)

version: 2
models:
- name: stg_income_band
  description: The table is about income bands. It defines different ranges of income.
    Each row represents a specific income band. The table includes a unique identifier
    for each band. It also shows the lower and upper bounds of income for each band.
    The bands are sequential and non-overlapping.
  columns:
  - name: income_band_id
    description: Unique identifier for each income band
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a unique identifier for each income band. For this
        table, each row represents a specific income band, and income_band_id is unique
        across rows.
  - name: lower_income_limit
    description: Minimum income value for the band
    tests:
    - not_null
  - name: upper_income_limit
    description: Maximum income value for the band
    tests:
    - not_null

stg_call_center (first 100 rows)

call_center_name suite_number street_name street_type size_class open_date_key company_id state manager_name square_footage call_center_surrogate_key operating_hours division_name county market_manager_name company_name employee_count city country market_id division_id tax_percentage call_center_id call_center_zip_code closed_date_key gmt_offset record_end_date record_start_date street_number
0 NY Metro Suite 0 Ash Hill Boulevard large 2450952 6 TN Bob Belcher 1138 1 8AM-4PM pri Williamson County Julius Tran cally 2 Midway United States 6 3 0.11 AAAAAAAABAAAAAAA 31904 None -5.0 NaT 1998-01-01 730
1 Mid Atlantic Suite 70 Center Hill Way medium 2450806 1 TN Felipe Perkins 2268 2 24 hours anti Williamson County Julius Durham ought 6 Midway United States 2 5 0.12 AAAAAAAACAAAAAAA 31904 None -5.0 2000-12-31 1998-01-01 984

stg_call_center.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"call_center_renamed" AS (
    -- Rename: Renaming columns
    -- CC_CALL_CENTER_SK -> call_center_surrogate_key
    -- CC_CALL_CENTER_ID -> call_center_id
    -- CC_REC_START_DATE -> record_start_date
    -- CC_REC_END_DATE -> record_end_date
    -- CC_CLOSED_DATE_SK -> closed_date_key
    -- CC_OPEN_DATE_SK -> open_date_key
    -- CC_NAME -> call_center_name
    -- CC_CLASS -> size_class
    -- CC_EMPLOYEES -> employee_count
    -- CC_SQ_FT -> square_footage
    -- CC_HOURS -> operating_hours
    -- CC_MANAGER -> manager_name
    -- CC_MKT_ID -> market_id
    -- CC_MKT_CLASS -> market_class
    -- CC_MKT_DESC -> market_description
    -- CC_MARKET_MANAGER -> market_manager_name
    -- CC_DIVISION -> division_id
    -- CC_DIVISION_NAME -> division_name
    -- CC_COMPANY -> company_id
    -- CC_COMPANY_NAME -> company_name
    -- CC_STREET_NUMBER -> street_number
    -- CC_STREET_NAME -> street_name
    -- CC_STREET_TYPE -> street_type
    -- CC_SUITE_NUMBER -> suite_number
    -- CC_CITY -> city
    -- CC_COUNTY -> county
    -- CC_STATE -> state
    -- CC_ZIP -> call_center_zip_code
    -- CC_COUNTRY -> country
    -- CC_GMT_OFFSET -> gmt_offset
    -- CC_TAX_PERCENTAGE -> tax_percentage
    SELECT 
        "CC_CALL_CENTER_SK" AS "call_center_surrogate_key",
        "CC_CALL_CENTER_ID" AS "call_center_id",
        "CC_REC_START_DATE" AS "record_start_date",
        "CC_REC_END_DATE" AS "record_end_date",
        "CC_CLOSED_DATE_SK" AS "closed_date_key",
        "CC_OPEN_DATE_SK" AS "open_date_key",
        "CC_NAME" AS "call_center_name",
        "CC_CLASS" AS "size_class",
        "CC_EMPLOYEES" AS "employee_count",
        "CC_SQ_FT" AS "square_footage",
        "CC_HOURS" AS "operating_hours",
        "CC_MANAGER" AS "manager_name",
        "CC_MKT_ID" AS "market_id",
        "CC_MKT_CLASS" AS "market_class",
        "CC_MKT_DESC" AS "market_description",
        "CC_MARKET_MANAGER" AS "market_manager_name",
        "CC_DIVISION" AS "division_id",
        "CC_DIVISION_NAME" AS "division_name",
        "CC_COMPANY" AS "company_id",
        "CC_COMPANY_NAME" AS "company_name",
        "CC_STREET_NUMBER" AS "street_number",
        "CC_STREET_NAME" AS "street_name",
        "CC_STREET_TYPE" AS "street_type",
        "CC_SUITE_NUMBER" AS "suite_number",
        "CC_CITY" AS "city",
        "CC_COUNTY" AS "county",
        "CC_STATE" AS "state",
        "CC_ZIP" AS "call_center_zip_code",
        "CC_COUNTRY" AS "country",
        "CC_GMT_OFFSET" AS "gmt_offset",
        "CC_TAX_PERCENTAGE" AS "tax_percentage"
    FROM "call_center"
),

"call_center_renamed_cleaned" AS (
    -- Clean unusual string values: 
    -- operating_hours: The problem is that '8AM-8AM' is an unusual representation for 24-hour operation. It's inconsistent with the more common format seen in '8AM-4PM'. The correct values should represent the actual operating hours clearly. For 24-hour operation, it's more standard to use '24 hours' or '12AM-11:59PM'. 
    -- market_class: The problem is that both values in the market_class column are incomplete phrases that do not represent clear market classifications. They appear to be truncated or partial sentences without any meaningful market categorization. The correct values for a market_class column should be concise, clear categories describing the market segment or classification. Since the existing values are meaningless in this context, they should be mapped to an empty string. 
    -- market_description: The problem is that both values in the market_description column are incomplete sentences with abrupt endings and lack clear meaning. They appear to be truncated or corrupted text that does not provide any useful information about market description. The correct approach is to map these meaningless values to empty strings. 
    SELECT
        "call_center_surrogate_key",
        "call_center_id",
        "record_start_date",
        "record_end_date",
        "closed_date_key",
        "open_date_key",
        "call_center_name",
        "size_class",
        "employee_count",
        "square_footage",
        CASE
            WHEN "operating_hours" = '8AM-8AM' THEN '24 hours'
            ELSE "operating_hours"
        END AS "operating_hours",
        "manager_name",
        "market_id",
        CASE
            WHEN "market_class" = 'A bit narrow forms matter animals. Consist' THEN ''
            WHEN "market_class" = 'More than other authori' THEN ''
            ELSE "market_class"
        END AS "market_class",
        CASE
            WHEN "market_description" = 'Largely blank years put substantially deaf, new others. Question' THEN ''
            WHEN "market_description" = 'Shared others could not count fully dollars. New members ca' THEN ''
            ELSE "market_description"
        END AS "market_description",
        "market_manager_name",
        "division_id",
        "division_name",
        "company_id",
        "company_name",
        "street_number",
        "street_name",
        "street_type",
        "suite_number",
        "city",
        "county",
        "state",
        "call_center_zip_code",
        "country",
        "gmt_offset",
        "tax_percentage"
    FROM "call_center_renamed"
),

"call_center_renamed_cleaned_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- market_class: ['']
    -- market_description: ['']
    SELECT 
        CASE
            WHEN "market_class" = '' THEN NULL
            ELSE "market_class"
        END AS "market_class",
        CASE
            WHEN "market_description" = '' THEN NULL
            ELSE "market_description"
        END AS "market_description",
        "call_center_name",
        "gmt_offset",
        "suite_number",
        "street_name",
        "street_type",
        "size_class",
        "open_date_key",
        "company_id",
        "state",
        "manager_name",
        "square_footage",
        "call_center_surrogate_key",
        "operating_hours",
        "division_name",
        "county",
        "record_end_date",
        "market_manager_name",
        "company_name",
        "closed_date_key",
        "employee_count",
        "call_center_zip_code",
        "record_start_date",
        "city",
        "street_number",
        "country",
        "market_id",
        "division_id",
        "tax_percentage",
        "call_center_id"
    FROM "call_center_renamed_cleaned"
),

"call_center_renamed_cleaned_null_casted" AS (
    -- Column Type Casting: 
    -- call_center_zip_code: from INT to VARCHAR
    -- closed_date_key: from DECIMAL to VARCHAR
    -- gmt_offset: from INT to DECIMAL
    -- record_end_date: from VARCHAR to DATE
    -- record_start_date: from VARCHAR to DATE
    -- street_number: from INT to VARCHAR
    SELECT
        "market_class",
        "market_description",
        "call_center_name",
        "suite_number",
        "street_name",
        "street_type",
        "size_class",
        "open_date_key",
        "company_id",
        "state",
        "manager_name",
        "square_footage",
        "call_center_surrogate_key",
        "operating_hours",
        "division_name",
        "county",
        "market_manager_name",
        "company_name",
        "employee_count",
        "city",
        "country",
        "market_id",
        "division_id",
        "tax_percentage",
        "call_center_id",
        CAST("call_center_zip_code" AS VARCHAR) AS "call_center_zip_code",
        CAST("closed_date_key" AS VARCHAR) AS "closed_date_key",
        CAST("gmt_offset" AS DECIMAL) AS "gmt_offset",
        CAST("record_end_date" AS DATE) AS "record_end_date",
        CAST("record_start_date" AS DATE) AS "record_start_date",
        CAST("street_number" AS VARCHAR) AS "street_number"
    FROM "call_center_renamed_cleaned_null"
),

"call_center_renamed_cleaned_null_casted_missing_handled" AS (
    -- Handling missing values: There are 3 columns with unacceptable missing values
    -- market_class has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- market_description has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- record_end_date has 50.0 percent missing. Strategy: 🔄 Unchanged
    SELECT
        "call_center_name",
        "suite_number",
        "street_name",
        "street_type",
        "size_class",
        "open_date_key",
        "company_id",
        "state",
        "manager_name",
        "square_footage",
        "call_center_surrogate_key",
        "operating_hours",
        "division_name",
        "county",
        "market_manager_name",
        "company_name",
        "employee_count",
        "city",
        "country",
        "market_id",
        "division_id",
        "tax_percentage",
        "call_center_id",
        "call_center_zip_code",
        "closed_date_key",
        "gmt_offset",
        "record_end_date",
        "record_start_date",
        "street_number"
    FROM "call_center_renamed_cleaned_null_casted"
)

-- COCOON BLOCK END
SELECT * FROM "call_center_renamed_cleaned_null_casted_missing_handled"

stg_call_center.yml (Document the table)

version: 2
models:
- name: stg_call_center
  description: The table contains details about call centers. It includes information
    such as unique identifiers, dates, physical attributes, operational details, management,
    location, and financial aspects. Each row represents a distinct call center with
    various attributes like size, number of employees, operating hours, market details,
    address, and tax information.
  columns:
  - name: call_center_name
    description: Name of the call center
    tests:
    - not_null
    - unique
    - accepted_values:
        values:
        - Mid Atlantic
        - NY Metro
        - New England
        - Southeast
        - Midwest
        - Southwest
        - West Coast
        - Northwest
        - South Central
        - Mountain
        - Hawaii
        - Alaska
    cocoon_meta:
      uniqueness: This column represents the name of the call center. For this table,
        each row is for a distinct call center. The call_center_name is likely to
        be unique across rows as it's common for businesses to have unique names for
        different locations.
  - name: suite_number
    description: Suite number of the call center
    tests:
    - not_null
  - name: street_name
    description: Street name of the call center address
    tests:
    - not_null
  - name: street_type
    description: Street type of the call center address
    tests:
    - not_null
    - accepted_values:
        values:
        - Street
        - Avenue
        - Boulevard
        - Way
        - Road
        - Lane
        - Drive
        - Place
        - Court
        - Terrace
        - Circle
        - Alley
        - Square
        - Parkway
        - Highway
        - Crescent
  - name: size_class
    description: Size classification of the call center
    tests:
    - not_null
    - accepted_values:
        values:
        - small
        - medium
        - large
  - name: open_date_key
    description: Surrogate key for the opening date
    tests:
    - not_null
  - name: company_id
    description: Company identifier
    tests:
    - not_null
  - name: state
    description: State where the call center is located
    tests:
    - not_null
  - name: manager_name
    description: Name of the call center manager
    tests:
    - not_null
  - name: square_footage
    description: Square footage of the call center
    tests:
    - not_null
  - name: call_center_surrogate_key
    description: Surrogate key for the call center
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is explicitly described as a surrogate key for the call
        center. For this table, each row is for a distinct call center. Surrogate
        keys are typically designed to be unique identifiers, so this is likely to
        be unique across rows.
  - name: operating_hours
    description: Operating hours of the call center
    tests:
    - not_null
    - accepted_values:
        values:
        - 24 hours
        - 8AM-4PM
        - 9AM-5PM
        - 8AM-8PM
        - 7AM-7PM
        - 6AM-10PM
        - 8AM-6PM
        - 9AM-6PM
        - 10AM-6PM
        - 7AM-3PM
        - 3PM-11PM
        - 11PM-7AM
        - 9AM-9PM
        - 8:30AM-5:30PM
        - 7:30AM-4:30PM
  - name: division_name
    description: Name of the division
    tests:
    - not_null
  - name: county
    description: County where the call center is located
    tests:
    - not_null
  - name: market_manager_name
    description: Name of the market manager
    tests:
    - not_null
  - name: company_name
    description: Name of the company
    tests:
    - not_null
  - name: employee_count
    description: Number of employees in the call center
    tests:
    - not_null
  - name: city
    description: City where the call center is located
    tests:
    - not_null
  - name: country
    description: Country where the call center is located
    tests:
    - not_null
  - name: market_id
    description: Market identifier
    tests:
    - not_null
  - name: division_id
    description: Division identifier
    tests:
    - not_null
  - name: tax_percentage
    description: Tax percentage applicable to the call center
    tests:
    - not_null
  - name: call_center_id
    description: Unique identifier for the call center
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column represents a unique identifier for each call center.
        For this table, each row is for a distinct call center. As it's designed to
        be a unique identifier, it should be unique across all rows.
  - name: call_center_zip_code
    description: Zip code of the call center location
    tests:
    - not_null
  - name: closed_date_key
    description: Surrogate key for the closing date
    cocoon_meta:
      missing_acceptable: Not applicable for call centers still in operation.
  - name: gmt_offset
    description: GMT offset of the call center location
    tests:
    - not_null
  - name: record_end_date
    description: End date of the record
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record
    tests:
    - not_null
  - name: street_number
    description: Street number of the call center address
    tests:
    - not_null

stg_promotion (first 100 rows)

channel_details press_channel purpose promotion_sku catalog_channel response_target email_channel promotion_cost demo_channel direct_mail_channel promotion_id item_sku radio_channel event_channel discount_active end_date start_date
0 None N Unknown 1 N 1 N 1000.0 N Y AAAAAAAABAAAAAAA 686 N N N 1996-04-12 2450164.0
1 None N Unknown 2 N 1 N 1000.0 N Y AAAAAAAACAAAAAAA 1264 N N N 1996-03-08 2450118.0
2 None N Unknown 3 N 1 N 1000.0 N Y AAAAAAAADAAAAAAA 1468 N N N 1997-09-21 2450675.0

stg_promotion.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"promotion_renamed" AS (
    -- Rename: Renaming columns
    -- P_PROMO_SK -> promotion_sku
    -- P_PROMO_ID -> promotion_id
    -- P_START_DATE_SK -> start_date
    -- P_END_DATE_SK -> end_date
    -- P_ITEM_SK -> item_sku
    -- P_COST -> promotion_cost
    -- P_RESPONSE_TARGE -> response_target
    -- P_PROMO_NAME -> promotion_name
    -- P_CHANNEL_DMAIL -> direct_mail_channel
    -- P_CHANNEL_EMAIL -> email_channel
    -- P_CHANNEL_CATALOG -> catalog_channel
    -- P_CHANNEL_TV -> tv_channel
    -- P_CHANNEL_RADIO -> radio_channel
    -- P_CHANNEL_PRESS -> press_channel
    -- P_CHANNEL_EVENT -> event_channel
    -- P_CHANNEL_DEMO -> demo_channel
    -- P_CHANNEL_DETAILS -> channel_details
    -- P_PURPOSE -> purpose
    -- P_DISCOUNT_ACTIVE -> discount_active
    SELECT 
        "P_PROMO_SK" AS "promotion_sku",
        "P_PROMO_ID" AS "promotion_id",
        "P_START_DATE_SK" AS "start_date",
        "P_END_DATE_SK" AS "end_date",
        "P_ITEM_SK" AS "item_sku",
        "P_COST" AS "promotion_cost",
        "P_RESPONSE_TARGE" AS "response_target",
        "P_PROMO_NAME" AS "promotion_name",
        "P_CHANNEL_DMAIL" AS "direct_mail_channel",
        "P_CHANNEL_EMAIL" AS "email_channel",
        "P_CHANNEL_CATALOG" AS "catalog_channel",
        "P_CHANNEL_TV" AS "tv_channel",
        "P_CHANNEL_RADIO" AS "radio_channel",
        "P_CHANNEL_PRESS" AS "press_channel",
        "P_CHANNEL_EVENT" AS "event_channel",
        "P_CHANNEL_DEMO" AS "demo_channel",
        "P_CHANNEL_DETAILS" AS "channel_details",
        "P_PURPOSE" AS "purpose",
        "P_DISCOUNT_ACTIVE" AS "discount_active"
    FROM "promotion"
),

"promotion_renamed_trimmed" AS (
    -- Trim Leading and Trailing Spaces
    SELECT
        "promotion_sku",
        "promotion_id",
        "start_date",
        "end_date",
        "item_sku",
        "promotion_cost",
        "response_target",
        "promotion_name",
        "direct_mail_channel",
        "email_channel",
        "catalog_channel",
        "tv_channel",
        "radio_channel",
        "press_channel",
        "event_channel",
        "demo_channel",
        "purpose",
        "discount_active",
        TRIM("channel_details") AS "channel_details"
    FROM "promotion_renamed"
),

"promotion_renamed_trimmed_cleaned" AS (
    -- Clean unusual string values: 
    -- promotion_name: The problem is that all three values in the promotion_name column are unusual and incomplete. They appear to be fragments of words rather than full promotion names. 'able' could be part of 'available' or 'affordable', 'ought' might be part of 'bought', and 'pri' could be the beginning of 'price' or 'prime'. Without more context or information about the intended promotion names, it's impossible to determine the correct full names. Therefore, the best approach is to map these incomplete values to an empty string, indicating that the promotion name is unknown or not specified. 
    -- tv_channel: The problem is that 'N' is the only value in the tv_channel column, and it's unclear what it represents. A single letter 'N' is not a typical TV channel designation. It could be an abbreviation for "None" or "Not Applicable", indicating that the content is not associated with a specific TV channel. Without more context or information about other possible values in this column, it's difficult to determine the exact meaning. However, since it's the only value present, we can assume it's intentional but perhaps not ideally formatted. 
    -- channel_details: The problem is that all values in the channel_details column are incomplete phrases that don't convey clear, distinct categories. These phrases appear to be truncated or nonsensical snippets of text, which don't provide any meaningful information about channel details. The correct values cannot be inferred from the given data, as there's no clear pattern or context to derive proper categories. In this case, it's best to map all these unusual values to an empty string, indicating that the data is invalid or missing. 
    SELECT
        "promotion_sku",
        "promotion_id",
        "start_date",
        "end_date",
        "item_sku",
        "promotion_cost",
        "response_target",
        CASE
            WHEN "promotion_name" = 'able' THEN ''
            WHEN "promotion_name" = 'ought' THEN ''
            WHEN "promotion_name" = 'pri' THEN ''
            ELSE "promotion_name"
        END AS "promotion_name",
        "direct_mail_channel",
        "email_channel",
        "catalog_channel",
        CASE
            WHEN "tv_channel" = 'N' THEN 'None'
            ELSE "tv_channel"
        END AS "tv_channel",
        "radio_channel",
        "press_channel",
        "event_channel",
        "demo_channel",
        "purpose",
        "discount_active",
        CASE
            WHEN "channel_details" = 'Companies shall not pr' THEN ''
            WHEN "channel_details" = 'Men will not say merely. Old, available' THEN ''
            WHEN "channel_details" = 'So willing buildings coul' THEN ''
            ELSE "channel_details"
        END AS "channel_details"
    FROM "promotion_renamed_trimmed"
),

"promotion_renamed_trimmed_cleaned_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- promotion_name: ['']
    -- tv_channel: ['None']
    -- channel_details: ['']
    SELECT 
        CASE
            WHEN "promotion_name" = '' THEN NULL
            ELSE "promotion_name"
        END AS "promotion_name",
        CASE
            WHEN "tv_channel" = 'None' THEN NULL
            ELSE "tv_channel"
        END AS "tv_channel",
        CASE
            WHEN "channel_details" = '' THEN NULL
            ELSE "channel_details"
        END AS "channel_details",
        "press_channel",
        "purpose",
        "promotion_sku",
        "catalog_channel",
        "response_target",
        "email_channel",
        "end_date",
        "promotion_cost",
        "demo_channel",
        "direct_mail_channel",
        "promotion_id",
        "item_sku",
        "start_date",
        "radio_channel",
        "event_channel",
        "discount_active"
    FROM "promotion_renamed_trimmed_cleaned"
),

"promotion_renamed_trimmed_cleaned_null_casted" AS (
    -- Column Type Casting: 
    -- end_date: from INT to DATE
    -- start_date: from INT to DATE
    SELECT
        "promotion_name",
        "tv_channel",
        "channel_details",
        "press_channel",
        "purpose",
        "promotion_sku",
        "catalog_channel",
        "response_target",
        "email_channel",
        "promotion_cost",
        "demo_channel",
        "direct_mail_channel",
        "promotion_id",
        "item_sku",
        "radio_channel",
        "event_channel",
        "discount_active",
        DATE '1858-11-17' + (CAST("end_date" AS INTEGER) - 2400000) AS "end_date",
        julian(DATE '1858-11-17' + (CAST("start_date" - 2400001 AS INTEGER) * INTERVAL '1 day')) AS "start_date"
    FROM "promotion_renamed_trimmed_cleaned_null"
),

"promotion_renamed_trimmed_cleaned_null_casted_missing_handled" AS (
    -- Handling missing values: There are 2 columns with unacceptable missing values
    -- promotion_name has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- tv_channel has 100.0 percent missing. Strategy: 🗑️ Drop Column
    SELECT
        "channel_details",
        "press_channel",
        "purpose",
        "promotion_sku",
        "catalog_channel",
        "response_target",
        "email_channel",
        "promotion_cost",
        "demo_channel",
        "direct_mail_channel",
        "promotion_id",
        "item_sku",
        "radio_channel",
        "event_channel",
        "discount_active",
        "end_date",
        "start_date"
    FROM "promotion_renamed_trimmed_cleaned_null_casted"
)

-- COCOON BLOCK END
SELECT * FROM "promotion_renamed_trimmed_cleaned_null_casted_missing_handled"

stg_promotion.yml (Document the table)

version: 2
models:
- name: stg_promotion
  description: The table is about promotions. It includes details such as promotion
    ID, start and end dates, target item, cost, response target, promotion name, and
    various promotion channels (e.g., mail, email, TV). The table also specifies the
    promotion's purpose and whether a discount is active.
  columns:
  - name: channel_details
    description: Additional details about the promotion channel
    cocoon_meta:
      missing_acceptable: Not applicable when no specific channel is active.
  - name: press_channel
    description: Indicates if promotion is through press releases
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: purpose
    description: Purpose of the promotion
    tests:
    - not_null
  - name: promotion_sku
    description: Stock keeping unit for the promotion
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column represents the stock keeping unit for the promotion.
        For this table, each row represents a unique promotion. The promotion_sku
        is likely to be unique across rows as it's designed to identify specific promotions.
  - name: catalog_channel
    description: Indicates if promotion is through catalog channel
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: response_target
    description: Target response rate for the promotion
    tests:
    - not_null
  - name: email_channel
    description: Indicates if promotion is through email
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: promotion_cost
    description: Cost of the promotion
    tests:
    - not_null
  - name: demo_channel
    description: Indicates if promotion includes product demonstrations
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: direct_mail_channel
    description: Indicates if promotion is through direct mail
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: promotion_id
    description: Unique identifier for the promotion
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is explicitly described as a unique identifier for the
        promotion. For this table, where each row represents a unique promotion, the
        promotion_id should be unique across all rows.
  - name: item_sku
    description: Item stock keeping unit for the promotion
    tests:
    - not_null
  - name: radio_channel
    description: Indicates if promotion is through radio
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: event_channel
    description: Indicates if promotion is through events
    tests:
    - not_null
    - accepted_values:
        values:
        - N
        - Y
  - name: discount_active
    description: Indicates if a discount is active
    tests:
    - not_null
    - accepted_values:
        values:
        - Y
        - N
  - name: end_date
    description: End date of the promotion
    tests:
    - not_null
  - name: start_date
    description: Start date of the promotion
    tests:
    - not_null

stg_catalog_page (first 100 rows)

page_surrogate_key page_id start_date_key end_date_key department catalog_id page_number catalog_type page_description
0 1 AAAAAAAABAAAAAAA 2450815 2450996.0 DEPARTMENT 1 1.0 bi-annual In general basic characters welcome. Clearly lively friends conv
1 2 AAAAAAAACAAAAAAA 2450815 2450996.0 DEPARTMENT 1 2.0 bi-annual English areas will leave prisoners. Too public countries ought to become beneath the years.
2 3 AAAAAAAADAAAAAAA 2450815 2450996.0 DEPARTMENT 1 3.0 bi-annual Times could not address disabled indians. Effectively public ports c
3 4 AAAAAAAAEAAAAAAA 2450815 NaN None 1 NaN bi-annual None
4 5 AAAAAAAAFAAAAAAA 2450815 2450996.0 DEPARTMENT 1 5.0 bi-annual Classic buildings ensure in a tests. Real years may not receive open systems. Now broad m
5 6 AAAAAAAAGAAAAAAA 2450815 2450996.0 DEPARTMENT 1 6.0 bi-annual Exciting principles wish greatly only excellent women. Appropriate fortunes shall not
6 7 AAAAAAAAHAAAAAAA 2450815 2450996.0 DEPARTMENT 1 7.0 bi-annual National services must not come at least into a girls
7 8 AAAAAAAAIAAAAAAA 2450815 2450996.0 DEPARTMENT 1 8.0 bi-annual Areas see early for a pounds. New goods study too serious women. Unwittingly sorry incentives shall
8 9 AAAAAAAAJAAAAAAA 2450815 2450996.0 DEPARTMENT 1 9.0 bi-annual Intensive, economic changes resist bloody of course simple economies;
9 10 AAAAAAAAKAAAAAAA 2450815 2450996.0 DEPARTMENT 1 10.0 bi-annual Careful, intense funds balance perhaps boys. Romantic chips remove legs. Direct birds get
10 11 AAAAAAAALAAAAAAA 2450815 2450996.0 DEPARTMENT 1 11.0 bi-annual At least national countries live by an sales. Weap
11 12 AAAAAAAAMAAAAAAA 2450815 2450996.0 DEPARTMENT 1 12.0 bi-annual Girls indicate so in a countries. Natural, emotional weeks try a
12 13 AAAAAAAANAAAAAAA 2450815 2450996.0 DEPARTMENT 1 13.0 bi-annual Miles see mainly clear hands. Villages finish there blue figures. Moreover wide students travel poo
13 14 AAAAAAAAOAAAAAAA 2450815 2450996.0 DEPARTMENT 1 14.0 bi-annual Rooms would say ago economic sections. Essential properties might not support groups. Ago rare eye
14 15 AAAAAAAAPAAAAAAA 2450815 2450996.0 DEPARTMENT 1 15.0 bi-annual Legal, required ends may not improve in the pictures. Really social structur
15 16 AAAAAAAAABAAAAAA 2450815 2450996.0 DEPARTMENT 1 16.0 bi-annual Schools must know now empty legs; generally daily children use sharp, loca
16 17 AAAAAAAABBAAAAAA 2450815 2450996.0 DEPARTMENT 1 17.0 bi-annual More than true carers can ensure at a officers. Candidates s
17 18 AAAAAAAACBAAAAAA 2450815 2450996.0 DEPARTMENT 1 18.0 bi-annual Shops end problems. Urban experiences play new stores. Institutions order as residential places.
18 19 AAAAAAAADBAAAAAA 2450815 2450996.0 DEPARTMENT 1 19.0 bi-annual Poor, hostile guidelines could hope alone early things. Secret,
19 20 AAAAAAAAEBAAAAAA 2450815 2450996.0 DEPARTMENT 1 20.0 bi-annual Appropriate years kill. Probably male units come perhaps between the minutes.
20 21 AAAAAAAAFBAAAAAA 2450815 2450996.0 DEPARTMENT 1 21.0 bi-annual Gentle fields understand forward high parental faciliti
21 22 AAAAAAAAGBAAAAAA 2450815 2450996.0 DEPARTMENT 1 22.0 bi-annual Square, good women can refuse. Women allow over courses. Entire, dail
22 23 AAAAAAAAHBAAAAAA 2450815 2450996.0 DEPARTMENT 1 23.0 bi-annual Level, ordinary names would change institutional principles. Fe
23 24 AAAAAAAAIBAAAAAA 2450815 2450996.0 DEPARTMENT 1 24.0 bi-annual For once public conditions could help even single, free vehicles. Soldi
24 25 AAAAAAAAJBAAAAAA 2450815 2450996.0 DEPARTMENT 1 25.0 bi-annual Dimensions ensure by a enquiries. Special times may practise much full, bad books; l
25 26 AAAAAAAAKBAAAAAA 2450815 2450996.0 DEPARTMENT 1 26.0 bi-annual Nervously reasonable sanctions would not supply often structures. National dangers relieve never
26 27 AAAAAAAALBAAAAAA 2450815 2450996.0 DEPARTMENT 1 27.0 bi-annual Ready restaurants can represent previously perfectly educational thanks; adjacent quantities t
27 28 AAAAAAAAMBAAAAAA 2450815 2450996.0 DEPARTMENT 1 28.0 bi-annual Also new funds must not find in addition essential poor friends; now
28 29 AAAAAAAANBAAAAAA 2450815 2450996.0 DEPARTMENT 1 29.0 bi-annual Small circumstances enter almost potentially spare individuals. Residential women launch
29 30 AAAAAAAAOBAAAAAA 2450815 2450996.0 DEPARTMENT 1 30.0 bi-annual Western, legislative courses cause truly else strange costs. Only grey windows come without a depo
30 31 AAAAAAAAPBAAAAAA 2450815 2450996.0 DEPARTMENT 1 31.0 bi-annual Differences would complete previously at a notes. Important
31 32 AAAAAAAAACAAAAAA 2450815 2450996.0 DEPARTMENT 1 32.0 bi-annual Quickly industrial trousers remember poor, practica
32 33 AAAAAAAABCAAAAAA 2450815 2450996.0 DEPARTMENT 1 33.0 bi-annual Here divine knees could not recall then before a meals. Resources use commercial,
33 34 AAAAAAAACCAAAAAA 2450815 2450996.0 DEPARTMENT 1 34.0 bi-annual Old, essential demonstrations watch absolutely; never woo
34 35 AAAAAAAADCAAAAAA 2450815 2450996.0 DEPARTMENT 1 35.0 bi-annual Simple blocks feel now whole police. Available meanings must shine clearly real, good departmen
35 36 AAAAAAAAECAAAAAA 2450815 2450996.0 DEPARTMENT 1 36.0 bi-annual Dead rats contain central, interesting years. Classes go.
36 37 AAAAAAAAFCAAAAAA 2450815 2450996.0 DEPARTMENT 1 37.0 bi-annual Approaches demonstrate requirements. Public views can need hard. Almost alone
37 38 AAAAAAAAGCAAAAAA 2450815 2450996.0 DEPARTMENT 1 38.0 bi-annual Ready perceptions close only with a conservatives.
38 39 AAAAAAAAHCAAAAAA 2450815 2450996.0 DEPARTMENT 1 39.0 bi-annual Vastly favorite systems may not imply manufacturing, new facilities. Eventually wo
39 40 AAAAAAAAICAAAAAA 2450815 2450996.0 DEPARTMENT 1 40.0 bi-annual Social, full questions learn already cautiously unemployed solicitors. Alone, close s
40 41 AAAAAAAAJCAAAAAA 2450815 2450996.0 DEPARTMENT 1 41.0 bi-annual True friends may not pay once at first good issues. Girls ought to grow t
41 42 AAAAAAAAKCAAAAAA 2450815 2450996.0 DEPARTMENT 1 42.0 bi-annual Fine animals may expect solidly. Highest extra vessels take here simila
42 43 AAAAAAAALCAAAAAA 2450815 2450996.0 DEPARTMENT 1 43.0 bi-annual Relatively darling limits must not forgive. Rural, dry folk h
43 44 AAAAAAAAMCAAAAAA 2450815 2450996.0 DEPARTMENT 1 44.0 bi-annual More likely movements shall identify badly other sensitive ideas. Fully other views could not
44 45 AAAAAAAANCAAAAAA 2450815 2450996.0 DEPARTMENT 1 45.0 bi-annual Full heads imply unfortunately good policies. However different periods will not avoid highly in
45 46 AAAAAAAAOCAAAAAA 2450815 2450996.0 DEPARTMENT 1 46.0 bi-annual Old beings used to raise. Curtains cannot enable just sites. Cells can say western talks;
46 47 AAAAAAAAPCAAAAAA 2450815 2450996.0 DEPARTMENT 1 47.0 bi-annual Dangerous, desirable relations might forget always free activities. Values ough
47 48 AAAAAAAAADAAAAAA 2450815 2450996.0 DEPARTMENT 1 48.0 bi-annual Moving, parliamentary women seal only glad, little damages. Electoral ways
48 49 AAAAAAAABDAAAAAA 2450815 2450996.0 DEPARTMENT 1 49.0 bi-annual Old, extensive months cannot write political numbers. Minor lips know as usual f
49 50 AAAAAAAACDAAAAAA 2450815 2450996.0 DEPARTMENT 1 50.0 bi-annual Now metropolitan prices survive institutions. Internal cheeks
50 51 AAAAAAAADDAAAAAA 2450815 2450996.0 DEPARTMENT 1 51.0 bi-annual Superior, pink men should plant also recent, very fears. Purposes see other men. Tough, particular
51 52 AAAAAAAAEDAAAAAA 2450815 2450996.0 DEPARTMENT 1 52.0 bi-annual Urban, large girls could go. Actions might guard about key ot
52 53 AAAAAAAAFDAAAAAA 2450815 2450996.0 DEPARTMENT 1 53.0 bi-annual Relevant, major backs fly just private findings. New workers must not keep l
53 54 AAAAAAAAGDAAAAAA 2450815 2450996.0 DEPARTMENT 1 54.0 bi-annual Rights should reassure as to a borders; difficult, efficient servants might no
54 55 AAAAAAAAHDAAAAAA 2450815 2450996.0 DEPARTMENT 1 55.0 bi-annual Male requirements can make. Catholic results load maybe common ba
55 56 AAAAAAAAIDAAAAAA 2450815 2450996.0 DEPARTMENT 1 56.0 bi-annual Men talk even like a days. Still large feelings see new, quick hotels. Far black relations should
56 57 AAAAAAAAJDAAAAAA 2450815 2450996.0 DEPARTMENT 1 57.0 bi-annual Expressly local horses shall undertake perhaps able, co
57 58 AAAAAAAAKDAAAAAA 2450815 2450996.0 DEPARTMENT 1 58.0 bi-annual Tasks work fun trees. Old employees make colonial, good signs. Famous emo
58 59 AAAAAAAALDAAAAAA 2450815 2450996.0 DEPARTMENT 1 59.0 bi-annual Free, like figures will not leave once similar, eas
59 60 AAAAAAAAMDAAAAAA 2450815 2450996.0 DEPARTMENT 1 60.0 bi-annual Teachers would choose always average investments. Unable, illegal sorts see. Shadows sha
60 61 AAAAAAAANDAAAAAA 2450815 2450996.0 DEPARTMENT 1 61.0 bi-annual Glad developments improve still unable, invisible communications. High processes ru
61 62 AAAAAAAAODAAAAAA 2450815 2450996.0 DEPARTMENT 1 62.0 bi-annual Indeed poor enemies change so to a hours. Either public circumstan
62 63 AAAAAAAAPDAAAAAA 2450815 2450996.0 DEPARTMENT 1 63.0 bi-annual Possible, general practitioners must mate in a companies. Small developments per
63 64 AAAAAAAAAEAAAAAA 2450815 2450996.0 DEPARTMENT 1 64.0 bi-annual New, other men would hear secret costs. Major lines might think. Modern hands shall
64 65 AAAAAAAABEAAAAAA 2450815 2450996.0 DEPARTMENT 1 65.0 bi-annual Otherwise vast titles could comprehend just, strong forms. Historic, european owners enha
65 66 AAAAAAAACEAAAAAA 2450815 2450996.0 DEPARTMENT 1 66.0 bi-annual Simple types stir oddly. More head depths could tak
66 67 AAAAAAAADEAAAAAA 2450815 2450996.0 DEPARTMENT 1 67.0 bi-annual Other developments shall not race in order objective wings. Nearby departments
67 68 AAAAAAAAEEAAAAAA 2450815 2450996.0 DEPARTMENT 1 68.0 bi-annual More big police cannot give important, difficult clients. Black, early vessels use
68 69 AAAAAAAAFEAAAAAA 2450815 2450996.0 DEPARTMENT 1 69.0 bi-annual More basic colleagues should shift; muscles make however legal authorities.
69 70 AAAAAAAAGEAAAAAA 2450815 2450996.0 DEPARTMENT 1 70.0 bi-annual Visual, major matters witness together so-called days. Obviously sharp men spend meanwhile els
70 71 AAAAAAAAHEAAAAAA 2450815 2450996.0 DEPARTMENT 1 71.0 bi-annual Numbers may create now concerned families. Machines must
71 72 AAAAAAAAIEAAAAAA 2450815 2450996.0 DEPARTMENT 1 72.0 bi-annual Sometimes lexical police shall affect women. Personal banks could not cost e
72 73 AAAAAAAAJEAAAAAA 2450815 2450996.0 DEPARTMENT 1 73.0 bi-annual Journalists develop civil, open methods. Very normal vehicles used t
73 74 AAAAAAAAKEAAAAAA 2450815 2450996.0 DEPARTMENT 1 74.0 bi-annual Cheap problems obtain national, new organisations. Certain, suitable words
74 75 AAAAAAAALEAAAAAA 2450815 2450996.0 DEPARTMENT 1 75.0 bi-annual Specifically russian plans must use neither grand shares. Harsh, french results increase
75 76 AAAAAAAAMEAAAAAA 2450815 2450996.0 DEPARTMENT 1 76.0 bi-annual Entirely normal thousands cannot rely just important ti
76 77 AAAAAAAANEAAAAAA 2450815 2450996.0 DEPARTMENT 1 77.0 bi-annual American years swallow only, nice thanks. Obvious materials might not discuss just.
77 78 AAAAAAAAOEAAAAAA 2450815 2450996.0 DEPARTMENT 1 78.0 bi-annual Intelligent buildings might not keep here new cases. Sole
78 79 AAAAAAAAPEAAAAAA 2450815 2450996.0 DEPARTMENT 1 79.0 bi-annual Complaints release views. Really internal interpretations used to make funny, important
79 80 AAAAAAAAAFAAAAAA 2450815 2450996.0 DEPARTMENT 1 80.0 bi-annual Words know difficult, lucky areas. Over red parts need extr
80 81 AAAAAAAABFAAAAAA 2450815 2450996.0 DEPARTMENT 1 81.0 bi-annual Vital findings come more about convincing firms. Hor
81 82 AAAAAAAACFAAAAAA 2450815 2450996.0 DEPARTMENT 1 82.0 bi-annual Colonial interests reach also. Results will not pursue seconds. Labour other
82 83 AAAAAAAADFAAAAAA 2450815 2450996.0 DEPARTMENT 1 83.0 bi-annual In order compatible schools float particular families. Briefly strong words used
83 84 AAAAAAAAEFAAAAAA 2450815 2450996.0 DEPARTMENT 1 84.0 bi-annual Industrial cars exist workers. Dependent pages should consider straig
84 85 AAAAAAAAFFAAAAAA 2450815 2450996.0 DEPARTMENT 1 85.0 bi-annual Minutes ought to keep marginal states. New, financial nurses become later. Legally engl
85 86 AAAAAAAAGFAAAAAA 2450815 2450996.0 DEPARTMENT 1 86.0 bi-annual Talks draw totally manufacturers. Lines evolve very; conditions see mi
86 87 AAAAAAAAHFAAAAAA 2450815 2450996.0 DEPARTMENT 1 87.0 bi-annual Away dramatic letters say slightly for a advisers. Severe, difficult points entail h
87 88 AAAAAAAAIFAAAAAA 2450815 2450996.0 DEPARTMENT 1 88.0 bi-annual Particular projects involve always final lakes. Subjects must move
88 89 AAAAAAAAJFAAAAAA 2450815 2450996.0 DEPARTMENT 1 89.0 bi-annual More responsible bands pursue then including a tasks; extremely traditional numbe
89 90 AAAAAAAAKFAAAAAA 2450815 2450996.0 DEPARTMENT 1 90.0 bi-annual Enough real studies should not appear weekends. Rich,
90 91 AAAAAAAALFAAAAAA 2450815 2450996.0 DEPARTMENT 1 91.0 bi-annual Safe prices grow there enough private boys. Priorities come eventually forces. Regi
91 92 AAAAAAAAMFAAAAAA 2450815 2450996.0 DEPARTMENT 1 92.0 bi-annual Years can know. Available, dead degrees may begin ever. Docto
92 93 AAAAAAAANFAAAAAA 2450815 2450996.0 DEPARTMENT 1 93.0 bi-annual Perfectly mild differences must visit deaf years. Attractive, interesting women might not tie to t
93 94 AAAAAAAAOFAAAAAA 2450815 2450996.0 DEPARTMENT 1 94.0 bi-annual Equal, other calls maintain simply. Newspapers cannot touch f
94 95 AAAAAAAAPFAAAAAA 2450815 2450996.0 DEPARTMENT 1 95.0 bi-annual Bonds include completely critical principles. Charges walk just forms. Subsequent, ti
95 96 AAAAAAAAAGAAAAAA 2450815 2450996.0 DEPARTMENT 1 96.0 bi-annual Then other details will stop nuclear officers. Capital expenses carve far options. Stru
96 97 AAAAAAAABGAAAAAA 2450815 2450996.0 DEPARTMENT 1 97.0 bi-annual Trees help far also ideal debts. Old, outstanding forces
97 98 AAAAAAAACGAAAAAA 2450815 2450996.0 DEPARTMENT 1 98.0 bi-annual Still fine services would surrender urban results; mean, serious considerations may say
98 99 AAAAAAAADGAAAAAA 2450815 2450996.0 DEPARTMENT 1 99.0 bi-annual Useful, white courts leave almost high fingers. Popular, basic words plan

stg_catalog_page.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"catalog_page_renamed" AS (
    -- Rename: Renaming columns
    -- CP_CATALOG_PAGE_SK -> page_surrogate_key
    -- CP_CATALOG_PAGE_ID -> page_id
    -- CP_START_DATE_SK -> start_date_key
    -- CP_END_DATE_SK -> end_date_key
    -- CP_DEPARTMENT -> department
    -- CP_CATALOG_NUMBER -> catalog_id
    -- CP_CATALOG_PAGE_NUMBER -> page_number
    -- CP_DESCRIPTION -> page_description
    -- CP_TYPE -> catalog_type
    SELECT 
        "CP_CATALOG_PAGE_SK" AS "page_surrogate_key",
        "CP_CATALOG_PAGE_ID" AS "page_id",
        "CP_START_DATE_SK" AS "start_date_key",
        "CP_END_DATE_SK" AS "end_date_key",
        "CP_DEPARTMENT" AS "department",
        "CP_CATALOG_NUMBER" AS "catalog_id",
        "CP_CATALOG_PAGE_NUMBER" AS "page_number",
        "CP_DESCRIPTION" AS "page_description",
        "CP_TYPE" AS "catalog_type"
    FROM "catalog_page"
),

"catalog_page_renamed_trimmed" AS (
    -- Trim Leading and Trailing Spaces
    SELECT
        "page_surrogate_key",
        "page_id",
        "start_date_key",
        "end_date_key",
        "department",
        "catalog_id",
        "page_number",
        "catalog_type",
        TRIM("page_description") AS "page_description"
    FROM "catalog_page_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "catalog_page_renamed_trimmed"

stg_catalog_page.yml (Document the table)

version: 2
models:
- name: stg_catalog_page
  description: The table is about catalog pages. It contains information such as catalog
    page ID, start and end dates, department, catalog number, page number, description,
    and type. Each row represents a unique catalog page with its associated details.
    The type appears to be consistently "bi-annual" for the given samples.
  columns:
  - name: page_surrogate_key
    description: Surrogate key for the catalog page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key specifically created to uniquely
        identify each catalog page. For this table, each row represents a unique catalog
        page, and the page_surrogate_key is designed to be unique across rows.
  - name: page_id
    description: Unique identifier for each catalog page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for each catalog
        page. For this table, each row represents a unique catalog page, and the page_id
        is intended to be unique across rows.
  - name: start_date_key
    description: Surrogate key for the start date
    tests:
    - not_null
  - name: end_date_key
    description: Surrogate key for the end date
    tests:
    - not_null
  - name: department
    description: Department associated with the catalog page
    tests:
    - accepted_values:
        values:
        - Electronics
        - Clothing
        - Home & Garden
        - Toys & Games
        - Sports & Outdoors
        - Beauty & Personal Care
        - Books
        - Music
        - Movies & TV
        - Automotive
        - Grocery
        - Pet Supplies
        - Health & Wellness
        - Jewelry
        - Office Supplies
        - Baby & Kids
        - Furniture
        - Appliances
        - Tools & Home Improvement
        - Arts & Crafts
        - DEPARTMENT
    cocoon_meta:
      missing_acceptable: Possibly represents a general or non-departmental page.
  - name: catalog_id
    description: Identifier for the catalog
    tests:
    - not_null
  - name: page_number
    description: Number of the page within the catalog
    tests:
    - not_null
  - name: catalog_type
    description: Type of catalog (e.g., bi-annual)
    tests:
    - not_null
    - accepted_values:
        values:
        - annual
        - bi-annual
        - quarterly
        - monthly
        - weekly
        - daily
        - seasonal
        - special edition
  - name: page_description
    description: Brief description of the catalog page content
    tests:
    - not_null

stg_web_site (first 100 rows)

gmt_offset suite_number website_id street_name street_type company_id web_state market_manager web_country site_manager website_name web_county website_surrogate_key web_city market_id web_classification tax_percentage record_end_date record_start_date street_number web_close_date web_open_date zip_code
0 -5 Suite 330 AAAAAAAABAAAAAAA Dogwood Sunset Ln 6 TN Joe George United States Ronald Shaffer site_0 Williamson County 1 Midway 4 Unknown 0.1 NaT 1997-08-16 51 NaN 4850808.0 31904
1 -5 Suite 150 AAAAAAAACAAAAAAA Ridge Wilson Cir 4 TN David Myers United States Tommy Jones site_0 Williamson County 2 Midway 6 Unknown 0.0 2000-08-15 1997-08-16 358 2448973.0 4850799.0 31904

stg_web_site.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"web_site_renamed" AS (
    -- Rename: Renaming columns
    -- WEB_SITE_SK -> website_surrogate_key
    -- WEB_SITE_ID -> website_id
    -- WEB_REC_START_DATE -> record_start_date
    -- WEB_REC_END_DATE -> record_end_date
    -- WEB_NAME -> website_name
    -- WEB_OPEN_DATE_SK -> web_open_date
    -- WEB_CLOSE_DATE_SK -> web_close_date
    -- WEB_CLASS -> web_classification
    -- WEB_MANAGER -> site_manager
    -- WEB_MKT_ID -> market_id
    -- WEB_MKT_CLASS -> market_classification
    -- WEB_MKT_DESC -> market_description
    -- WEB_MARKET_MANAGER -> market_manager
    -- WEB_COMPANY_ID -> company_id
    -- WEB_COMPANY_NAME -> company_name
    -- WEB_STREET_NUMBER -> street_number
    -- WEB_STREET_NAME -> street_name
    -- WEB_STREET_TYPE -> street_type
    -- WEB_SUITE_NUMBER -> suite_number
    -- WEB_CITY -> web_city
    -- WEB_COUNTY -> web_county
    -- WEB_STATE -> web_state
    -- WEB_ZIP -> zip_code
    -- WEB_COUNTRY -> web_country
    -- WEB_GMT_OFFSET -> gmt_offset
    -- WEB_TAX_PERCENTAGE -> tax_percentage
    SELECT 
        "WEB_SITE_SK" AS "website_surrogate_key",
        "WEB_SITE_ID" AS "website_id",
        "WEB_REC_START_DATE" AS "record_start_date",
        "WEB_REC_END_DATE" AS "record_end_date",
        "WEB_NAME" AS "website_name",
        "WEB_OPEN_DATE_SK" AS "web_open_date",
        "WEB_CLOSE_DATE_SK" AS "web_close_date",
        "WEB_CLASS" AS "web_classification",
        "WEB_MANAGER" AS "site_manager",
        "WEB_MKT_ID" AS "market_id",
        "WEB_MKT_CLASS" AS "market_classification",
        "WEB_MKT_DESC" AS "market_description",
        "WEB_MARKET_MANAGER" AS "market_manager",
        "WEB_COMPANY_ID" AS "company_id",
        "WEB_COMPANY_NAME" AS "company_name",
        "WEB_STREET_NUMBER" AS "street_number",
        "WEB_STREET_NAME" AS "street_name",
        "WEB_STREET_TYPE" AS "street_type",
        "WEB_SUITE_NUMBER" AS "suite_number",
        "WEB_CITY" AS "web_city",
        "WEB_COUNTY" AS "web_county",
        "WEB_STATE" AS "web_state",
        "WEB_ZIP" AS "zip_code",
        "WEB_COUNTRY" AS "web_country",
        "WEB_GMT_OFFSET" AS "gmt_offset",
        "WEB_TAX_PERCENTAGE" AS "tax_percentage"
    FROM "web_site"
),

"web_site_renamed_cleaned" AS (
    -- Clean unusual string values: 
    -- market_classification: The problem is that both values in the market_classification column are incomplete sentences that do not represent clear market classifications. They appear to be truncated or nonsensical phrases rather than meaningful categories. The correct values for market classifications should be clear, concise categories describing the market segment or type of product/service. Since we don't have enough context to determine what the intended classifications were, the best approach is to map these unusual values to an empty string. 
    -- market_description: The problem is that both values in the market_description column are incoherent sentences that do not describe markets in any meaningful way. They appear to be randomly generated text or gibberish. The correct values should be empty strings since the existing text provides no useful market description information. 
    -- company_name: The problem is that both 'cally' and 'ese' appear to be incomplete or truncated company names. Without more context or information about the full company names, it's difficult to determine the correct complete names. These values are likely the result of data truncation or improper data entry. The correct values should be the full company names, but we don't have enough information to determine what those are. 
    -- street_type: The problem is inconsistent abbreviation and punctuation styles in the street_type column. 'Cir.' uses a period at the end, while 'Ln' does not. The correct values should use a consistent style, preferably without periods for brevity and consistency with common addressing standards. 
    SELECT
        "website_surrogate_key",
        "website_id",
        "record_start_date",
        "record_end_date",
        "website_name",
        "web_open_date",
        "web_close_date",
        "web_classification",
        "site_manager",
        "market_id",
        CASE
            WHEN "market_classification" = 'Completely excellent things ought to pro' THEN ''
            WHEN "market_classification" = 'Grey lines ought to result indeed centres. Tod' THEN ''
            ELSE "market_classification"
        END AS "market_classification",
        CASE
            WHEN "market_description" = 'Lucky passengers know. Red details will not hang alive, international s' THEN ''
            WHEN "market_description" = 'Well similar decisions used to keep hardly democratic, personal priorities.' THEN ''
            ELSE "market_description"
        END AS "market_description",
        "market_manager",
        "company_id",
        CASE
            WHEN "company_name" = 'cally' THEN ''
            WHEN "company_name" = 'ese' THEN ''
            ELSE "company_name"
        END AS "company_name",
        "street_number",
        "street_name",
        CASE
            WHEN "street_type" = 'Cir.' THEN 'Cir'
            ELSE "street_type"
        END AS "street_type",
        "suite_number",
        "web_city",
        "web_county",
        "web_state",
        "zip_code",
        "web_country",
        "gmt_offset",
        "tax_percentage"
    FROM "web_site_renamed"
),

"web_site_renamed_cleaned_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- market_classification: ['']
    -- market_description: ['']
    -- company_name: ['']
    SELECT 
        CASE
            WHEN "market_classification" = '' THEN NULL
            ELSE "market_classification"
        END AS "market_classification",
        CASE
            WHEN "market_description" = '' THEN NULL
            ELSE "market_description"
        END AS "market_description",
        CASE
            WHEN "company_name" = '' THEN NULL
            ELSE "company_name"
        END AS "company_name",
        "gmt_offset",
        "suite_number",
        "website_id",
        "street_name",
        "street_type",
        "company_id",
        "web_state",
        "market_manager",
        "web_country",
        "web_open_date",
        "site_manager",
        "website_name",
        "web_county",
        "record_end_date",
        "website_surrogate_key",
        "web_city",
        "zip_code",
        "record_start_date",
        "street_number",
        "web_close_date",
        "market_id",
        "web_classification",
        "tax_percentage"
    FROM "web_site_renamed_cleaned"
),

"web_site_renamed_cleaned_null_casted" AS (
    -- Column Type Casting: 
    -- record_end_date: from VARCHAR to DATE
    -- record_start_date: from VARCHAR to DATE
    -- street_number: from INT to VARCHAR
    -- web_close_date: from DECIMAL to DATE
    -- web_open_date: from INT to DATE
    -- zip_code: from INT to VARCHAR
    SELECT
        "market_classification",
        "market_description",
        "company_name",
        "gmt_offset",
        "suite_number",
        "website_id",
        "street_name",
        "street_type",
        "company_id",
        "web_state",
        "market_manager",
        "web_country",
        "site_manager",
        "website_name",
        "web_county",
        "website_surrogate_key",
        "web_city",
        "market_id",
        "web_classification",
        "tax_percentage",
        CAST("record_end_date" AS DATE) AS "record_end_date",
        CAST("record_start_date" AS DATE) AS "record_start_date",
        CAST("street_number" AS VARCHAR) AS "street_number",
        "web_close_date" AS "web_close_date",
        julian(DATE '1858-11-17' + CAST("web_open_date" AS INTEGER)) AS "web_open_date",
        CAST("zip_code" AS VARCHAR) AS "zip_code"
    FROM "web_site_renamed_cleaned_null"
),

"web_site_renamed_cleaned_null_casted_missing_handled" AS (
    -- Handling missing values: There are 4 columns with unacceptable missing values
    -- company_name has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- market_classification has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- market_description has 100.0 percent missing. Strategy: 🗑️ Drop Column
    -- record_end_date has 50.0 percent missing. Strategy: 🔄 Unchanged
    SELECT
        "gmt_offset",
        "suite_number",
        "website_id",
        "street_name",
        "street_type",
        "company_id",
        "web_state",
        "market_manager",
        "web_country",
        "site_manager",
        "website_name",
        "web_county",
        "website_surrogate_key",
        "web_city",
        "market_id",
        "web_classification",
        "tax_percentage",
        "record_end_date",
        "record_start_date",
        "street_number",
        "web_close_date",
        "web_open_date",
        "zip_code"
    FROM "web_site_renamed_cleaned_null_casted"
)

-- COCOON BLOCK END
SELECT * FROM "web_site_renamed_cleaned_null_casted_missing_handled"

stg_web_site.yml (Document the table)

version: 2
models:
- name: stg_web_site
  description: The table is about web sites. It contains details such as site ID,
    name, opening and closing dates, manager, market information, company details,
    address, and tax percentage. Each row represents a unique web site with its characteristics
    and location information. The table includes both current and historical data
    for web sites.
  columns:
  - name: gmt_offset
    description: GMT time offset for the website's location
    tests:
    - not_null
  - name: suite_number
    description: Suite number of the website's address
    tests:
    - not_null
  - name: website_id
    description: Unique identifier for the website
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a unique identifier for the website. For this table,
        each row represents a unique website, and the website_id is designed to be
        unique for each website.
  - name: street_name
    description: Street name of the website's address
    tests:
    - not_null
  - name: street_type
    description: Street type of the website's address
    tests:
    - not_null
    - accepted_values:
        values:
        - Ave
        - Blvd
        - Cir
        - Ct
        - Dr
        - Ln
        - Pl
        - Rd
        - St
        - Ter
        - Way
        - Pkwy
        - Hwy
        - Aly
        - Expy
  - name: company_id
    description: Unique identifier for the company
    tests:
    - not_null
  - name: web_state
    description: State where the website is registered
    tests:
    - not_null
  - name: market_manager
    description: Name of the market manager
    tests:
    - not_null
  - name: web_country
    description: Country where the website is registered
    tests:
    - not_null
  - name: site_manager
    description: Name of the website manager
    tests:
    - not_null
  - name: website_name
    description: Name of the website
    tests:
    - not_null
  - name: web_county
    description: County where the website is registered
    tests:
    - not_null
  - name: website_surrogate_key
    description: Surrogate key for the website
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key for the website. For this table,
        each row represents a unique website, and the surrogate key is designed to
        be unique for each website.
  - name: web_city
    description: City where the website is registered
    tests:
    - not_null
  - name: market_id
    description: Unique identifier for the market
    tests:
    - not_null
  - name: web_classification
    description: Classification of the website
    tests:
    - not_null
  - name: tax_percentage
    description: Tax percentage applicable to the website
    tests:
    - not_null
  - name: record_end_date
    description: End date of the record
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record
    tests:
    - not_null
  - name: street_number
    description: Street number of the website's address
    tests:
    - not_null
  - name: web_close_date
    description: Date when the website was closed
    cocoon_meta:
      missing_acceptable: Website may still be active, so no close date.
  - name: web_open_date
    description: Date when the website was opened
    tests:
    - not_null
  - name: zip_code
    description: ZIP code of the website's location
    tests:
    - not_null

stg_store_returns (first 100 rows)

item_id ticket_number unit_wholesale_cost unit_list_price unit_sales_price total_discount_amount total_sales_price total_wholesale_cost total_list_price total_tax_amount coupon_amount net_paid net_paid_with_tax net_profit address_id customer_demo_id customer_id household_demo_id promotion_id quantity sale_date_id sale_time_id store_id
0 404 1 37.23 3.35 40.58 55.28 714.00 0.74 17.51 18.98 772.63 NaN NaN NaN 397.0 793022.0 6.0 4033.0 1.0 51.0 2451984.0 46418.0 2.0
1 1813 1 4009.32 120.27 4129.59 28.23 0.00 3448.01 5.61 555.70 148.50 NaN NaN NaN 751.0 1082163.0 6.0 7157.0 1.0 43.0 2451822.0 47480.0 1.0
2 1030 2 249.48 2.49 251.97 11.50 6.23 234.51 8.83 6.14 20.22 NaN NaN NaN 819.0 289468.0 284.0 3067.0 1.0 7.0 2451653.0 37700.0 2.0
3 1719 3 227.37 6.82 234.19 9.23 33.42 125.05 51.16 51.16 49.47 NaN NaN NaN 663.0 793786.0 47.0 6401.0 1.0 3.0 2452682.0 38957.0 2.0
4 1063 3 1273.05 25.46 1298.51 46.15 406.18 954.78 57.28 260.99 477.79 NaN NaN NaN 152.0 193750.0 47.0 2351.0 1.0 23.0 2452682.0 41617.0 1.0
5 1545 3 35.14 2.45 37.59 79.00 0.00 9.13 5.20 20.81 81.45 NaN NaN NaN 76.0 1047081.0 47.0 2455.0 1.0 1.0 2452688.0 60645.0 2.0
6 397 4 63.54 1.27 64.81 1.26 10.80 33.67 2.68 27.19 13.33 NaN NaN NaN 164.0 722383.0 814.0 1497.0 1.0 18.0 2451598.0 40772.0 2.0
7 908 4 18.60 1.48 20.08 46.48 270.60 10.04 8.04 0.52 318.56 NaN NaN NaN 491.0 925501.0 814.0 3196.0 1.0 12.0 2451521.0 33881.0 2.0
8 1790 5 347.42 6.94 354.36 97.98 331.18 107.70 14.38 225.34 436.10 NaN NaN NaN 935.0 1150235.0 246.0 3185.0 1.0 58.0 2451628.0 34073.0 1.0
9 151 6 61.81 3.70 65.51 68.44 44.79 54.39 0.14 7.28 116.93 NaN NaN NaN 724.0 492488.0 29.0 6806.0 1.0 1.0 2452165.0 54713.0 2.0
10 543 7 809.28 24.27 833.55 88.17 51.12 194.22 442.84 172.22 163.56 NaN NaN NaN 299.0 1182421.0 954.0 560.0 1.0 72.0 2452319.0 50204.0 1.0
11 163 10 3960.48 0.00 3960.48 39.22 65.76 1980.24 1960.43 19.81 104.98 NaN NaN NaN 625.0 178772.0 451.0 175.0 1.0 48.0 2452065.0 40372.0 2.0
12 1639 11 1639.44 81.97 1721.41 96.21 712.80 147.54 1163.68 328.22 890.98 NaN NaN NaN 89.0 727030.0 900.0 4636.0 1.0 36.0 2452575.0 42311.0 1.0
13 1196 12 417.42 4.17 421.59 62.17 2400.30 375.67 37.57 4.18 2466.64 NaN NaN NaN 714.0 201438.0 820.0 6076.0 1.0 27.0 2451378.0 48500.0 2.0
14 1495 12 1208.42 48.33 1256.75 69.04 887.80 96.67 355.76 755.99 1005.17 NaN NaN NaN 633.0 1351118.0 820.0 2652.0 1.0 46.0 2451329.0 44694.0 2.0
15 130 13 40.60 3.24 43.84 1.13 312.62 27.20 0.26 13.14 316.99 NaN NaN NaN 138.0 130689.0 588.0 2790.0 1.0 58.0 2451014.0 29493.0 1.0
16 1591 13 83.51 7.51 91.02 81.26 20.31 73.48 8.42 1.61 109.08 NaN NaN NaN 400.0 541501.0 144.0 527.0 1.0 1.0 2450926.0 48082.0 1.0
17 2000 13 350.40 14.01 364.41 20.61 247.98 255.79 62.44 32.17 282.60 NaN NaN NaN 50.0 277151.0 144.0 1877.0 1.0 6.0 2450924.0 48257.0 1.0
18 935 14 708.18 49.57 757.75 NaN NaN 559.46 NaN NaN NaN NaN NaN NaN NaN 829696.0 409.0 NaN 1.0 NaN NaN NaN NaN
19 1100 15 9.43 0.75 10.18 35.62 48.33 8.48 0.61 0.34 84.70 NaN NaN NaN 446.0 747820.0 835.0 2733.0 1.0 1.0 2451933.0 41472.0 1.0
20 1903 16 2406.00 72.18 2478.18 19.02 349.20 505.26 722.28 1178.46 440.40 NaN NaN NaN 411.0 1815885.0 222.0 5148.0 1.0 24.0 2450914.0 51589.0 2.0
21 1750 16 181.65 10.89 192.54 98.09 60.45 74.47 8.57 98.61 169.43 NaN NaN NaN 950.0 524921.0 139.0 3159.0 1.0 15.0 2450924.0 34013.0 2.0
22 1285 18 199.36 9.96 209.32 57.84 89.04 95.69 14.51 89.16 156.84 NaN NaN NaN 828.0 1532238.0 292.0 2533.0 1.0 56.0 2451547.0 44125.0 1.0
23 1100 18 419.25 12.57 431.82 58.46 226.72 37.73 343.36 38.16 297.75 NaN NaN NaN 424.0 187471.0 292.0 1924.0 1.0 13.0 2451491.0 44663.0 2.0
24 1294 19 359.24 32.33 391.57 13.77 517.30 283.79 45.27 30.18 563.40 NaN NaN NaN 312.0 1392417.0 104.0 1141.0 1.0 14.0 2451376.0 56165.0 1.0
25 1304 19 2391.48 47.82 2439.30 78.85 2602.86 2032.75 243.93 114.80 2729.53 NaN NaN NaN 856.0 1325860.0 762.0 758.0 1.0 78.0 2451493.0 50425.0 1.0
26 190 21 1778.76 53.36 1832.12 73.43 495.72 160.08 1068.32 550.36 622.51 NaN NaN NaN 305.0 854970.0 626.0 2561.0 1.0 27.0 2451280.0 33889.0 1.0
27 1051 22 35.02 0.00 35.02 22.87 195.16 14.35 2.68 17.99 218.03 NaN NaN NaN 494.0 1685822.0 935.0 6158.0 1.0 17.0 2451277.0 40485.0 2.0
28 475 22 113.94 9.11 123.05 66.52 53.40 37.60 57.25 19.09 129.03 NaN NaN NaN 555.0 1247881.0 935.0 5718.0 1.0 6.0 2451231.0 29254.0 2.0
29 1953 23 5883.20 294.16 6177.36 52.40 2848.80 4824.22 328.28 730.70 3195.36 NaN NaN NaN 30.0 1890707.0 669.0 5392.0 1.0 80.0 2452771.0 51900.0 2.0
30 1665 24 28.49 0.00 28.49 69.29 29.81 6.26 1.33 20.90 99.10 NaN NaN NaN 270.0 1359322.0 69.0 2796.0 1.0 11.0 2452213.0 40442.0 1.0
31 1483 24 1099.02 54.95 1153.97 27.69 328.38 1033.07 58.03 7.92 411.02 NaN NaN NaN 765.0 1553144.0 69.0 6578.0 1.0 78.0 2452305.0 60624.0 1.0
32 373 25 42.12 2.52 44.64 57.38 6.12 37.48 2.04 2.60 66.02 NaN NaN NaN 883.0 1564003.0 838.0 1743.0 1.0 18.0 2451053.0 35984.0 1.0
33 1304 25 772.59 46.35 818.94 28.93 178.23 347.66 50.99 373.94 253.51 NaN NaN NaN 932.0 77813.0 838.0 3196.0 1.0 39.0 2451079.0 50088.0 1.0
34 1085 27 382.20 0.00 382.20 97.85 154.56 259.89 13.45 108.86 252.41 NaN NaN NaN 590.0 637321.0 780.0 1532.0 1.0 84.0 2451966.0 49139.0 2.0
35 1935 27 59.84 1.79 61.63 38.22 137.72 43.68 6.62 9.54 177.73 NaN NaN NaN 896.0 178335.0 780.0 4892.0 1.0 22.0 2451964.0 49463.0 1.0
36 1334 29 5.04 0.45 5.49 85.50 15.96 3.83 0.03 1.18 101.91 NaN NaN NaN 868.0 1723855.0 631.0 885.0 1.0 6.0 2451259.0 35185.0 2.0
37 1234 29 41.80 3.76 45.56 18.82 985.16 17.13 24.17 0.50 1007.74 NaN NaN NaN 10.0 135738.0 631.0 5274.0 1.0 22.0 2451174.0 32214.0 2.0
38 205 32 2092.23 167.37 2259.60 14.26 987.28 941.50 149.59 1001.14 1168.91 NaN NaN NaN 125.0 222350.0 120.0 2461.0 1.0 41.0 2451983.0 33769.0 2.0
39 205 34 208.78 16.70 225.48 77.95 223.73 198.34 3.65 6.79 318.38 NaN NaN NaN 883.0 934775.0 971.0 429.0 1.0 13.0 2451392.0 48895.0 1.0
40 1537 35 144.00 0.00 144.00 36.15 2167.20 87.84 39.87 16.29 2203.35 NaN NaN NaN 107.0 539558.0 958.0 6809.0 1.0 60.0 2452196.0 33535.0 2.0
41 1117 36 999.45 79.95 1079.40 29.51 35.10 499.72 439.76 59.97 144.56 NaN NaN NaN 711.0 1243218.0 8.0 3988.0 1.0 45.0 2452306.0 40321.0 1.0
42 1705 36 NaN 3.49 NaN NaN NaN 7.49 13.58 NaN NaN NaN NaN NaN NaN 882385.0 8.0 NaN 1.0 NaN 2452317.0 53999.0 2.0
43 631 36 541.31 43.30 584.61 71.10 241.36 519.65 10.18 11.48 355.76 NaN NaN NaN 735.0 465142.0 722.0 3315.0 1.0 7.0 2452279.0 41984.0 1.0
44 415 37 8562.90 513.77 9076.67 8.17 366.35 4195.82 3493.66 873.42 888.29 NaN NaN NaN 144.0 491912.0 252.0 5028.0 1.0 85.0 2452128.0 30131.0 2.0
45 1670 41 1327.36 79.64 1407.00 49.73 558.79 66.36 731.38 529.62 688.16 NaN NaN NaN 714.0 1681246.0 890.0 5780.0 1.0 17.0 2451271.0 44173.0 1.0
46 130 42 422.24 8.44 430.68 48.27 551.20 329.34 15.79 77.11 607.91 NaN NaN NaN 487.0 1577815.0 423.0 3651.0 1.0 13.0 2451092.0 43741.0 1.0
47 1219 42 1240.55 0.00 1240.55 86.84 68.80 719.51 359.51 161.53 155.64 NaN NaN NaN 912.0 1611739.0 229.0 3649.0 1.0 43.0 2451033.0 54994.0 2.0
48 1820 42 475.54 9.51 485.05 73.37 317.07 128.39 197.87 149.28 399.95 NaN NaN NaN 223.0 134560.0 152.0 4215.0 1.0 13.0 2451073.0 52318.0 1.0
49 597 45 2703.87 243.34 2947.21 59.97 386.10 1487.12 790.88 425.87 689.41 NaN NaN NaN 621.0 1581204.0 606.0 3389.0 1.0 39.0 2452295.0 39258.0 2.0
50 992 46 3742.14 149.68 3891.82 24.47 379.29 3442.76 59.87 239.51 553.44 NaN NaN NaN 832.0 194443.0 598.0 4161.0 1.0 47.0 2451354.0 60360.0 2.0
51 398 46 NaN NaN 453.29 51.61 207.48 104.60 86.12 NaN 276.52 NaN NaN NaN NaN NaN NaN 3068.0 NaN 38.0 NaN 59918.0 1.0
52 368 47 8.12 0.73 8.85 19.08 7.43 3.81 0.77 3.54 27.24 NaN NaN NaN 373.0 1256944.0 903.0 382.0 1.0 1.0 2451177.0 58870.0 1.0
53 199 48 199.35 17.94 217.29 11.83 112.95 191.37 0.71 7.27 142.72 NaN NaN NaN 391.0 1862359.0 843.0 2275.0 1.0 5.0 2452738.0 29363.0 2.0
54 1215 48 392.20 27.45 419.65 10.16 116.00 152.95 224.89 14.36 153.61 NaN NaN NaN 251.0 1047097.0 202.0 5374.0 1.0 10.0 2452745.0 44637.0 2.0
55 1592 49 496.23 29.77 526.00 48.23 31.92 282.85 142.96 70.42 109.92 NaN NaN NaN 91.0 103157.0 590.0 6724.0 1.0 21.0 2451892.0 35637.0 2.0
56 311 51 172.10 5.16 177.26 22.72 64.20 170.37 1.59 0.14 92.08 NaN NaN NaN 61.0 945253.0 517.0 3357.0 1.0 5.0 2451769.0 38709.0 2.0
57 266 52 911.04 0.00 911.04 21.65 378.17 619.50 253.63 37.91 399.82 NaN NaN NaN 230.0 173053.0 831.0 4865.0 1.0 13.0 2451102.0 32082.0 2.0
58 514 52 113.50 1.13 114.63 62.63 125.50 30.64 25.68 57.18 189.26 NaN NaN NaN 196.0 1866272.0 810.0 3734.0 1.0 25.0 2451088.0 55568.0 2.0
59 1006 53 2.23 0.08 2.31 26.56 1.48 0.20 0.89 1.14 28.12 NaN NaN NaN 885.0 508248.0 672.0 5690.0 1.0 1.0 2451573.0 36729.0 1.0
60 1707 54 95.48 3.81 99.29 93.36 8.36 34.37 36.05 25.06 105.53 NaN NaN NaN 162.0 1042828.0 157.0 4295.0 1.0 11.0 2452729.0 48880.0 1.0
61 350 55 252.67 12.63 265.30 20.45 63.14 194.55 42.42 15.70 96.22 NaN NaN NaN 463.0 869419.0 297.0 5541.0 1.0 11.0 2452040.0 43895.0 1.0
62 357 60 2733.90 54.67 2788.57 60.37 0.00 683.47 1558.32 492.11 115.04 NaN NaN NaN 82.0 972821.0 967.0 2228.0 1.0 78.0 2452339.0 46469.0 1.0
63 1113 62 446.76 26.80 473.56 67.62 213.66 58.07 15.54 373.15 308.08 NaN NaN NaN 703.0 1420275.0 197.0 5589.0 1.0 6.0 2452254.0 40433.0 1.0
64 1818 63 NaN 11.73 NaN NaN NaN 172.06 NaN NaN 568.77 NaN NaN NaN 488.0 305648.0 129.0 NaN 1.0 NaN 2452701.0 35838.0 NaN
65 1831 63 78.56 0.00 78.56 96.23 49.60 43.99 21.43 13.14 145.83 NaN NaN NaN 302.0 1086498.0 129.0 2400.0 1.0 16.0 2452596.0 29520.0 1.0
66 1513 63 216.16 19.45 235.61 57.17 242.76 108.08 104.83 3.25 319.38 NaN NaN NaN 610.0 479318.0 129.0 1264.0 1.0 28.0 2452604.0 36240.0 2.0
67 723 64 583.49 40.84 624.33 54.92 392.35 280.07 203.29 100.13 488.11 NaN NaN NaN 782.0 145292.0 17.0 437.0 1.0 19.0 2452593.0 55466.0 2.0
68 913 64 2325.60 0.00 2325.60 57.60 1987.30 1046.52 575.58 703.50 2044.90 NaN NaN NaN 33.0 492805.0 17.0 2019.0 1.0 34.0 2452556.0 56489.0 1.0
69 1125 64 6903.60 0.00 6903.60 76.02 2987.82 6213.24 352.08 338.28 3063.84 NaN NaN NaN 193.0 569529.0 17.0 3161.0 1.0 66.0 2452437.0 54978.0 1.0
70 1629 66 630.75 25.23 655.98 2.26 336.30 491.98 80.48 58.29 363.79 NaN NaN NaN 465.0 1603765.0 766.0 4015.0 1.0 15.0 2452346.0 53160.0 2.0
71 1705 67 594.09 23.76 617.85 40.24 1063.54 160.40 56.37 377.32 1127.54 NaN NaN NaN 930.0 529565.0 624.0 2324.0 1.0 41.0 2452555.0 43088.0 1.0
72 481 68 178.50 5.35 183.85 96.73 53.76 82.11 75.18 21.21 155.84 NaN NaN NaN 205.0 496988.0 564.0 6773.0 1.0 21.0 2451258.0 43812.0 2.0
73 196 71 13.48 0.13 13.61 91.25 2.92 6.33 5.14 2.01 94.30 NaN NaN NaN 738.0 875823.0 942.0 2104.0 1.0 2.0 2451256.0 50305.0 1.0
74 205 71 188.00 16.92 204.92 44.05 51.25 150.40 6.39 31.21 112.22 NaN NaN NaN 1.0 1910912.0 239.0 233.0 1.0 25.0 2451294.0 44684.0 2.0
75 1225 71 164.65 1.64 166.29 75.66 205.80 74.09 12.67 77.89 283.10 NaN NaN NaN 146.0 195885.0 239.0 3539.0 1.0 5.0 2451329.0 29997.0 2.0
76 521 72 166.41 1.66 168.07 1.14 64.92 59.90 62.84 43.67 67.72 NaN NaN NaN 468.0 1271817.0 602.0 6019.0 1.0 3.0 2451829.0 50278.0 1.0
77 1540 74 36.32 0.00 36.32 38.54 42.96 12.71 6.13 17.48 81.50 NaN NaN NaN 886.0 767720.0 337.0 4103.0 1.0 4.0 2451174.0 57809.0 2.0
78 569 76 76.51 6.88 83.39 66.92 30.28 56.61 19.70 0.20 104.08 NaN NaN NaN 580.0 78088.0 531.0 234.0 1.0 1.0 2452279.0 52274.0 2.0
79 1627 76 796.05 31.84 827.89 91.64 176.85 278.61 243.19 274.25 300.33 NaN NaN NaN 352.0 1630980.0 531.0 4166.0 1.0 15.0 2452242.0 52421.0 1.0
80 1856 77 569.40 45.55 614.95 45.00 621.20 529.54 19.93 19.93 711.75 NaN NaN NaN 43.0 622349.0 102.0 4796.0 1.0 10.0 2451201.0 32557.0 2.0
81 1741 78 1077.83 64.66 1142.49 77.87 576.81 506.58 457.00 114.25 719.34 NaN NaN NaN 309.0 1758891.0 529.0 3500.0 1.0 13.0 2451155.0 53923.0 1.0
82 31 79 797.64 71.78 869.42 57.39 1296.08 71.78 79.84 646.02 1425.25 NaN NaN NaN 483.0 382863.0 17.0 6073.0 1.0 34.0 2452290.0 54248.0 1.0
83 13 80 6830.08 68.30 6898.38 85.70 148.48 6625.17 127.04 77.87 302.48 NaN NaN NaN 916.0 1254797.0 368.0 4380.0 1.0 64.0 2451154.0 51844.0 2.0
84 358 81 1416.58 42.49 1459.07 16.86 849.86 1388.24 23.52 4.82 909.21 NaN NaN NaN 915.0 459305.0 625.0 510.0 1.0 22.0 2451281.0 48144.0 1.0
85 1543 81 0.00 0.00 0.00 94.53 24.55 0.00 0.00 0.00 119.08 NaN NaN NaN 147.0 944226.0 625.0 463.0 1.0 5.0 2451214.0 55537.0 2.0
86 1790 82 1491.00 NaN NaN NaN 545.30 NaN 735.06 NaN 707.47 NaN NaN NaN NaN NaN 512.0 3587.0 NaN NaN 2451369.0 NaN 1.0
87 1780 82 847.84 42.39 890.23 40.52 77.04 576.53 208.90 62.41 159.95 NaN NaN NaN 356.0 1082287.0 896.0 645.0 1.0 8.0 2451471.0 50769.0 1.0
88 1996 82 1399.65 55.98 1455.63 74.63 447.63 839.79 156.76 403.10 578.24 NaN NaN NaN 230.0 1427925.0 896.0 1401.0 1.0 43.0 2451533.0 34774.0 2.0
89 1671 83 1151.01 23.02 1174.03 28.22 146.16 115.10 973.75 62.16 197.40 NaN NaN NaN 175.0 842053.0 678.0 5314.0 1.0 21.0 2452677.0 50033.0 1.0
90 1951 84 323.00 19.38 342.38 5.27 171.25 261.63 43.57 17.80 195.90 NaN NaN NaN 165.0 1034463.0 91.0 114.0 1.0 5.0 2452530.0 44806.0 1.0
91 1482 84 1733.76 156.03 1889.79 98.99 1155.42 208.05 671.31 854.40 1410.44 NaN NaN NaN 7.0 222509.0 91.0 5658.0 1.0 63.0 2452550.0 39316.0 2.0
92 984 84 112.84 0.00 112.84 47.55 130.00 44.00 68.84 0.00 177.55 NaN NaN NaN 818.0 1844056.0 91.0 137.0 1.0 52.0 2452550.0 56385.0 2.0
93 363 86 50.00 4.00 54.00 95.65 2.50 29.00 16.38 4.62 102.15 NaN NaN NaN 452.0 1435175.0 560.0 1237.0 1.0 25.0 2452743.0 53098.0 1.0
94 1039 86 100.44 3.01 103.45 81.54 343.32 50.22 6.52 43.70 427.87 NaN NaN NaN 430.0 705875.0 359.0 2076.0 1.0 12.0 2452805.0 37053.0 2.0
95 920 87 NaN NaN NaN 35.41 NaN 213.43 NaN 0.17 NaN NaN NaN NaN NaN 1393955.0 NaN NaN NaN 17.0 2451604.0 NaN NaN
96 1685 88 146.20 0.00 146.20 22.87 1376.66 86.25 23.38 36.57 1399.53 NaN NaN NaN 403.0 1361123.0 272.0 1963.0 1.0 34.0 2452317.0 32925.0 1.0
97 1679 88 1168.30 70.09 1238.39 37.61 1168.30 198.61 96.96 872.73 1276.00 NaN NaN NaN 372.0 341664.0 110.0 7018.0 1.0 70.0 2452260.0 58521.0 2.0
98 788 89 131.14 0.00 131.14 75.40 53.76 111.46 17.51 2.17 129.16 NaN NaN NaN 52.0 751267.0 994.0 6036.0 1.0 1.0 2451907.0 56892.0 1.0

stg_store_returns.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"store_returns_renamed" AS (
    -- Rename: Renaming columns
    -- SS_SOLD_DATE_SK -> sale_date_id
    -- SS_SOLD_TIME_SK -> sale_time_id
    -- SS_ITEM_SK -> item_id
    -- SS_CUSTOMER_SK -> customer_id
    -- SS_CDEMO_SK -> customer_demo_id
    -- SS_HDEMO_SK -> household_demo_id
    -- SS_ADDR_SK -> address_id
    -- SS_STORE_SK -> store_id
    -- SS_PROMO_SK -> promotion_id
    -- SS_TICKET_NUMBER -> ticket_number
    -- SS_QUANTITY -> quantity
    -- SS_WHOLESALE_COST -> unit_wholesale_cost
    -- SS_LIST_PRICE -> unit_list_price
    -- SS_SALES_PRICE -> unit_sales_price
    -- SS_EXT_DISCOUNT_AMT -> total_discount_amount
    -- SS_EXT_SALES_PRICE -> total_sales_price
    -- SS_EXT_WHOLESALE_COST -> total_wholesale_cost
    -- SS_EXT_LIST_PRICE -> total_list_price
    -- SS_EXT_TAX -> total_tax_amount
    -- SS_COUPON_AMT -> coupon_amount
    -- SS_NET_PAID -> net_paid
    -- SS_NET_PAID_INC_TAX -> net_paid_with_tax
    -- SS_NET_PROFIT -> net_profit
    SELECT 
        "SS_SOLD_DATE_SK" AS "sale_date_id",
        "SS_SOLD_TIME_SK" AS "sale_time_id",
        "SS_ITEM_SK" AS "item_id",
        "SS_CUSTOMER_SK" AS "customer_id",
        "SS_CDEMO_SK" AS "customer_demo_id",
        "SS_HDEMO_SK" AS "household_demo_id",
        "SS_ADDR_SK" AS "address_id",
        "SS_STORE_SK" AS "store_id",
        "SS_PROMO_SK" AS "promotion_id",
        "SS_TICKET_NUMBER" AS "ticket_number",
        "SS_QUANTITY" AS "quantity",
        "SS_WHOLESALE_COST" AS "unit_wholesale_cost",
        "SS_LIST_PRICE" AS "unit_list_price",
        "SS_SALES_PRICE" AS "unit_sales_price",
        "SS_EXT_DISCOUNT_AMT" AS "total_discount_amount",
        "SS_EXT_SALES_PRICE" AS "total_sales_price",
        "SS_EXT_WHOLESALE_COST" AS "total_wholesale_cost",
        "SS_EXT_LIST_PRICE" AS "total_list_price",
        "SS_EXT_TAX" AS "total_tax_amount",
        "SS_COUPON_AMT" AS "coupon_amount",
        "SS_NET_PAID" AS "net_paid",
        "SS_NET_PAID_INC_TAX" AS "net_paid_with_tax",
        "SS_NET_PROFIT" AS "net_profit"
    FROM "store_returns"
),

"store_returns_renamed_casted" AS (
    -- Column Type Casting: 
    -- address_id: from DECIMAL to INT
    -- customer_demo_id: from DECIMAL to INT
    -- customer_id: from DECIMAL to INT
    -- household_demo_id: from DECIMAL to INT
    -- promotion_id: from DECIMAL to INT
    -- quantity: from DECIMAL to INT
    -- sale_date_id: from DECIMAL to INT
    -- sale_time_id: from DECIMAL to INT
    -- store_id: from DECIMAL to INT
    SELECT
        "item_id",
        "ticket_number",
        "unit_wholesale_cost",
        "unit_list_price",
        "unit_sales_price",
        "total_discount_amount",
        "total_sales_price",
        "total_wholesale_cost",
        "total_list_price",
        "total_tax_amount",
        "coupon_amount",
        "net_paid",
        "net_paid_with_tax",
        "net_profit",
        CAST("address_id" AS INT) AS "address_id",
        CAST("customer_demo_id" AS INT) AS "customer_demo_id",
        CAST("customer_id" AS INT) AS "customer_id",
        CAST("household_demo_id" AS INT) AS "household_demo_id",
        CAST("promotion_id" AS INT) AS "promotion_id",
        CAST("quantity" AS INTEGER) AS "quantity",
        CAST("sale_date_id" AS INT) AS "sale_date_id",
        CAST("sale_time_id" AS INT) AS "sale_time_id",
        CAST("store_id" AS INT) AS "store_id"
    FROM "store_returns_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "store_returns_renamed_casted"

stg_store_returns.yml (Document the table)

version: 2
models:
- name: stg_store_returns
  description: The table is about store returns. It includes details such as the date
    and time of the return, item and customer information, store and promotion details,
    quantities, costs, prices, discounts, and various financial calculations related
    to the return transaction. Each row represents a single item returned in a transaction.
  columns:
  - name: item_id
    description: Item surrogate key
    tests:
    - not_null
  - name: ticket_number
    description: Ticket number for the transaction
    tests:
    - not_null
  - name: unit_wholesale_cost
    description: Wholesale cost per unit
    tests:
    - not_null
  - name: unit_list_price
    description: List price per unit
    tests:
    - not_null
  - name: unit_sales_price
    description: Sales price per unit
    tests:
    - not_null
  - name: total_discount_amount
    description: Extended discount amount
    tests:
    - not_null
  - name: total_sales_price
    description: Extended sales price
    tests:
    - not_null
  - name: total_wholesale_cost
    description: Extended wholesale cost
    tests:
    - not_null
  - name: total_list_price
    description: Extended list price
    tests:
    - not_null
  - name: total_tax_amount
    description: Extended tax amount
    tests:
    - not_null
  - name: coupon_amount
    description: Amount of coupon applied
    tests:
    - not_null
  - name: net_paid
    description: Net amount paid
    cocoon_meta:
      missing_acceptable: Zero value when item is free or fully discounted
  - name: net_paid_with_tax
    description: Net amount paid including tax
    cocoon_meta:
      missing_acceptable: Zero value when item is free or fully discounted
  - name: net_profit
    description: Net profit
    cocoon_meta:
      missing_acceptable: No profit calculation for free or fully discounted items
  - name: address_id
    description: Address surrogate key
    tests:
    - not_null
  - name: customer_demo_id
    description: Customer demographics surrogate key
    tests:
    - not_null
  - name: customer_id
    description: Customer surrogate key
    tests:
    - not_null
  - name: household_demo_id
    description: Household demographics surrogate key
    tests:
    - not_null
  - name: promotion_id
    description: Promotion surrogate key
    tests:
    - not_null
  - name: quantity
    description: Quantity of items
    tests:
    - not_null
  - name: sale_date_id
    description: Date surrogate key
    tests:
    - not_null
  - name: sale_time_id
    description: Time surrogate key
    tests:
    - not_null
  - name: store_id
    description: Store surrogate key
    tests:
    - not_null

stg_reason (first 100 rows)

reason_surrogate_key reason_id reason_description
0 1 AAAAAAAABAAAAAAA Package was damaged

stg_reason.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"reason_renamed" AS (
    -- Rename: Renaming columns
    -- R_REASON_SK -> reason_surrogate_key
    -- R_REASON_ID -> reason_id
    -- R_REASON_DESC -> reason_description
    SELECT 
        "R_REASON_SK" AS "reason_surrogate_key",
        "R_REASON_ID" AS "reason_id",
        "R_REASON_DESC" AS "reason_description"
    FROM "reason"
)

-- COCOON BLOCK END
SELECT * FROM "reason_renamed"

stg_reason.yml (Document the table)

version: 2
models:
- name: stg_reason
  description: The table is about reasons for returns or issues. It contains a surrogate
    key, a reason ID, and a description of the reason. Each row represents a specific
    reason, like "Package was damaged". This table likely connects to other tables
    to provide context for customer returns or order problems.
  columns:
  - name: reason_surrogate_key
    description: Surrogate key for the reason
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key for the reason. For this table, each
        row represents a specific reason for returns or issues. As a surrogate key,
        it is designed to be unique across rows and can serve as an identifier for
        each reason.
  - name: reason_id
    description: Unique identifier for the reason
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for the reason.
        For this table, each row represents a specific reason for returns or issues.
        Being a unique identifier, it should be unique across all rows and can serve
        as an identifier for each reason.
  - name: reason_description
    description: Description of the return or issue reason
    tests:
    - not_null
    - accepted_values:
        values:
        - Package was damaged
        - Wrong item received
        - Item missing from package
        - Item defective or not working
        - Item doesn't match description
        - Size or fit issue
        - Changed mind
        - Found better price elsewhere
        - Arrived too late
        - Unauthorized purchase
        - Packaging issue
        - Quality not as expected
        - Allergic reaction or safety concern

stg_customer (first 100 rows)

customer_key customer_id current_address_key salutation first_name last_name birth_country email_address birth_day birth_month birth_year current_demographics_key current_household_key first_sale_date_key first_shipment_date_key is_preferred_customer last_review_date_key login
0 1 AAAAAAAABAAAAAAA 946 Mr. Javier Lewis CHILE Javier.Lewis@VFAxlnZEvOx.org 9.0 12.0 1936.0 980124.0 7135.0 2452208.0 2452238.0 True 2452508.0 None
1 2 AAAAAAAACAAAAAAA 655 Dr. Amy Moses TOGO Amy.Moses@Ovk9KjHH.com 9.0 4.0 1966.0 819667.0 1461.0 2452288.0 2452318.0 True 2452318.0 None
2 3 AAAAAAAADAAAAAAA 572 Miss Latisha Hamilton NIUE Latisha.Hamilton@V.com 18.0 9.0 1979.0 1473522.0 6247.0 2449100.0 2449130.0 False 2452313.0 None
3 4 AAAAAAAAEAAAAAAA 558 Dr. Michael White MEXICO Michael.White@i.org 7.0 6.0 1983.0 1703214.0 3986.0 2450000.0 2450030.0 False 2452361.0 None
4 5 AAAAAAAAFAAAAAAA 368 Sir Robert Moran FIJI Robert.Moran@Hh.edu 8.0 5.0 1956.0 953372.0 4470.0 2449408.0 2449438.0 False 2452469.0 None
5 6 AAAAAAAAGAAAAAAA 82 Ms. Brunilda Sharp SURINAME Brunilda.Sharp@T3pylZEUQjm.org 4.0 12.0 1925.0 213219.0 6374.0 2451853.0 2451883.0 False 2452430.0 None
6 7 AAAAAAAAHAAAAAAA 814 Ms. Fonda Wiles GAMBIA Fonda.Wiles@S9KnyEtz9hv.org 24.0 4.0 1985.0 68377.0 3219.0 2451408.0 2451438.0 True 2452360.0 None
7 8 AAAAAAAAIAAAAAAA 598 Sir Ollie Shipman SOUTH KOREA Ollie.Shipman@be.org 26.0 12.0 1938.0 1215897.0 2471.0 2449376.0 2449406.0 False 2452334.0 None
8 9 AAAAAAAAJAAAAAAA 388 Sir Karl Gilbert MONTSERRAT Karl.Gilbert@Crg5KyP2IxX9C4d6.edu 26.0 10.0 1966.0 1168667.0 1404.0 2452245.0 2452275.0 False 2452454.0 None
9 10 AAAAAAAAKAAAAAAA 580 Ms. Albert Brunson JORDAN Albert.Brunson@62.com 15.0 10.0 1973.0 1207553.0 5143.0 2451323.0 2451353.0 False 2452641.0 None
10 11 AAAAAAAALAAAAAAA 999 Ms. Betty Williams BURKINA FASO Betty.Williams@xRtDqM1eLBVQNoYAJ.com 18.0 12.0 1963.0 1114415.0 6807.0 2452258.0 2452288.0 False 2452398.0 None
11 12 AAAAAAAAMAAAAAAA 366 Ms. Margaret Farias TURKMENISTAN Margaret.Farias@cb.edu 2.0 6.0 1956.0 502141.0 6577.0 2451009.0 2451039.0 False 2452634.0 None
12 13 AAAAAAAANAAAAAAA 6 Mrs. Rosalinda Grimes UKRAINE Rosalinda.Grimes@tC8pcU7Lt.edu 1.0 3.0 1970.0 1128748.0 2777.0 2449628.0 2449658.0 False 2452616.0 None
13 14 AAAAAAAAOAAAAAAA 440 Mr. Jack Wilcox SLOVENIA Jack.Wilcox@Y3Etqyv3.org 30.0 3.0 1937.0 929344.0 892.0 2450288.0 2450318.0 False 2452641.0 None
14 15 AAAAAAAAPAAAAAAA 469 Ms. Tonya None None None NaN 12.0 1969.0 NaN 134.0 2449010.0 NaN NaN 2452376.0 None
15 16 AAAAAAAAABAAAAAA 302 Dr. Margie Browning PHILIPPINES Margie.Browning@LM674NrE2.org 24.0 12.0 1933.0 1196373.0 3014.0 2451316.0 2451346.0 False 2452573.0 None
16 17 AAAAAAAABBAAAAAA 228 Dr. Lee Stovall PHILIPPINES Lee.Stovall@fqKC83UU0f.org 23.0 12.0 1972.0 707524.0 3876.0 2451038.0 2451068.0 False 2452454.0 None
17 18 AAAAAAAACBAAAAAA 456 Sir Brad Lynch URUGUAY Brad.Lynch@nAbai.edu 1.0 9.0 1950.0 1361151.0 6580.0 2450011.0 2450041.0 True 2452549.0 None
18 19 AAAAAAAADBAAAAAA 581 Dr. Andre Moore NICARAGUA Andre.Moore@cTZLGYi1ZJi.org 20.0 10.0 1978.0 1161742.0 4238.0 2449550.0 2449580.0 False 2452576.0 None
19 20 AAAAAAAAEBAAAAAA 966 Mr. Stanton Dallas SWITZERLAND Stanton.Dallas@DBXgl18FGo.edu 17.0 5.0 1976.0 1185612.0 89.0 2450935.0 2450965.0 True 2452334.0 None
20 21 AAAAAAAAFBAAAAAA 979 Miss Naomi Barnett BAHAMAS Naomi.Barnett@2T3V3OZOy4KBNAHsT.edu 18.0 5.0 1956.0 442697.0 6538.0 2451797.0 2451827.0 False 2452433.0 None
21 22 AAAAAAAAGBAAAAAA 467 Sir Victor Martinez CAYMAN ISLANDS Victor.Martinez@fC.edu 21.0 12.0 1991.0 490494.0 4504.0 2451435.0 2451465.0 False 2452529.0 None
22 23 AAAAAAAAHBAAAAAA 686 Sir None Garrison None Earl.Garrison@G3sM4P.com NaN 5.0 NaN NaN 2107.0 2450982.0 2451012.0 False NaN None
23 24 AAAAAAAAIBAAAAAA 291 Dr. Paul Morris GUINEA-BISSAU Paul.Morris@FMGalegqc3.com 6.0 6.0 1951.0 17113.0 1102.0 2450068.0 2450098.0 True 2452499.0 None
24 25 AAAAAAAAJBAAAAAA 933 Miss Nancy Mccormick BAHAMAS Nancy.Mccormick@DA26I9ZArLF9rxJ6Z.edu 6.0 10.0 1973.0 476176.0 3278.0 2449216.0 2449246.0 False 2452425.0 None
25 26 AAAAAAAAKBAAAAAA 206 Ms. Monique Baker MOROCCO Monique.Baker@9uEucNczY.org 14.0 6.0 1991.0 230278.0 1242.0 2449786.0 2449816.0 False 2452356.0 None
26 27 AAAAAAAALBAAAAAA 96 Dr. Shawn Prather PUERTO RICO Shawn.Prather@8BusRYegn6.org 7.0 3.0 1972.0 111621.0 835.0 2450581.0 2450611.0 False 2452353.0 None
27 28 AAAAAAAAMBAAAAAA 480 Miss Edith Hernandez IVORY COAST Edith.Hernandez@BNHL0k.com 17.0 8.0 1959.0 889961.0 897.0 2452585.0 2452615.0 True 2452631.0 None
28 29 AAAAAAAANBAAAAAA 139 Ms. Margaret Collins NETHERLANDS ANTILLES Margaret.Collins@9obPr3UV.org 25.0 8.0 1973.0 1634269.0 1204.0 2452186.0 2452216.0 True 2452496.0 None
29 30 AAAAAAAAOBAAAAAA 459 Dr. Pamela Luna GUAM Pamela.Luna@QBGuhL36lnA.edu 4.0 7.0 1956.0 84232.0 5869.0 2449886.0 2449916.0 True 2452410.0 None
30 31 AAAAAAAAPBAAAAAA 128 Dr. William Craig SPAIN William.Craig@prVDE1E8AHc.org 13.0 6.0 1964.0 1275120.0 5724.0 2452024.0 2452054.0 False 2452336.0 None
31 32 AAAAAAAAACAAAAAA 290 Dr. Kenneth Wood MOLDOVA Kenneth.Wood@RIA.edu 2.0 8.0 1927.0 1369589.0 6163.0 2449441.0 2449471.0 False 2452510.0 None
32 33 AAAAAAAABCAAAAAA 438 Mrs. Donna Betts FRANCE Donna.Betts@YJ14k.edu 25.0 3.0 1958.0 1680761.0 5823.0 2451542.0 2451572.0 True 2452455.0 None
33 34 AAAAAAAACCAAAAAA 501 None None Woods None Brandon.Woods@hjKbf.edu NaN NaN NaN NaN NaN 2452162.0 2452192.0 NaN 2452408.0 None
34 35 AAAAAAAADCAAAAAA 231 Dr. Marie Peterson KIRIBATI Marie.Peterson@1zg9tydFHafA5.com 19.0 6.0 1953.0 339036.0 2057.0 2451907.0 2451937.0 False 2452581.0 None
35 36 AAAAAAAAECAAAAAA 585 Dr. Anthony Fisher KYRGYZSTAN Anthony.Fisher@jJrZfeDcz8P.com 29.0 11.0 1968.0 655414.0 2223.0 2449192.0 2449222.0 False 2452470.0 None
36 37 AAAAAAAAFCAAAAAA 943 Dr. Dwight Schneider RUSSIA Dwight.Schneider@koxO7zAysvOd.com 9.0 1.0 1949.0 827972.0 2281.0 2449818.0 2449848.0 True 2452293.0 None
37 38 AAAAAAAAGCAAAAAA 360 Mrs. Ha Carpenter PARAGUAY Ha.Carpenter@XgcUt4svNz.com 30.0 3.0 1939.0 766645.0 3879.0 2450293.0 2450323.0 True 2452351.0 None
38 39 AAAAAAAAHCAAAAAA 844 Sir Neil Cox ECUADOR Neil.Cox@FRuR2bFK.com 14.0 12.0 1951.0 1617182.0 4013.0 2452101.0 2452131.0 False 2452586.0 None
39 40 AAAAAAAAICAAAAAA 45 None Jacqueline Hatfield None None 26.0 NaN 1942.0 1795301.0 NaN NaN 2451159.0 NaN NaN None
40 41 AAAAAAAAJCAAAAAA 316 Miss Maxine Carlson ISLE OF MAN Maxine.Carlson@StyP5lAokmQ29QHYMLa.edu 26.0 6.0 1939.0 941420.0 5068.0 2449959.0 2449989.0 False 2452464.0 None
41 42 AAAAAAAAKCAAAAAA 277 Dr. Deborah Burton COMOROS Deborah.Burton@xt.edu 17.0 1.0 1950.0 1867377.0 3327.0 2449839.0 2449869.0 False 2452498.0 None
42 43 AAAAAAAALCAAAAAA 743 Mr. William Warner GUAM William.Warner@zegnrzurU.org 5.0 12.0 1965.0 385562.0 3676.0 2451675.0 2451705.0 True 2452537.0 None
43 44 AAAAAAAAMCAAAAAA 296 Miss Mabel Richmond CAMBODIA Mabel.Richmond@Tkla.edu 7.0 12.0 1932.0 497758.0 5427.0 2449720.0 2449750.0 True 2452333.0 None
44 45 AAAAAAAANCAAAAAA 777 None None Hammonds NIGER None 5.0 NaN NaN 1036174.0 2399.0 2451088.0 2451118.0 NaN NaN None
45 46 AAAAAAAAOCAAAAAA 386 Mrs. Jane Stephenson TURKEY Jane.Stephenson@lq8ZQLAUMZhR.edu 13.0 4.0 1990.0 843672.0 4729.0 2451827.0 2451857.0 True 2452301.0 None
46 47 AAAAAAAAPCAAAAAA 469 Mr. Luis Young BRUNEI Luis.Young@0DmV.edu 3.0 12.0 1982.0 1634314.0 5368.0 2449135.0 2449165.0 False 2452586.0 None
47 48 AAAAAAAAADAAAAAA 252 Ms. Jill Jackson LUXEMBOURG Jill.Jackson@n6I7SF.org 15.0 9.0 1961.0 8817.0 311.0 2449501.0 2449531.0 False 2452575.0 None
48 49 AAAAAAAABDAAAAAA 581 Mr. Steven Venable NETHERLANDS ANTILLES Steven.Venable@0hA90vhfK7k9F4h.com 13.0 6.0 1961.0 936800.0 1514.0 2449334.0 2449364.0 False 2452350.0 None
49 50 AAAAAAAACDAAAAAA 567 Mr. Christopher Eller AUSTRALIA Christopher.Eller@gV5Ua7HOmt.com 24.0 11.0 1965.0 759177.0 72.0 2449354.0 2449384.0 False 2452520.0 None
50 51 AAAAAAAADDAAAAAA 688 Dr. David Nieves CHRISTMAS ISLAND David.Nieves@LcDkQ.edu 5.0 10.0 1926.0 532799.0 6920.0 2452360.0 2452390.0 False 2452570.0 None
51 52 AAAAAAAAEDAAAAAA 128 Mrs. Wendy Colley FRENCH GUIANA Wendy.Colley@qLBjqbAQQGj.edu 1.0 4.0 1982.0 534808.0 4768.0 2451391.0 2451421.0 False 2452553.0 None
52 53 AAAAAAAAFDAAAAAA 439 Mr. Paul Higgins GABON Paul.Higgins@qG9NrSTLz9HaNHX.edu 23.0 9.0 1950.0 1597348.0 7017.0 2451790.0 2451820.0 True 2452447.0 None
53 54 AAAAAAAAGDAAAAAA 660 Ms. Donna King TUNISIA Donna.King@TEftU.com 3.0 2.0 1940.0 380102.0 2381.0 2449950.0 2449980.0 True 2452446.0 None
54 55 AAAAAAAAHDAAAAAA 256 Dr. Beryl Thomason UNITED KINGDOM Beryl.Thomason@OeqefhtCmZTAj.com 12.0 8.0 1933.0 783093.0 1151.0 2451509.0 2451539.0 False 2452380.0 None
55 56 AAAAAAAAIDAAAAAA 524 Miss Pamela Delgado GUERNSEY Pamela.Delgado@8OpV0Ldj8vq2K9ZK.org 29.0 1.0 1960.0 344460.0 3092.0 2451394.0 2451424.0 False 2452334.0 None
56 57 AAAAAAAAJDAAAAAA 571 Mr. Travis Melendez AFGHANISTAN Travis.Melendez@344rCMk.edu 10.0 3.0 1961.0 752932.0 128.0 2449711.0 2449741.0 True 2452606.0 None
57 58 AAAAAAAAKDAAAAAA 155 Mr. Cecil Peterman ICELAND Cecil.Peterman@tbeqEuUvS4ZM4Px9N.com 29.0 2.0 1988.0 528756.0 6879.0 2451356.0 2451386.0 True 2452447.0 None
58 59 AAAAAAAALDAAAAAA 683 Miss Melanie Morrison HUNGARY Melanie.Morrison@F2foqn.edu 6.0 1.0 1947.0 1895444.0 4787.0 2451127.0 2451157.0 False 2452530.0 None
59 60 AAAAAAAAMDAAAAAA 282 Ms. Dollie Thao SWITZERLAND Dollie.Thao@Xead5vagsekdHDLUkv.edu 15.0 7.0 1990.0 1179671.0 3200.0 2449684.0 2449714.0 False 2452407.0 None
60 61 AAAAAAAANDAAAAAA 688 Sir Joseph White SENEGAL Joseph.White@c0EJ7pimuu.com 6.0 5.0 1978.0 1620078.0 6683.0 2451106.0 2451136.0 True 2452462.0 None
61 62 AAAAAAAAODAAAAAA 413 Mr. Matthew Brown SOUTH KOREA Matthew.Brown@F.edu 1.0 6.0 1973.0 821787.0 4700.0 2451824.0 2451854.0 True 2452319.0 None
62 63 AAAAAAAAPDAAAAAA 716 Dr. Frank Morton EGYPT Frank.Morton@Hd7jNaA3s.com 26.0 4.0 1943.0 1790374.0 2445.0 2450149.0 2450179.0 False 2452425.0 None
63 64 AAAAAAAAAEAAAAAA 930 Dr. Michael Frye CAPE VERDE Michael.Frye@aM1HsbOs0smgpLo.org 27.0 6.0 1941.0 1260191.0 6284.0 2452349.0 2452379.0 False 2452426.0 None
64 65 AAAAAAAABEAAAAAA 584 Dr. Rodney Taft US VIRGIN ISLANDS Rodney.Taft@qe.com 18.0 9.0 1991.0 1778884.0 2234.0 2451868.0 2451898.0 False 2452353.0 None
65 66 AAAAAAAACEAAAAAA 882 Ms. Julie Chester HONG KONG Julie.Chester@Kv.com 8.0 9.0 1950.0 747190.0 6036.0 2449264.0 2449294.0 False 2452375.0 None
66 67 AAAAAAAADEAAAAAA 970 Dr. Gerald Thomas NORWAY Gerald.Thomas@zSuIGSgb6iyu.org 27.0 10.0 1948.0 1118294.0 2032.0 2452003.0 2452033.0 False 2452414.0 None
67 68 AAAAAAAAEEAAAAAA 126 Dr. Arthur Troy LUXEMBOURG Arthur.Troy@3VY5bV30AifrO.com 20.0 8.0 1928.0 779965.0 6069.0 2451906.0 2451936.0 True 2452542.0 None
68 69 AAAAAAAAFEAAAAAA 366 Sir Steven Mcclellan NEPAL Steven.Mcclellan@UviyOLnu2m1POo.edu 15.0 1.0 1950.0 971368.0 4167.0 2450124.0 2450154.0 True 2452340.0 None
69 70 AAAAAAAAGEAAAAAA 102 Sir James Smith KUWAIT James.Smith@ifJngGlNG.edu 7.0 12.0 1963.0 1460929.0 5492.0 2451914.0 2451944.0 False 2452342.0 None
70 71 AAAAAAAAHEAAAAAA 450 Mr. Roderick Rogers OMAN Roderick.Rogers@pJdioQ.com 4.0 11.0 1967.0 1292064.0 2257.0 2450218.0 2450248.0 False 2452462.0 None
71 72 AAAAAAAAIEAAAAAA 390 Dr. Bradley Barry TAJIKISTAN Bradley.Barry@Kq2ONpEXU9YSno31.edu 21.0 3.0 1937.0 1608738.0 6364.0 2451670.0 2451700.0 True 2452601.0 None
72 73 AAAAAAAAJEAAAAAA 369 Mr. David Vasquez ISRAEL David.Vasquez@j.org 17.0 4.0 1956.0 425740.0 431.0 2449103.0 2449133.0 False 2452489.0 None
73 74 AAAAAAAAKEAAAAAA 269 Sir Eric Woods SAINT LUCIA Eric.Woods@CfPzy1AUqxd2.com 19.0 2.0 1953.0 1434225.0 347.0 2452611.0 2452641.0 True 2452584.0 None
74 75 AAAAAAAALEAAAAAA 730 Dr. Annie Grant TUVALU Annie.Grant@tccug5KC1oT2nL.com 25.0 5.0 1925.0 1888603.0 143.0 2451725.0 2451755.0 True 2452401.0 None
75 76 AAAAAAAAMEAAAAAA 691 Mr. Craig Lowry WALLIS AND FUTUNA Craig.Lowry@92zokgx8duX.org 7.0 3.0 1946.0 526064.0 2054.0 2451730.0 2451760.0 True 2452430.0 None
76 77 AAAAAAAANEAAAAAA 154 Dr. Darrin Smith UNITED STATES Darrin.Smith@Mti.edu 30.0 5.0 1931.0 915180.0 2167.0 2451602.0 2451632.0 False 2452355.0 None
77 78 AAAAAAAAOEAAAAAA 264 Ms. Wanda Davis NETHERLANDS ANTILLES Wanda.Davis@I6s7DD86i6.edu 11.0 5.0 1940.0 1092537.0 3677.0 2449358.0 2449388.0 False 2452339.0 None
78 79 AAAAAAAAPEAAAAAA 539 Miss Sandi Tran FRENCH GUIANA Sandi.Tran@myikqStif1Q.edu 10.0 6.0 1937.0 389494.0 3493.0 2450833.0 2450863.0 True 2452644.0 None
79 80 AAAAAAAAAFAAAAAA 727 Mrs. Eleanor Evans IVORY COAST Eleanor.Evans@zxvr5rl.org 21.0 12.0 1948.0 1499808.0 3891.0 2450528.0 2450558.0 False 2452413.0 None
80 81 AAAAAAAABFAAAAAA 306 Ms. Jessica Levesque ALBANIA Jessica.Levesque@06mGqI9mHG.org 17.0 7.0 1940.0 728917.0 388.0 2452532.0 2452562.0 True 2452414.0 None
81 82 AAAAAAAACFAAAAAA 88 Sir Max Mueller IRAQ Max.Mueller@xqCZRBSrTGD6CBvXh.com 26.0 2.0 1947.0 75627.0 5081.0 2450327.0 2450357.0 False 2452303.0 None
82 83 AAAAAAAADFAAAAAA 824 Miss Daisy Flynn NEW ZEALAND Daisy.Flynn@288e6Z0csxJ.com 24.0 1.0 1943.0 976724.0 5574.0 2451002.0 2451032.0 False 2452338.0 None
83 84 AAAAAAAAEFAAAAAA 898 Mrs. Ami Montgomery JAMAICA Ami.Montgomery@VBSKqhL36j55.edu 2.0 5.0 1964.0 1250744.0 2821.0 2449466.0 2449496.0 True 2452526.0 None
84 85 AAAAAAAAFFAAAAAA 575 Miss Michele Baldwin GEORGIA Michele.Baldwin@sIVO1J4U.org 30.0 10.0 1978.0 1293499.0 37.0 2449838.0 2449868.0 True 2452491.0 None
85 86 AAAAAAAAGFAAAAAA 442 Dr. Marvin Matlock BRUNEI Marvin.Matlock@0FXEZp.org 21.0 10.0 1983.0 1428237.0 6963.0 2451530.0 2451560.0 True 2452633.0 None
86 87 AAAAAAAAHFAAAAAA 30 Dr. Kevin White BENIN Kevin.White@x9oTPjEI6AdDQ7n4l.edu 2.0 7.0 1934.0 1452824.0 1427.0 2449374.0 2449404.0 False 2452492.0 None
87 88 AAAAAAAAIFAAAAAA 687 Dr. Phyllis Horner UZBEKISTAN Phyllis.Horner@uQy.edu 20.0 8.0 1965.0 495575.0 131.0 2450961.0 2450991.0 False 2452403.0 None
88 89 AAAAAAAAJFAAAAAA 318 Mrs. Helen Macdonald DOMINICA Helen.Macdonald@3d4.com 15.0 3.0 1981.0 694848.0 5383.0 2451395.0 2451425.0 True 2452626.0 None
89 90 AAAAAAAAKFAAAAAA 139 Mr. Nathan Pond GUYANA Nathan.Pond@nPh7drM687MhI.org 7.0 5.0 1985.0 417827.0 5083.0 2451464.0 2451494.0 True 2452637.0 None
90 91 AAAAAAAALFAAAAAA 906 Miss Heather White MARTINIQUE Heather.White@3JitjmxYQnXAtCNAl.com 28.0 3.0 1962.0 827176.0 2441.0 2450376.0 2450406.0 True 2452295.0 None
91 92 AAAAAAAAMFAAAAAA 211 Miss Crystal Ryan ECUADOR Crystal.Ryan@Ju2rO6u.com 8.0 2.0 1973.0 953084.0 5771.0 2452552.0 2452582.0 True 2452294.0 None
92 93 AAAAAAAANFAAAAAA 836 Sir Clyde Williams FRENCH POLYNESIA Clyde.Williams@en.com 6.0 10.0 1927.0 647375.0 6229.0 2449311.0 2449341.0 False 2452510.0 None
93 94 AAAAAAAAOFAAAAAA 287 Mr. Craig Byrd FRENCH POLYNESIA Craig.Byrd@Dc0OEMXkvvuJ.com 14.0 5.0 1982.0 451893.0 1990.0 2449523.0 2449553.0 True 2452445.0 None
94 95 AAAAAAAAPFAAAAAA 23 Ms. Elizabeth Hollingsworth GREECE Elizabeth.Hollingsworth@lVpeDS5Rcs.com 17.0 4.0 1943.0 796503.0 1663.0 2452438.0 2452468.0 False 2452584.0 None
95 96 AAAAAAAAAGAAAAAA 611 Sir Shaun Lewis NIGERIA Shaun.Lewis@MTRUPYFTXf9.com 22.0 10.0 1955.0 1148074.0 6019.0 2451475.0 2451505.0 False 2452395.0 None
96 97 AAAAAAAABGAAAAAA 41 Mr. Stewart Ruffin MYANMAR Stewart.Ruffin@R7Mrx.edu 19.0 5.0 1971.0 418763.0 102.0 2452437.0 2452467.0 True 2452528.0 None
97 98 AAAAAAAACGAAAAAA 853 Dr. David Lewis KIRIBATI David.Lewis@5mhvq.org 23.0 6.0 1965.0 574977.0 1615.0 2450864.0 2450894.0 False 2452558.0 None
98 99 AAAAAAAADGAAAAAA 228 Sir Austin Tran NAMIBIA Austin.Tran@ect7cnjLsucbd.edu 9.0 12.0 1961.0 622676.0 2152.0 2451657.0 2451687.0 True 2452437.0 None

stg_customer.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"customer_renamed" AS (
    -- Rename: Renaming columns
    -- C_CUSTOMER_SK -> customer_key
    -- C_CUSTOMER_ID -> customer_id
    -- C_CURRENT_CDEMO_SK -> current_demographics_key
    -- C_CURRENT_HDEMO_SK -> current_household_key
    -- C_CURRENT_ADDR_SK -> current_address_key
    -- C_FIRST_SHIPTO_DATE_SK -> first_shipment_date_key
    -- C_FIRST_SALES_DATE_SK -> first_sale_date_key
    -- C_SALUTATION -> salutation
    -- C_FIRST_NAME -> first_name
    -- C_LAST_NAME -> last_name
    -- C_PREFERRED_CUST_FLAG -> is_preferred_customer
    -- C_BIRTH_DAY -> birth_day
    -- C_BIRTH_MONTH -> birth_month
    -- C_BIRTH_YEAR -> birth_year
    -- C_BIRTH_COUNTRY -> birth_country
    -- C_LOGIN -> login
    -- C_EMAIL_ADDRESS -> email_address
    -- C_LAST_REVIEW_DATE_SK -> last_review_date_key
    SELECT 
        "C_CUSTOMER_SK" AS "customer_key",
        "C_CUSTOMER_ID" AS "customer_id",
        "C_CURRENT_CDEMO_SK" AS "current_demographics_key",
        "C_CURRENT_HDEMO_SK" AS "current_household_key",
        "C_CURRENT_ADDR_SK" AS "current_address_key",
        "C_FIRST_SHIPTO_DATE_SK" AS "first_shipment_date_key",
        "C_FIRST_SALES_DATE_SK" AS "first_sale_date_key",
        "C_SALUTATION" AS "salutation",
        "C_FIRST_NAME" AS "first_name",
        "C_LAST_NAME" AS "last_name",
        "C_PREFERRED_CUST_FLAG" AS "is_preferred_customer",
        "C_BIRTH_DAY" AS "birth_day",
        "C_BIRTH_MONTH" AS "birth_month",
        "C_BIRTH_YEAR" AS "birth_year",
        "C_BIRTH_COUNTRY" AS "birth_country",
        "C_LOGIN" AS "login",
        "C_EMAIL_ADDRESS" AS "email_address",
        "C_LAST_REVIEW_DATE_SK" AS "last_review_date_key"
    FROM "customer"
),

"customer_renamed_cleaned" AS (
    -- Clean unusual string values: 
    -- birth_country: The main problems are inconsistent country naming conventions and unusual apostrophes. The correct values should use standard English country names without special characters. "CÔTE D'IVOIRE" should be "IVORY COAST", and "KOREA, REPUBLIC OF" should be "SOUTH KOREA" to align with common naming conventions. Other country names are generally acceptable but could be standardized for consistency (e.g., removing "REPUBLIC OF" from names). 
    SELECT
        "customer_key",
        "customer_id",
        "current_demographics_key",
        "current_household_key",
        "current_address_key",
        "first_shipment_date_key",
        "first_sale_date_key",
        "salutation",
        "first_name",
        "last_name",
        "is_preferred_customer",
        "birth_day",
        "birth_month",
        "birth_year",
        CASE
            WHEN "birth_country" = 'CÔTE D''IVOIRE' THEN 'IVORY COAST'
            WHEN "birth_country" = 'KOREA, REPUBLIC OF' THEN 'SOUTH KOREA'
            WHEN "birth_country" = 'BRUNEI DARUSSALAM' THEN 'BRUNEI'
            WHEN "birth_country" = 'MOLDOVA, REPUBLIC OF' THEN 'MOLDOVA'
            WHEN "birth_country" = 'VIRGIN ISLANDS, U.S.' THEN 'US VIRGIN ISLANDS'
            WHEN "birth_country" = 'RUSSIAN FEDERATION' THEN 'RUSSIA'
            ELSE "birth_country"
        END AS "birth_country",
        "login",
        "email_address",
        "last_review_date_key"
    FROM "customer_renamed"
),

"customer_renamed_cleaned_casted" AS (
    -- Column Type Casting: 
    -- birth_day: from DECIMAL to INT
    -- birth_month: from DECIMAL to INT
    -- birth_year: from DECIMAL to INT
    -- current_demographics_key: from DECIMAL to INT
    -- current_household_key: from DECIMAL to INT
    -- first_sale_date_key: from DECIMAL to INT
    -- first_shipment_date_key: from DECIMAL to INT
    -- is_preferred_customer: from VARCHAR to BOOLEAN
    -- last_review_date_key: from DECIMAL to INT
    -- login: from DECIMAL to VARCHAR
    SELECT
        "customer_key",
        "customer_id",
        "current_address_key",
        "salutation",
        "first_name",
        "last_name",
        "birth_country",
        "email_address",
        CAST("birth_day" AS INT) AS "birth_day",
        CAST("birth_month" AS INT) AS "birth_month",
        CAST("birth_year" AS INT) AS "birth_year",
        CAST("current_demographics_key" AS INT) AS "current_demographics_key",
        CAST("current_household_key" AS INT) AS "current_household_key",
        CAST("first_sale_date_key" AS INT) AS "first_sale_date_key",
        CAST("first_shipment_date_key" AS INT) AS "first_shipment_date_key",
        CAST(CASE WHEN "is_preferred_customer" = 'Y' THEN TRUE WHEN "is_preferred_customer" = 'N' THEN FALSE ELSE NULL END AS BOOLEAN) AS "is_preferred_customer",
        CAST("last_review_date_key" AS INT) AS "last_review_date_key",
        CAST("login" AS VARCHAR) AS "login"
    FROM "customer_renamed_cleaned"
)

-- COCOON BLOCK END
SELECT * FROM "customer_renamed_cleaned_casted"

stg_customer.yml (Document the table)

version: 2
models:
- name: stg_customer
  description: The table is about customer details. It contains personal information
    like name, birth date, and country. It also includes customer-specific data such
    as customer ID, preferred status, and login details. The table tracks important
    dates related to customer interactions, like first shipment and sales dates, and
    last review date. Each customer has a unique identifier (C_CUSTOMER_SK) and various
    demographic keys for further categorization.
  columns:
  - name: customer_key
    description: Customer surrogate key
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key for the customer. For this table,
        each row represents a unique customer, and customer_key is likely to be unique
        across rows as it's designed to be a primary identifier.
  - name: customer_id
    description: Unique identifier for the customer
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for the customer.
        For this table, each row represents a unique customer, and customer_id is
        likely to be unique across rows.
  - name: current_address_key
    description: Current address surrogate key
    tests:
    - not_null
  - name: salutation
    description: Customer's formal greeting or title
    tests:
    - not_null
    - accepted_values:
        values:
        - Dr.
        - Mr.
        - Ms.
        - Sir
        - Miss
        - Mrs.
        - Mx.
        - Prof.
        - Rev.
        - Lady
        - Lord
        - Dame
        - Madam
  - name: first_name
    description: Customer's first name
    tests:
    - not_null
  - name: last_name
    description: Customer's last name
    tests:
    - not_null
  - name: birth_country
    description: Country where the customer was born
    tests:
    - not_null
  - name: email_address
    description: Customer's email address
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column represents the customer's email address. In most systems,
        email addresses are required to be unique for each customer account. Assuming
        this is the case here, it could serve as a candidate key.
  - name: birth_day
    description: Day of the month the customer was born
    tests:
    - not_null
  - name: birth_month
    description: Month the customer was born
    tests:
    - not_null
  - name: birth_year
    description: Year the customer was born
    tests:
    - not_null
  - name: current_demographics_key
    description: Current customer demographics surrogate key
    tests:
    - not_null
  - name: current_household_key
    description: Current household demographics surrogate key
    tests:
    - not_null
  - name: first_sale_date_key
    description: Date of customer's first sale
    tests:
    - not_null
  - name: first_shipment_date_key
    description: Date of customer's first shipment
    tests:
    - not_null
  - name: is_preferred_customer
    description: Indicates if customer is preferred
    tests:
    - not_null
  - name: last_review_date_key
    description: Date of customer's last review
    tests:
    - not_null
  - name: login
    description: Customer's login information
    cocoon_meta:
      missing_acceptable: Not all customers may require or choose to have a login.

stg_customer_address (first 100 rows)

address_surrogate_key address_id street_number street_type suite_number city county state zip_code country gmt_offset residence_type street_name
0 1 AAAAAAAABAAAAAAA 18.0 Parkway Suite 280 Fairfield Maricopa County AZ 86192.0 United States -7.0 condo Jackson
1 2 AAAAAAAACAAAAAAA 362.0 Road Suite 80 Fairview Taos County NM 85709.0 United States -7.0 condo Washington and 6th
2 3 AAAAAAAADAAAAAAA 585.0 Circle Suite Q Pleasant Valley York County PA 12477.0 United States -5.0 single family Washington
3 4 AAAAAAAAEAAAAAAA 111.0 Way Suite A Oak Ridge Kit Carson County CO 88371.0 United States -7.0 condo Smith
4 5 AAAAAAAAFAAAAAAA 31.0 Boulevard Suite 180 Glendale Barry County MO 63951.0 United States -6.0 single family College
5 6 AAAAAAAAGAAAAAAA 59.0 Parkway Suite 100 Lakeview Chelan County WA 98579.0 United States -8.0 single family Williams and Sixth
6 7 AAAAAAAAHAAAAAAA NaN Road Suite U Farmington None None 39145.0 United States NaN None 7th
7 8 AAAAAAAAIAAAAAAA 875.0 Court Suite Y Union Bledsoe County TN 38721.0 United States -5.0 apartment Lincoln
8 9 AAAAAAAAJAAAAAAA 819.0 Avenue Suite 70 New Hope Perry County AL 39431.0 United States -6.0 condo 1st
9 10 AAAAAAAAKAAAAAAA 851.0 Street Suite Y Martinsville Haines Borough AK 90419.0 United States -9.0 condo Woodland and Poplar
10 11 AAAAAAAALAAAAAAA 189.0 Street Suite 470 Maple Grove Madison County MT 68252.0 United States -7.0 single family 13th
11 12 AAAAAAAAMAAAAAAA 76.0 Court Suite O Edgewood Mifflin County PA 10069.0 United States -5.0 apartment 8th
12 13 AAAAAAAANAAAAAAA 424.0 Lane Suite 130 Greenville Noxubee County MS 51387.0 United States -6.0 single family Main and Second
13 14 AAAAAAAAOAAAAAAA 923.0 Drive Suite 100 None Lipscomb County TX 77752.0 None -6.0 None Pine and Oak
14 15 AAAAAAAAPAAAAAAA 314.0 Court Suite B Oakland Washington County OH 49843.0 United States -5.0 apartment Spring
15 16 AAAAAAAAABAAAAAA 576.0 Street Suite J Valley View Oldham County TX 75124.0 United States -6.0 condo Adams Center
16 17 AAAAAAAABBAAAAAA 801.0 Drive Suite 0 Montpelier Richland County OH 48930.0 United States -5.0 single family Green
17 18 AAAAAAAACBAAAAAA 460.0 Court Suite 480 Somerville Potter County SD 57783.0 United States -7.0 condo Maple and Spruce
18 19 AAAAAAAADBAAAAAA 611.0 Way Suite O Oakdale Tangipahoa Parish LA 79584.0 United States -6.0 apartment Wilson
19 20 AAAAAAAAEBAAAAAA 675.0 Street Suite I Hopewell Williams County OH 40587.0 United States -5.0 condo Wilson
20 21 AAAAAAAAFBAAAAAA 294.0 Avenue Suite 390 Springfield Marshall County SD 59303.0 United States -7.0 condo Jefferson
21 22 AAAAAAAAGBAAAAAA 874.0 Avenue Suite N Green Acres Perkins County NE 67683.0 United States -7.0 single family Park and Second
22 23 AAAAAAAAHBAAAAAA 230.0 Drive Suite U Newtown Jewell County KS 61749.0 United States -6.0 single family 6th
23 24 AAAAAAAAIBAAAAAA 837.0 Street Suite 200 Fairfield Marin County CA 96192.0 United States -8.0 single family 4th
24 25 AAAAAAAAJBAAAAAA 986.0 Boulevard Suite F Pleasant Grove Coweta County GA 34136.0 United States -5.0 apartment West East
25 26 AAAAAAAAKBAAAAAA 809.0 None None Springdale Forsyth County None 28883.0 None -5.0 None Central
26 27 AAAAAAAALBAAAAAA 649.0 Court Suite 400 Cedar Utah County UT 81229.0 United States -7.0 condo Williams
27 28 AAAAAAAAMBAAAAAA 992.0 Avenue Suite N Oak Hill Montrose County CO 87838.0 United States -7.0 condo Birch
28 29 AAAAAAAANBAAAAAA 572.0 Parkway Suite 160 Newport Richland County IL 61521.0 United States -6.0 single family 11th
29 30 AAAAAAAAOBAAAAAA 748.0 Avenue Suite M Wildwood Clark County MO 66871.0 United States -6.0 apartment Oak
30 31 AAAAAAAAPBAAAAAA 291.0 Lane Suite A Forestville Walworth County SD 53027.0 United States -7.0 condo East
31 32 AAAAAAAAACAAAAAA 243.0 Way Suite G Oakland Madison County NC 29843.0 United States -5.0 condo 8th
32 33 AAAAAAAABCAAAAAA 711.0 Avenue Suite 10 Pine Grove Sumter County GA 34593.0 United States -5.0 apartment 3rd
33 34 AAAAAAAACCAAAAAA 785.0 Avenue Suite 40 Greenville Russell County VA 21387.0 United States -5.0 condo 1st
34 35 AAAAAAAADCAAAAAA 814.0 Drive Suite C Waterloo Henry County VA 21675.0 United States -5.0 single family Washington and Main
35 36 AAAAAAAAECAAAAAA 648.0 Court Suite 410 Lakeview Lewis County TN 38579.0 United States -6.0 condo South 15th
36 37 AAAAAAAAFCAAAAAA 999.0 Court Suite 250 Sumner Greenville County SC 20519.0 United States -5.0 single family 4th
37 38 AAAAAAAAGCAAAAAA 912.0 Drive Suite 190 Plainview Baca County CO 83683.0 United States -7.0 condo Second and Hickory
38 39 AAAAAAAAHCAAAAAA 13.0 Court Suite 280 Hamilton Lee County IA 52808.0 United States -6.0 apartment 10th
39 40 AAAAAAAAICAAAAAA 369.0 Parkway Suite H Bridgeport Ferry County WA 95817.0 United States -8.0 single family 2nd
40 41 AAAAAAAAJCAAAAAA 198.0 Road Suite S Oakland Ouray County CO 89843.0 United States -7.0 apartment Washington
41 42 AAAAAAAAKCAAAAAA 884.0 Court Suite F Riverside Scott County MS 59231.0 United States -6.0 single family Oak
42 43 AAAAAAAALCAAAAAA 762.0 Drive Suite F Sulphur Springs Jefferson County IL 68354.0 United States -6.0 condo Spring
43 44 AAAAAAAAMCAAAAAA NaN None Suite 490 None O-Brien County None 58721.0 United States -6.0 None None
44 45 AAAAAAAANCAAAAAA 206.0 Street Suite 120 Union Washington County ME 9321.0 United States -5.0 apartment 4th
45 46 AAAAAAAAOCAAAAAA 995.0 Boulevard Suite 120 Union Hill Forrest County MS 57746.0 United States -6.0 single family Oak
46 47 AAAAAAAAPCAAAAAA 776.0 Way Suite 60 Pleasant Grove Mercer County KY 44136.0 United States -5.0 apartment Washington View
47 48 AAAAAAAAADAAAAAA 895.0 Lane Suite 480 Salem James City County VA 28048.0 United States -5.0 condo Valley
48 49 AAAAAAAABDAAAAAA 583.0 Street Suite 90 Fairfield York County ME 6792.0 United States -5.0 apartment 2nd
49 50 AAAAAAAACDAAAAAA 190.0 Way Suite D Enterprise Gray County KS 61757.0 United States -6.0 single family 7th
50 51 AAAAAAAADDAAAAAA 845.0 Parkway Suite F Green Acres Hamblen County TN 37683.0 United States -5.0 single family 5th
51 52 AAAAAAAAEDAAAAAA 472.0 Street Suite 60 Oakdale Muskingum County OH 49584.0 United States -5.0 single family Ridge Park
52 53 AAAAAAAAFDAAAAAA 884.0 Boulevard Suite 440 Riverview McPherson County SD 59003.0 United States -7.0 single family College
53 54 AAAAAAAAGDAAAAAA 857.0 Boulevard Suite V Oak Hill Martin County NC 27838.0 United States -5.0 single family 10th
54 55 AAAAAAAAHDAAAAAA 177.0 Way Suite S Ashland Macomb County MI 44244.0 United States -5.0 condo Lee Adams
55 56 AAAAAAAAIDAAAAAA 49.0 Way Suite V Woodland Goodhue County MN 54854.0 United States -6.0 condo Valley and 14th
56 57 AAAAAAAAJDAAAAAA 625.0 Road Suite J Enterprise Bottineau County ND 51757.0 United States -6.0 single family 10th
57 58 AAAAAAAAKDAAAAAA 917.0 Parkway Suite 230 Union Hill Canyon County ID 87746.0 United States -7.0 single family Miller and 15th
58 59 AAAAAAAALDAAAAAA NaN Court None Newtown Valley County MT NaN United States -7.0 condo None
59 60 AAAAAAAAMDAAAAAA NaN None None Forest Hills Green County KY 49237.0 None NaN apartment Lee
60 61 AAAAAAAANDAAAAAA 159.0 Boulevard Suite 20 Sulphur Springs Laurel County KY 48354.0 United States -5.0 single family Ridge
61 62 AAAAAAAAODAAAAAA 925.0 Lane Suite 90 Riverdale Lewis County WV 29391.0 United States -5.0 condo Lincoln
62 63 AAAAAAAAPDAAAAAA 416.0 Drive Suite A Midway Jewell County KS 61904.0 United States -6.0 single family 11th
63 64 AAAAAAAAAEAAAAAA 546.0 Circle Suite 90 Macedonia Trousdale County TN 31087.0 United States -6.0 apartment Meadow
64 65 AAAAAAAABEAAAAAA 147.0 Road Suite 460 Bethel Iowa County IA 55281.0 United States -6.0 single family 4th
65 66 AAAAAAAACEAAAAAA 238.0 Road Suite 470 Crossroads Sioux County NE 60534.0 United States -7.0 single family Pine
66 67 AAAAAAAADEAAAAAA 896.0 Street Suite B Flint Van Buren County IA 58909.0 United States -6.0 single family 11th
67 68 AAAAAAAAEEAAAAAA 240.0 Street Suite H Summit Bledsoe County TN 30499.0 United States -5.0 single family Laurel
68 69 AAAAAAAAFEAAAAAA 37.0 Drive Suite H Glendale Scott County KY 43951.0 United States -5.0 single family Pine
69 70 AAAAAAAAGEAAAAAA 511.0 Parkway Suite 210 White Oak Union County OH 46668.0 United States -5.0 condo 14th
70 71 AAAAAAAAHEAAAAAA 38.0 Circle Suite 370 Lakeview Nottoway County VA 28579.0 United States -5.0 apartment Ridge
71 72 AAAAAAAAIEAAAAAA 982.0 Boulevard Suite 20 Richville Cascade County MT 65945.0 United States -7.0 single family Willow
72 73 AAAAAAAAJEAAAAAA 158.0 Road Suite B Cedar Grove Kingman County KS 60411.0 United States -6.0 apartment Green
73 74 AAAAAAAAKEAAAAAA 723.0 Boulevard Suite C Spring Hill Wapello County IA 56787.0 United States -6.0 condo Sycamore
74 75 AAAAAAAALEAAAAAA 32.0 Way Suite 480 Valley View Cleburne County AL 35124.0 United States -6.0 single family Pine
75 76 AAAAAAAAMEAAAAAA 257.0 Drive Suite 420 Shiloh Menominee County MI 49275.0 United States -5.0 single family Walnut South
76 77 AAAAAAAANEAAAAAA 151.0 Way Suite U Oak Grove Thomas County GA 38370.0 United States -5.0 single family Hill
77 78 AAAAAAAAOEAAAAAA 857.0 Boulevard Suite 140 Green Acres Potter County SD 57683.0 United States -7.0 single family Railroad
78 79 AAAAAAAAPEAAAAAA 409.0 Circle Suite U Farmington Wayne County TN 39145.0 United States -6.0 condo Park and 7th
79 80 AAAAAAAAAFAAAAAA 298.0 Way Suite J Oakland Grant County KY 49843.0 United States -6.0 condo 12th
80 81 AAAAAAAABFAAAAAA 953.0 Parkway Suite 0 Union Hill Brown County TX 77746.0 United States -6.0 condo River and Spruce
81 82 AAAAAAAACFAAAAAA 97.0 Lane Suite L Buena Vista Santa Clara County CA 95752.0 United States -8.0 single family River and Main
82 83 AAAAAAAADFAAAAAA 410.0 Drive Suite 20 Bethel Nueces County TX 75281.0 United States -6.0 condo Spring and Poplar
83 84 AAAAAAAAEFAAAAAA 886.0 Circle Suite T Warwick Itawamba County MS 51398.0 United States -6.0 apartment Sunset
84 85 AAAAAAAAFFAAAAAA 476.0 Avenue Suite R Five Points Crawford County PA 16098.0 United States -5.0 single family Willow
85 86 AAAAAAAAGFAAAAAA 699.0 Street Suite O Five Points Pike County KY 46098.0 United States -5.0 single family 11th
86 87 AAAAAAAAHFAAAAAA NaN Lane None Maple Grove Claiborne County None 58252.0 None NaN apartment 6th
87 88 AAAAAAAAIFAAAAAA 104.0 Road Suite W Frogtown Bay County MI 48784.0 United States -5.0 single family 9th
88 89 AAAAAAAAJFAAAAAA 440.0 Avenue Suite 200 Lakeside Solano County CA 99532.0 United States -8.0 apartment 7th
89 90 AAAAAAAAKFAAAAAA 892.0 Drive Suite U Centerville Hettinger County ND 50059.0 United States -6.0 condo North East
90 91 AAAAAAAALFAAAAAA 936.0 Way None Riverside Murray County None NaN United States NaN None None
91 92 AAAAAAAAMFAAAAAA 734.0 Boulevard Suite V Newtown Boise County ID 81749.0 United States -7.0 condo Wilson
92 93 AAAAAAAANFAAAAAA 755.0 Road Suite Q Walnut Grove Greenup County KY 47752.0 United States -6.0 apartment Washington and Sunset
93 94 AAAAAAAAOFAAAAAA NaN None None Lakeside Washington County GA NaN None NaN None None
94 95 AAAAAAAAPFAAAAAA 571.0 Lane Suite M Woodland Thayer County NE 64854.0 United States -7.0 condo River
95 96 AAAAAAAAAGAAAAAA 246.0 Road Suite A Oakdale Fulton County KY 49584.0 United States -6.0 condo Cedar
96 97 AAAAAAAABGAAAAAA 858.0 Way Suite 320 Enterprise Hardin County TX 71757.0 United States -6.0 single family Sunset and Main
97 98 AAAAAAAACGAAAAAA 346.0 Road Suite 370 Spring Hill Labette County KS 66787.0 United States -6.0 condo Walnut
98 99 AAAAAAAADGAAAAAA 222.0 Drive Suite U Wilson Dickinson County MI 46971.0 United States -5.0 apartment Park View

stg_customer_address.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"customer_address_renamed" AS (
    -- Rename: Renaming columns
    -- CA_ADDRESS_SK -> address_surrogate_key
    -- CA_ADDRESS_ID -> address_id
    -- CA_STREET_NUMBER -> street_number
    -- CA_STREET_NAME -> street_name
    -- CA_STREET_TYPE -> street_type
    -- CA_SUITE_NUMBER -> suite_number
    -- CA_CITY -> city
    -- CA_COUNTY -> county
    -- CA_STATE -> state
    -- CA_ZIP -> zip_code
    -- CA_COUNTRY -> country
    -- CA_GMT_OFFSET -> gmt_offset
    -- CA_LOCATION_TYPE -> residence_type
    SELECT 
        "CA_ADDRESS_SK" AS "address_surrogate_key",
        "CA_ADDRESS_ID" AS "address_id",
        "CA_STREET_NUMBER" AS "street_number",
        "CA_STREET_NAME" AS "street_name",
        "CA_STREET_TYPE" AS "street_type",
        "CA_SUITE_NUMBER" AS "suite_number",
        "CA_CITY" AS "city",
        "CA_COUNTY" AS "county",
        "CA_STATE" AS "state",
        "CA_ZIP" AS "zip_code",
        "CA_COUNTRY" AS "country",
        "CA_GMT_OFFSET" AS "gmt_offset",
        "CA_LOCATION_TYPE" AS "residence_type"
    FROM "customer_address"
),

"customer_address_renamed_trimmed" AS (
    -- Trim Leading and Trailing Spaces
    SELECT
        "address_surrogate_key",
        "address_id",
        "street_number",
        "street_type",
        "suite_number",
        "city",
        "county",
        "state",
        "zip_code",
        "country",
        "gmt_offset",
        "residence_type",
        TRIM("street_name") AS "street_name"
    FROM "customer_address_renamed"
),

"customer_address_renamed_trimmed_cleaned" AS (
    -- Clean unusual string values: 
    -- street_type: The problem is inconsistency in abbreviations and punctuation for street types. Some types are spelled out fully while others are abbreviated, and some abbreviations include periods while others don't. The correct values should be the most common or standard representation for each street type. 
    -- street_name: The problem is inconsistent representation of street names, particularly for numbered streets. Some entries combine the street number with additional descriptors or other street names. The correct values should use a consistent format, using just the numbered street name where applicable, and separating multiple street names if needed. 
    SELECT
        "address_surrogate_key",
        "address_id",
        "street_number",
        CASE
            WHEN "street_type" = 'Dr.' THEN 'Drive'
            WHEN "street_type" = 'ST' THEN 'Street'
            WHEN "street_type" = 'Ave' THEN 'Avenue'
            WHEN "street_type" = 'RD' THEN 'Road'
            WHEN "street_type" = 'Ct.' THEN 'Court'
            WHEN "street_type" = 'Wy' THEN 'Way'
            WHEN "street_type" = 'Pkwy' THEN 'Parkway'
            WHEN "street_type" = 'Blvd' THEN 'Boulevard'
            WHEN "street_type" = 'Ln' THEN 'Lane'
            WHEN "street_type" = 'Cir.' THEN 'Circle'
            ELSE "street_type"
        END AS "street_type",
        "suite_number",
        "city",
        "county",
        "state",
        "zip_code",
        "country",
        "gmt_offset",
        "residence_type",
        CASE
            WHEN "street_name" = '10th 10th' THEN '10th'
            WHEN "street_name" = '10th Oak' THEN '10th'
            WHEN "street_name" = '11th 14th' THEN '11th'
            WHEN "street_name" = '13th 2nd' THEN '13th'
            WHEN "street_name" = '14th Sycamore' THEN '14th'
            WHEN "street_name" = '1st Cedar' THEN '1st'
            WHEN "street_name" = '1st Laurel' THEN '1st'
            WHEN "street_name" = '2nd Maple' THEN '2nd'
            WHEN "street_name" = '3rd 4th' THEN '3rd'
            WHEN "street_name" = '6th Spring' THEN '6th'
            WHEN "street_name" = '8th Lake' THEN '8th'
            WHEN "street_name" = 'Ash 8th' THEN '8th'
            WHEN "street_name" = 'Ash Wilson' THEN 'Wilson'
            WHEN "street_name" = 'Cedar Franklin' THEN 'Cedar'
            WHEN "street_name" = 'Church 7th' THEN '7th'
            WHEN "street_name" = 'College Franklin' THEN 'College'
            WHEN "street_name" = 'Dogwood Washington' THEN 'Washington'
            WHEN "street_name" = 'Elevnth Green' THEN '11th'
            WHEN "street_name" = 'Elm Wilson' THEN 'Wilson'
            WHEN "street_name" = 'First Elevnth' THEN '11th'
            WHEN "street_name" = 'Fourth Lake' THEN '4th'
            WHEN "street_name" = 'Green Broadway' THEN 'Green'
            WHEN "street_name" = 'Hickory River' THEN 'River'
            WHEN "street_name" = 'Highland 2nd' THEN '2nd'
            WHEN "street_name" = 'Hill 7th' THEN '7th'
            WHEN "street_name" = 'Jefferson Smith' THEN 'Jefferson'
            WHEN "street_name" = 'Laurel Forest' THEN 'Laurel'
            WHEN "street_name" = 'Main Second' THEN 'Main and Second'
            WHEN "street_name" = 'Maple Spruce' THEN 'Maple and Spruce'
            WHEN "street_name" = 'Miller 15th' THEN 'Miller and 15th'
            WHEN "street_name" = 'Park 7th' THEN 'Park and 7th'
            WHEN "street_name" = 'Park Second' THEN 'Park and Second'
            WHEN "street_name" = 'Pine Oak' THEN 'Pine and Oak'
            WHEN "street_name" = 'River Main' THEN 'River and Main'
            WHEN "street_name" = 'River Spruce' THEN 'River and Spruce'
            WHEN "street_name" = 'Second Hickory' THEN 'Second and Hickory'
            WHEN "street_name" = 'Spring Poplar' THEN 'Spring and Poplar'
            WHEN "street_name" = 'Sunset Main' THEN 'Sunset and Main'
            WHEN "street_name" = 'Valley 14th' THEN 'Valley and 14th'
            WHEN "street_name" = 'Washington 6th' THEN 'Washington and 6th'
            WHEN "street_name" = 'Washington Main' THEN 'Washington and Main'
            WHEN "street_name" = 'Washington Sunset' THEN 'Washington and Sunset'
            WHEN "street_name" = 'Williams Sixth' THEN 'Williams and Sixth'
            WHEN "street_name" = 'Woodland Poplar' THEN 'Woodland and Poplar'
            ELSE "street_name"
        END AS "street_name"
    FROM "customer_address_renamed_trimmed"
)

-- COCOON BLOCK END
SELECT * FROM "customer_address_renamed_trimmed_cleaned"

stg_customer_address.yml (Document the table)

version: 2
models:
- name: stg_customer_address
  description: The table is about customer addresses. It includes unique identifiers
    for each address. It contains street details, city, county, state, and zip code.
    It also provides country, GMT offset, and location type. Each row represents a
    distinct customer address with its associated information.
  columns:
  - name: address_surrogate_key
    description: Surrogate key for the address
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key specifically created to uniquely
        identify each address record. For this table, each row represents a distinct
        customer address. address_surrogate_key is unique across rows, as it's designed
        to be a primary identifier.
  - name: address_id
    description: Unique identifier for the address
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for the address.
        For this table, each row represents a distinct customer address. address_id
        appears to be unique across rows, as it's intended to uniquely identify each
        address.
  - name: street_number
    description: House or building number on the street
    tests:
    - not_null
  - name: street_type
    description: Type of street (e.g., Parkway, RD, Circle)
    tests:
    - not_null
  - name: suite_number
    description: Suite or apartment number if applicable
    cocoon_meta:
      missing_acceptable: Not all residences have suite numbers.
  - name: city
    description: City name of the address
    tests:
    - not_null
  - name: county
    description: County name of the address
    tests:
    - not_null
  - name: state
    description: State abbreviation of the address
    tests:
    - not_null
  - name: zip_code
    description: ZIP code of the address
    tests:
    - not_null
  - name: country
    description: Country of the address
    tests:
    - not_null
  - name: gmt_offset
    description: GMT offset of the address location
    tests:
    - not_null
  - name: residence_type
    description: Type of residence (e.g., condo, single family)
    tests:
    - not_null
    - accepted_values:
        values:
        - single family
        - condo
        - apartment
        - townhouse
        - duplex
        - mobile home
        - tiny house
        - co-op
        - loft
        - studio
        - bungalow
        - cottage
        - mansion
        - villa
        - penthouse
        - dormitory
        - boarding house
        - houseboat
        - yurt
        - treehouse
  - name: street_name
    description: Name of the street
    tests:
    - not_null

stg_store_sales (first 100 rows)

sale_date_id sale_time_id item_id customer_id customer_demo_id household_demo_id address_id store_id promotion_id ticket_number quantity_sold unit_wholesale_cost unit_list_price unit_sales_price total_discount_amount total_sales_price total_wholesale_cost total_list_price total_tax_amount coupon_amount net_paid_amount net_paid_with_tax net_profit
0 2451813.0 65495.0 1091 6.0 591617.0 3428.0 839.0 2.0 2.0 1 79.0 11.41 18.71 2.80 99.54 221.20 901.39 1478.09 6.08 99.54 121.66 127.74 -779.73
1 2451813.0 65495.0 1478 6.0 591617.0 3428.0 839.0 2.0 1.0 1 37.0 63.63 101.17 41.47 46.03 1534.39 2354.31 3743.29 59.53 46.03 1488.36 1547.89 -865.95
2 2451813.0 65495.0 1961 6.0 591617.0 3428.0 839.0 2.0 1.0 1 99.0 80.52 137.68 83.98 0.00 8314.02 7971.48 13630.32 0.00 0.00 8314.02 8314.02 342.54
3 2451813.0 65495.0 470 6.0 591617.0 3428.0 839.0 2.0 1.0 1 14.0 57.37 76.30 6.10 0.00 85.40 803.18 1068.20 0.00 0.00 85.40 85.40 -717.78
4 2451813.0 65495.0 404 6.0 591617.0 3428.0 839.0 2.0 2.0 1 100.0 25.08 36.86 0.73 0.00 73.00 2508.00 3686.00 6.57 0.00 73.00 79.57 -2435.00
5 2451813.0 65495.0 1813 6.0 591617.0 3428.0 839.0 2.0 2.0 1 91.0 93.48 108.43 93.24 0.00 8484.84 8506.68 9867.13 254.54 0.00 8484.84 8739.38 -21.84
6 2451813.0 65495.0 1439 6.0 591617.0 3428.0 839.0 2.0 1.0 1 5.0 10.68 15.91 6.68 0.00 33.40 53.40 79.55 2.33 0.00 33.40 35.73 -20.00
7 2451813.0 65495.0 203 6.0 591617.0 3428.0 839.0 2.0 3.0 1 72.0 84.72 111.83 61.50 0.00 4428.00 6099.84 8051.76 177.12 0.00 4428.00 4605.12 -1671.84
8 2451813.0 65495.0 1837 6.0 591617.0 3428.0 839.0 2.0 1.0 1 14.0 11.54 11.77 0.00 0.00 0.00 161.56 164.78 0.00 0.00 0.00 0.00 -161.56
9 2451813.0 65495.0 1484 6.0 591617.0 3428.0 839.0 2.0 3.0 1 58.0 4.57 5.34 3.52 0.00 204.16 265.06 309.72 0.00 0.00 204.16 204.16 -60.90
10 2451813.0 65495.0 1901 6.0 591617.0 3428.0 839.0 2.0 1.0 1 44.0 31.07 54.99 24.19 0.00 1064.36 1367.08 2419.56 85.14 0.00 1064.36 1149.50 -302.72
11 2451813.0 65495.0 257 6.0 591617.0 3428.0 839.0 2.0 1.0 1 88.0 52.41 63.94 49.23 0.00 4332.24 4612.08 5626.72 259.93 0.00 4332.24 4592.17 -279.84
12 2451813.0 65495.0 365 6.0 591617.0 3428.0 839.0 2.0 2.0 1 50.0 67.71 126.61 87.36 0.00 4368.00 3385.50 6330.50 349.44 0.00 4368.00 4717.44 982.50
13 2451813.0 65495.0 989 6.0 591617.0 3428.0 839.0 2.0 3.0 1 65.0 27.16 52.14 41.19 0.00 2677.35 1765.40 3389.10 214.18 0.00 2677.35 2891.53 911.95
14 2451524.0 75316.0 61 284.0 1712478.0 4672.0 266.0 2.0 1.0 2 65.0 93.86 158.62 34.89 0.00 2267.85 6100.90 10310.30 45.35 0.00 2267.85 2313.20 -3833.05
15 2451524.0 75316.0 1669 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 93.0 35.87 49.14 15.23 0.00 1416.39 3335.91 4570.02 113.31 0.00 1416.39 1529.70 -1919.52
16 2451524.0 75316.0 686 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 30.0 2.27 3.83 1.11 0.00 33.30 68.10 114.90 0.00 0.00 33.30 33.30 -34.80
17 2451524.0 75316.0 1142 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 58.0 53.09 58.39 7.59 0.00 440.22 3079.22 3386.62 0.00 0.00 440.22 440.22 -2639.00
18 NaN 75316.0 1771 NaN NaN 4672.0 NaN 2.0 NaN 2 NaN 17.12 19.85 NaN NaN NaN NaN NaN 19.07 NaN NaN 495.84 NaN
19 2451524.0 75316.0 1336 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 79.0 88.02 128.50 69.39 4549.90 5481.81 6953.58 10151.50 83.87 4549.90 931.91 1015.78 -6021.67
20 2451524.0 75316.0 1030 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 25.0 74.26 89.11 35.64 0.00 891.00 1856.50 2227.75 8.91 0.00 891.00 899.91 -965.50
21 2451524.0 75316.0 1330 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 78.0 65.71 88.70 23.06 341.74 1798.68 5125.38 6918.60 131.12 341.74 1456.94 1588.06 -3668.44
22 2451524.0 75316.0 1792 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 88.0 64.43 79.89 41.54 0.00 3655.52 5669.84 7030.32 146.22 0.00 3655.52 3801.74 -2014.32
23 2451524.0 75316.0 565 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 49.0 6.55 7.86 7.46 0.00 365.54 320.95 385.14 0.00 0.00 365.54 365.54 44.59
24 2451524.0 75316.0 56 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 4.0 13.46 15.34 12.57 0.00 50.28 53.84 61.36 4.02 0.00 50.28 54.30 -3.56
25 2451524.0 75316.0 406 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 74.0 16.55 17.21 4.47 0.00 330.78 1224.70 1273.54 0.00 0.00 330.78 330.78 -893.92
26 2451524.0 75316.0 740 284.0 1712478.0 4672.0 266.0 2.0 2.0 2 71.0 36.01 64.09 3.20 0.00 227.20 2556.71 4550.39 4.54 0.00 227.20 231.74 -2329.51
27 2451524.0 75316.0 992 284.0 1712478.0 4672.0 266.0 2.0 3.0 2 36.0 61.23 93.06 11.16 0.00 401.76 2204.28 3350.16 28.12 0.00 401.76 429.88 -1802.52
28 2451524.0 75316.0 991 284.0 1712478.0 4672.0 266.0 2.0 1.0 2 62.0 77.97 85.76 79.75 0.00 4944.50 4834.14 5317.12 0.00 0.00 4944.50 4944.50 110.36
29 2452638.0 50412.0 150 47.0 586372.0 697.0 622.0 1.0 2.0 3 82.0 56.14 111.15 46.68 0.00 3827.76 4603.48 9114.30 306.22 0.00 3827.76 4133.98 -775.72
30 2452638.0 50412.0 672 47.0 586372.0 697.0 622.0 1.0 1.0 3 96.0 98.02 136.24 104.90 0.00 10070.40 9409.92 13079.04 100.70 0.00 10070.40 10171.10 660.48
31 NaN NaN 247 NaN NaN NaN 622.0 1.0 3.0 3 NaN NaN 130.66 NaN NaN 3104.46 NaN 3527.82 124.17 NaN NaN NaN NaN
32 2452638.0 50412.0 912 47.0 586372.0 697.0 622.0 1.0 3.0 3 42.0 97.03 178.53 7.14 0.00 299.88 4075.26 7498.26 17.99 0.00 299.88 317.87 -3775.38
33 2452638.0 50412.0 15 47.0 586372.0 697.0 622.0 1.0 2.0 3 64.0 74.69 120.25 2.40 0.00 153.60 4780.16 7696.00 3.07 0.00 153.60 156.67 -4626.56
34 2452638.0 50412.0 1719 47.0 586372.0 697.0 622.0 1.0 2.0 3 17.0 72.38 111.46 75.79 0.00 1288.43 1230.46 1894.82 38.65 0.00 1288.43 1327.08 57.97
35 2452638.0 50412.0 78 47.0 586372.0 697.0 622.0 1.0 3.0 3 88.0 27.95 38.57 26.99 403.77 2375.12 2459.60 3394.16 0.00 403.77 1971.35 1971.35 -488.25
36 2452638.0 50412.0 1539 47.0 586372.0 697.0 622.0 1.0 2.0 3 4.0 95.75 146.49 43.94 0.00 175.76 383.00 585.96 5.27 0.00 175.76 181.03 -207.24
37 2452638.0 50412.0 771 47.0 586372.0 697.0 622.0 1.0 2.0 3 79.0 44.66 83.06 17.44 1115.98 1377.76 3528.14 6561.74 5.23 1115.98 261.78 267.01 -3266.36
38 2452638.0 50412.0 246 47.0 586372.0 697.0 622.0 1.0 3.0 3 56.0 4.31 6.76 0.06 3.22 3.36 241.36 378.56 0.01 3.22 0.14 0.15 -241.22
39 2452638.0 50412.0 1063 47.0 586372.0 697.0 622.0 1.0 2.0 3 27.0 37.04 58.89 55.35 0.00 1494.45 1000.08 1590.03 29.88 0.00 1494.45 1524.33 494.37
40 2452638.0 50412.0 1545 47.0 586372.0 697.0 622.0 1.0 1.0 3 4.0 75.67 130.15 35.14 0.00 140.56 302.68 520.60 9.83 0.00 140.56 150.39 -162.12
41 2452638.0 50412.0 715 47.0 586372.0 697.0 622.0 1.0 3.0 3 53.0 23.04 44.00 26.40 0.00 1399.20 1221.12 2332.00 13.99 0.00 1399.20 1413.19 178.08
42 2452638.0 50412.0 648 47.0 586372.0 697.0 622.0 1.0 1.0 3 98.0 85.00 132.60 90.16 4506.19 8835.68 8330.00 12994.80 0.00 4506.19 4329.49 4329.49 -4000.51
43 2451438.0 38195.0 344 814.0 874786.0 1511.0 83.0 2.0 2.0 4 43.0 54.34 107.59 87.14 0.00 3747.02 2336.62 4626.37 299.76 0.00 3747.02 4046.78 1410.40
44 2451438.0 38195.0 397 814.0 874786.0 1511.0 83.0 2.0 2.0 4 23.0 2.91 3.57 3.53 32.47 81.19 66.93 82.11 0.97 32.47 48.72 49.69 -18.21
45 2451438.0 38195.0 1060 814.0 874786.0 1511.0 83.0 2.0 1.0 4 56.0 64.68 78.90 24.45 0.00 1369.20 3622.08 4418.40 0.00 0.00 1369.20 1369.20 -2252.88
46 2451438.0 38195.0 886 814.0 874786.0 1511.0 83.0 2.0 2.0 4 21.0 40.39 40.39 12.11 0.00 254.31 848.19 848.19 22.88 0.00 254.31 277.19 -593.88
47 2451438.0 38195.0 1904 814.0 874786.0 1511.0 83.0 2.0 1.0 4 41.0 67.18 78.60 5.50 0.00 225.50 2754.38 3222.60 13.53 0.00 225.50 239.03 -2528.88
48 2451438.0 38195.0 272 814.0 874786.0 1511.0 83.0 2.0 2.0 4 27.0 26.21 44.81 19.26 0.00 520.02 707.67 1209.87 46.80 0.00 520.02 566.82 -187.65
49 2451438.0 38195.0 86 814.0 874786.0 1511.0 83.0 2.0 1.0 4 86.0 64.67 123.51 55.57 0.00 4779.02 5561.62 10621.86 47.79 0.00 4779.02 4826.81 -782.60
50 2451438.0 38195.0 1465 814.0 874786.0 1511.0 83.0 2.0 1.0 4 17.0 54.26 105.80 9.52 116.52 161.84 922.42 1798.60 0.00 116.52 45.32 45.32 -877.10
51 2451438.0 38195.0 586 814.0 874786.0 1511.0 83.0 2.0 3.0 4 74.0 81.81 163.62 45.81 0.00 3389.94 6053.94 12107.88 271.19 0.00 3389.94 3661.13 -2664.00
52 2451438.0 38195.0 908 814.0 874786.0 1511.0 83.0 2.0 2.0 4 23.0 53.28 77.78 1.55 21.03 35.65 1225.44 1788.94 1.16 21.03 14.62 15.78 -1210.82
53 2451465.0 53976.0 1826 246.0 963544.0 5042.0 940.0 2.0 1.0 5 60.0 69.54 112.65 57.45 0.00 3447.00 4172.40 6759.00 34.47 0.00 3447.00 3481.47 -725.40
54 2451465.0 53976.0 1057 246.0 963544.0 5042.0 940.0 2.0 1.0 5 52.0 16.33 32.33 31.68 0.00 1647.36 849.16 1681.16 115.31 0.00 1647.36 1762.67 798.20
55 2451465.0 53976.0 1540 246.0 963544.0 5042.0 940.0 2.0 2.0 5 83.0 74.15 89.72 63.70 0.00 5287.10 6154.45 7446.76 422.96 0.00 5287.10 5710.06 -867.35
56 2451465.0 53976.0 691 246.0 963544.0 5042.0 940.0 2.0 3.0 5 15.0 21.21 33.93 30.53 0.00 457.95 318.15 508.95 22.89 0.00 457.95 480.84 139.80
57 2451465.0 53976.0 502 246.0 963544.0 5042.0 940.0 2.0 3.0 5 71.0 22.10 37.57 28.17 0.00 2000.07 1569.10 2667.47 180.00 0.00 2000.07 2180.07 430.97
58 2451465.0 53976.0 1162 246.0 963544.0 5042.0 940.0 2.0 2.0 5 36.0 7.93 12.92 7.36 0.00 264.96 285.48 465.12 0.00 0.00 264.96 264.96 -20.52
59 2451465.0 53976.0 1561 246.0 963544.0 5042.0 940.0 2.0 1.0 5 66.0 71.06 136.43 45.02 0.00 2971.32 4689.96 9004.38 59.42 0.00 2971.32 3030.74 -1718.64
60 2451465.0 53976.0 1790 246.0 963544.0 5042.0 940.0 2.0 2.0 5 66.0 21.01 28.57 5.99 0.00 395.34 1386.66 1885.62 7.90 0.00 395.34 403.24 -991.32
61 NaN 53976.0 1064 NaN 963544.0 NaN NaN 2.0 2.0 5 50.0 30.69 59.84 NaN NaN NaN 1534.50 NaN 0.00 NaN 1735.00 NaN 200.50
62 2451465.0 53976.0 1238 246.0 963544.0 5042.0 940.0 2.0 2.0 5 91.0 27.68 53.69 0.53 0.00 48.23 2518.88 4885.79 3.85 0.00 48.23 52.08 -2470.65
63 2451465.0 53976.0 28 246.0 963544.0 5042.0 940.0 2.0 2.0 5 76.0 89.78 103.24 50.58 0.00 3844.08 6823.28 7846.24 153.76 0.00 3844.08 3997.84 -2979.20
64 2451465.0 53976.0 1832 246.0 963544.0 5042.0 940.0 2.0 3.0 5 64.0 87.90 95.81 66.10 0.00 4230.40 5625.60 6131.84 0.00 0.00 4230.40 4230.40 -1395.20
65 2451465.0 53976.0 1190 246.0 963544.0 5042.0 940.0 2.0 2.0 5 60.0 41.72 52.98 32.31 0.00 1938.60 2503.20 3178.80 0.00 0.00 1938.60 1938.60 -564.60
66 NaN 53976.0 1780 246.0 NaN NaN 940.0 2.0 NaN 5 NaN NaN 77.52 11.62 0.00 732.06 NaN 4883.76 43.92 0.00 NaN NaN NaN
67 2451465.0 53976.0 307 246.0 963544.0 5042.0 940.0 2.0 2.0 5 50.0 30.96 56.34 45.07 0.00 2253.50 1548.00 2817.00 22.53 0.00 2253.50 2276.03 705.50
68 NaN NaN 611 29.0 NaN 2092.0 NaN NaN 3.0 6 NaN NaN NaN NaN NaN 449.88 NaN NaN NaN NaN NaN NaN NaN
69 2452109.0 36794.0 849 29.0 506184.0 2092.0 800.0 1.0 3.0 6 31.0 49.78 77.15 69.43 0.00 2152.33 1543.18 2391.65 0.00 0.00 2152.33 2152.33 609.15
70 2452109.0 36794.0 821 29.0 506184.0 2092.0 800.0 1.0 2.0 6 62.0 85.07 159.08 76.35 0.00 4733.70 5274.34 9862.96 189.34 0.00 4733.70 4923.04 -540.64
71 2452109.0 36794.0 151 29.0 506184.0 2092.0 800.0 1.0 3.0 6 1.0 71.10 89.58 61.81 0.00 61.81 71.10 89.58 3.70 0.00 61.81 65.51 -9.29
72 2452109.0 36794.0 43 29.0 506184.0 2092.0 800.0 1.0 3.0 6 61.0 48.18 60.70 18.81 126.21 1147.41 2938.98 3702.70 71.48 126.21 1021.20 1092.68 -1917.78
73 2452109.0 36794.0 1933 29.0 506184.0 2092.0 800.0 1.0 2.0 6 42.0 64.46 70.26 32.31 0.00 1357.02 2707.32 2950.92 27.14 0.00 1357.02 1384.16 -1350.30
74 2452109.0 36794.0 1335 29.0 506184.0 2092.0 800.0 1.0 3.0 6 100.0 41.08 42.31 38.50 0.00 3850.00 4108.00 4231.00 346.50 0.00 3850.00 4196.50 -258.00
75 2452109.0 36794.0 97 29.0 506184.0 2092.0 800.0 1.0 3.0 6 64.0 86.35 152.83 122.26 6650.94 7824.64 5526.40 9781.12 35.21 6650.94 1173.70 1208.91 -4352.70
76 2452109.0 36794.0 395 29.0 506184.0 2092.0 800.0 1.0 3.0 6 94.0 62.67 99.64 97.64 0.00 9178.16 5890.98 9366.16 91.78 0.00 9178.16 9269.94 3287.18
77 2452109.0 36794.0 1849 29.0 506184.0 2092.0 800.0 1.0 3.0 6 72.0 55.49 93.77 55.32 0.00 3983.04 3995.28 6751.44 199.15 0.00 3983.04 4182.19 -12.24
78 2452109.0 36794.0 1235 29.0 506184.0 2092.0 800.0 1.0 3.0 6 100.0 4.45 7.87 7.24 0.00 724.00 445.00 787.00 57.92 0.00 724.00 781.92 279.00
79 2452260.0 46712.0 1657 954.0 890396.0 791.0 633.0 2.0 3.0 7 51.0 84.65 124.43 49.77 0.00 2538.27 4317.15 6345.93 76.14 0.00 2538.27 2614.41 -1778.88
80 2452260.0 46712.0 1829 954.0 890396.0 791.0 633.0 2.0 3.0 7 9.0 56.13 59.49 30.93 0.00 278.37 505.17 535.41 22.26 0.00 278.37 300.63 -226.80
81 2452260.0 NaN 437 954.0 890396.0 791.0 NaN NaN NaN 7 4.0 NaN NaN NaN NaN 278.60 203.68 366.60 22.28 NaN 278.60 300.88 NaN
82 2452260.0 46712.0 1749 954.0 NaN NaN NaN NaN 1.0 7 NaN NaN 72.02 NaN NaN NaN NaN NaN NaN NaN 4990.30 NaN 1141.70
83 2452260.0 46712.0 1027 954.0 890396.0 791.0 633.0 2.0 3.0 7 88.0 38.23 72.63 39.22 0.00 3451.36 3364.24 6391.44 138.05 0.00 3451.36 3589.41 87.12
84 2452260.0 46712.0 1029 954.0 890396.0 791.0 633.0 2.0 3.0 7 52.0 63.80 81.02 22.68 0.00 1179.36 3317.60 4213.04 23.58 0.00 1179.36 1202.94 -2138.24
85 2452260.0 46712.0 763 954.0 890396.0 791.0 633.0 2.0 2.0 7 69.0 99.85 113.82 110.40 0.00 7617.60 6889.65 7853.58 0.00 0.00 7617.60 7617.60 727.95
86 2452260.0 46712.0 261 954.0 890396.0 791.0 633.0 2.0 1.0 7 54.0 42.82 56.09 21.31 0.00 1150.74 2312.28 3028.86 92.05 0.00 1150.74 1242.79 -1161.54
87 2452260.0 46712.0 1177 954.0 890396.0 791.0 633.0 2.0 2.0 7 12.0 47.60 75.20 65.42 0.00 785.04 571.20 902.40 47.10 0.00 785.04 832.14 213.84
88 2452260.0 46712.0 543 954.0 890396.0 791.0 633.0 2.0 2.0 7 73.0 12.17 14.23 11.24 623.59 820.52 888.41 1038.79 5.90 623.59 196.93 202.83 -691.48
89 2452260.0 46712.0 685 954.0 890396.0 791.0 633.0 2.0 2.0 7 69.0 34.19 58.46 50.86 0.00 3509.34 2359.11 4033.74 210.56 0.00 3509.34 3719.90 1150.23
90 2452260.0 46712.0 1707 954.0 890396.0 791.0 633.0 2.0 3.0 7 82.0 69.53 87.60 34.16 0.00 2801.12 5701.46 7183.20 0.00 0.00 2801.12 2801.12 -2900.34
91 2452179.0 52209.0 469 944.0 578318.0 6045.0 19.0 1.0 1.0 8 90.0 81.63 151.83 113.87 9428.43 10248.30 7346.70 13664.70 40.99 9428.43 819.87 860.86 -6526.83
92 2452179.0 52209.0 403 944.0 578318.0 6045.0 19.0 1.0 1.0 8 87.0 31.78 63.24 16.44 0.00 1430.28 2764.86 5501.88 57.21 0.00 1430.28 1487.49 -1334.58
93 2452179.0 52209.0 1303 944.0 578318.0 6045.0 19.0 1.0 3.0 8 31.0 15.64 26.43 13.21 0.00 409.51 484.84 819.33 4.09 0.00 409.51 413.60 -75.33
94 2452179.0 52209.0 1141 944.0 578318.0 6045.0 19.0 1.0 2.0 8 95.0 21.29 33.85 20.64 0.00 1960.80 2022.55 3215.75 98.04 0.00 1960.80 2058.84 -61.75
95 2452179.0 52209.0 665 944.0 578318.0 6045.0 19.0 1.0 2.0 8 7.0 18.65 27.97 20.41 0.00 142.87 130.55 195.79 1.42 0.00 142.87 144.29 12.32
96 2452179.0 52209.0 571 944.0 578318.0 6045.0 19.0 1.0 2.0 8 54.0 36.99 47.71 27.67 0.00 1494.18 1997.46 2576.34 89.65 0.00 1494.18 1583.83 -503.28
97 2452179.0 52209.0 1203 944.0 578318.0 6045.0 19.0 1.0 2.0 8 95.0 91.80 93.63 75.84 6700.46 7204.80 8721.00 8894.85 5.04 6700.46 504.34 509.38 -8216.66
98 2452179.0 52209.0 951 944.0 578318.0 6045.0 19.0 1.0 2.0 8 83.0 14.11 27.37 3.28 0.00 272.24 1171.13 2271.71 13.61 0.00 272.24 285.85 -898.89

stg_store_sales.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"store_sales_renamed" AS (
    -- Rename: Renaming columns
    -- SS_SOLD_DATE_SK -> sale_date_id
    -- SS_SOLD_TIME_SK -> sale_time_id
    -- SS_ITEM_SK -> item_id
    -- SS_CUSTOMER_SK -> customer_id
    -- SS_CDEMO_SK -> customer_demo_id
    -- SS_HDEMO_SK -> household_demo_id
    -- SS_ADDR_SK -> address_id
    -- SS_STORE_SK -> store_id
    -- SS_PROMO_SK -> promotion_id
    -- SS_TICKET_NUMBER -> ticket_number
    -- SS_QUANTITY -> quantity_sold
    -- SS_WHOLESALE_COST -> unit_wholesale_cost
    -- SS_LIST_PRICE -> unit_list_price
    -- SS_SALES_PRICE -> unit_sales_price
    -- SS_EXT_DISCOUNT_AMT -> total_discount_amount
    -- SS_EXT_SALES_PRICE -> total_sales_price
    -- SS_EXT_WHOLESALE_COST -> total_wholesale_cost
    -- SS_EXT_LIST_PRICE -> total_list_price
    -- SS_EXT_TAX -> total_tax_amount
    -- SS_COUPON_AMT -> coupon_amount
    -- SS_NET_PAID -> net_paid_amount
    -- SS_NET_PAID_INC_TAX -> net_paid_with_tax
    -- SS_NET_PROFIT -> net_profit
    SELECT 
        "SS_SOLD_DATE_SK" AS "sale_date_id",
        "SS_SOLD_TIME_SK" AS "sale_time_id",
        "SS_ITEM_SK" AS "item_id",
        "SS_CUSTOMER_SK" AS "customer_id",
        "SS_CDEMO_SK" AS "customer_demo_id",
        "SS_HDEMO_SK" AS "household_demo_id",
        "SS_ADDR_SK" AS "address_id",
        "SS_STORE_SK" AS "store_id",
        "SS_PROMO_SK" AS "promotion_id",
        "SS_TICKET_NUMBER" AS "ticket_number",
        "SS_QUANTITY" AS "quantity_sold",
        "SS_WHOLESALE_COST" AS "unit_wholesale_cost",
        "SS_LIST_PRICE" AS "unit_list_price",
        "SS_SALES_PRICE" AS "unit_sales_price",
        "SS_EXT_DISCOUNT_AMT" AS "total_discount_amount",
        "SS_EXT_SALES_PRICE" AS "total_sales_price",
        "SS_EXT_WHOLESALE_COST" AS "total_wholesale_cost",
        "SS_EXT_LIST_PRICE" AS "total_list_price",
        "SS_EXT_TAX" AS "total_tax_amount",
        "SS_COUPON_AMT" AS "coupon_amount",
        "SS_NET_PAID" AS "net_paid_amount",
        "SS_NET_PAID_INC_TAX" AS "net_paid_with_tax",
        "SS_NET_PROFIT" AS "net_profit"
    FROM "store_sales"
)

-- COCOON BLOCK END
SELECT * FROM "store_sales_renamed"

stg_store_sales.yml (Document the table)

version: 2
models:
- name: stg_store_sales
  description: The table is about store sales transactions. It includes details like
    sale date, time, item, customer, store, quantity sold, prices, costs, discounts,
    and profits. Each row represents an individual sale of an item, with information
    on the sale amount, taxes, coupons used, and net profit. The table captures comprehensive
    data for analyzing store sales performance and customer purchasing behavior.
  columns:
  - name: sale_date_id
    description: Date surrogate key
    tests:
    - not_null
  - name: sale_time_id
    description: Time surrogate key
    tests:
    - not_null
  - name: item_id
    description: Item surrogate key
    tests:
    - not_null
  - name: customer_id
    description: Customer surrogate key
    tests:
    - not_null
  - name: customer_demo_id
    description: Customer demographics surrogate key
    tests:
    - not_null
  - name: household_demo_id
    description: Household demographics surrogate key
    tests:
    - not_null
  - name: address_id
    description: Address surrogate key
    tests:
    - not_null
  - name: store_id
    description: Store surrogate key
    tests:
    - not_null
  - name: promotion_id
    description: Promotion surrogate key
    tests:
    - not_null
  - name: ticket_number
    description: Ticket number
    tests:
    - not_null
  - name: quantity_sold
    description: Quantity sold
    tests:
    - not_null
  - name: unit_wholesale_cost
    description: Wholesale cost per unit
    tests:
    - not_null
  - name: unit_list_price
    description: List price per unit
    tests:
    - not_null
  - name: unit_sales_price
    description: Sales price per unit
    tests:
    - not_null
  - name: total_discount_amount
    description: Extended discount amount
    cocoon_meta:
      missing_acceptable: No discount applied to the purchase
  - name: total_sales_price
    description: Extended sales price
    tests:
    - not_null
  - name: total_wholesale_cost
    description: Extended wholesale cost
    tests:
    - not_null
  - name: total_list_price
    description: Extended list price
    tests:
    - not_null
  - name: total_tax_amount
    description: Extended tax amount
    tests:
    - not_null
  - name: coupon_amount
    description: Amount of coupon applied to the sale
    cocoon_meta:
      missing_acceptable: No coupon applied to the purchase
  - name: net_paid_amount
    description: Net amount paid
    tests:
    - not_null
  - name: net_paid_with_tax
    description: Net amount paid including tax
    tests:
    - not_null
  - name: net_profit
    description: Net profit
    tests:
    - not_null

stg_web_page (first 100 rows)

page_surrogate_key page_id customer_id url page_type character_count link_count image_count max_ad_count creation_date is_auto_generated last_access_date record_end_date record_start_date
0 1 AAAAAAAABAAAAAAA 539.0 http://www.foo.com welcome 2531 8 3 4 4850811.0 True 4893208.0 NaT 1997-09-03
1 2 AAAAAAAACAAAAAAA NaN http://www.foo.com protected 1564 4 3 1 4850815.0 False 4893168.0 2000-09-02 1997-09-03

stg_web_page.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"web_page_renamed" AS (
    -- Rename: Renaming columns
    -- WP_WEB_PAGE_SK -> page_surrogate_key
    -- WP_WEB_PAGE_ID -> page_id
    -- WP_REC_START_DATE -> record_start_date
    -- WP_REC_END_DATE -> record_end_date
    -- WP_CREATION_DATE_SK -> creation_date
    -- WP_ACCESS_DATE_SK -> last_access_date
    -- WP_AUTOGEN_FLAG -> is_auto_generated
    -- WP_CUSTOMER_SK -> customer_id
    -- WP_URL -> url
    -- WP_TYPE -> page_type
    -- WP_CHAR_COUNT -> character_count
    -- WP_LINK_COUNT -> link_count
    -- WP_IMAGE_COUNT -> image_count
    -- WP_MAX_AD_COUNT -> max_ad_count
    SELECT 
        "WP_WEB_PAGE_SK" AS "page_surrogate_key",
        "WP_WEB_PAGE_ID" AS "page_id",
        "WP_REC_START_DATE" AS "record_start_date",
        "WP_REC_END_DATE" AS "record_end_date",
        "WP_CREATION_DATE_SK" AS "creation_date",
        "WP_ACCESS_DATE_SK" AS "last_access_date",
        "WP_AUTOGEN_FLAG" AS "is_auto_generated",
        "WP_CUSTOMER_SK" AS "customer_id",
        "WP_URL" AS "url",
        "WP_TYPE" AS "page_type",
        "WP_CHAR_COUNT" AS "character_count",
        "WP_LINK_COUNT" AS "link_count",
        "WP_IMAGE_COUNT" AS "image_count",
        "WP_MAX_AD_COUNT" AS "max_ad_count"
    FROM "web_page"
),

"web_page_renamed_casted" AS (
    -- Column Type Casting: 
    -- creation_date: from INT to DATE
    -- is_auto_generated: from VARCHAR to BOOLEAN
    -- last_access_date: from INT to DATE
    -- record_end_date: from VARCHAR to DATE
    -- record_start_date: from VARCHAR to DATE
    SELECT
        "page_surrogate_key",
        "page_id",
        "customer_id",
        "url",
        "page_type",
        "character_count",
        "link_count",
        "image_count",
        "max_ad_count",
        julian(DATE '1858-11-17' + CAST("creation_date" AS INTEGER)) AS "creation_date",
        CAST("is_auto_generated" = 'Y' AS BOOLEAN) AS "is_auto_generated",
        julian(DATE '1970-01-01' + CAST("last_access_date" AS INTEGER)) AS "last_access_date",
        CAST("record_end_date" AS DATE) AS "record_end_date",
        CAST("record_start_date" AS DATE) AS "record_start_date"
    FROM "web_page_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "web_page_renamed_casted"

stg_web_page.yml (Document the table)

version: 2
models:
- name: stg_web_page
  description: The table is about web pages. It contains details like page ID, creation
    date, access date, URL, type, and various metrics such as character count, link
    count, image count, and maximum ad count. Some pages are associated with customers.
    The table tracks changes over time with start and end dates for each record.
  columns:
  - name: page_surrogate_key
    description: Surrogate key for the web page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column appears to be a unique identifier for each row in the
        table. For this table, each row represents a specific version of a web page,
        and the page_surrogate_key seems to uniquely identify each record.
  - name: page_id
    description: Unique identifier for the web page
    tests:
    - not_null
  - name: customer_id
    description: Customer identifier associated with the page
    tests:
    - not_null
  - name: url
    description: URL of the web page
    tests:
    - not_null
    - accepted_values:
        values:
        - http://www.foo.com
        - https://www.foo.com
        - www.foo.com
  - name: page_type
    description: Type or category of the web page
    tests:
    - not_null
  - name: character_count
    description: Number of characters in the web page
    tests:
    - not_null
  - name: link_count
    description: Number of links on the web page
    tests:
    - not_null
  - name: image_count
    description: Number of images on the web page
    tests:
    - not_null
  - name: max_ad_count
    description: Maximum number of ads allowed on the page
    tests:
    - not_null
  - name: creation_date
    description: Date when the web page was created
    tests:
    - not_null
  - name: is_auto_generated
    description: Indicates if the page was automatically generated
    tests:
    - not_null
  - name: last_access_date
    description: Date when the web page was last accessed
    tests:
    - not_null
  - name: record_end_date
    description: End date of the record's validity period
    cocoon_meta:
      missing_acceptable: Not applicable for active or current records.
  - name: record_start_date
    description: Start date of the record's validity period
    tests:
    - not_null

stg_web_sales (first 100 rows)

sale_date_id sale_time_id shipping_date_id item_id billing_customer_id billing_customer_demo_id billing_household_demo_id billing_address_id shipping_customer_id shipping_customer_demo_id shipping_household_demo_id shipping_address_id web_page_id website_id shipping_mode_id warehouse_id promotion_id order_id quantity wholesale_cost unit_list_price unit_sales_price total_discount_amount total_sales_price total_wholesale_cost total_list_price total_tax_amount coupon_amount total_shipping_cost net_paid_amount net_paid_with_tax net_paid_with_shipping total_net_paid net_profit
0 2451383 73313 2451482 1819 74 596485 1096 907 919 41329 1140 351 2 1 4 1 3 1 57 33.59 59.45 38.04 1220.37 2168.28 1914.63 3388.65 50.95 1149.18 575.70 1019.10 1070.05 1594.80 1645.75 -895.53
1 2451383 73313 2451411 1850 74 596485 1096 907 919 41329 1140 351 1 1 3 1 1 1 38 29.83 48.92 26.41 855.38 1003.58 1133.54 1858.96 30.10 0.00 910.86 1003.58 1033.68 1914.44 1944.54 -129.96
2 2451383 73313 2451413 805 74 596485 1096 907 919 41329 1140 351 2 1 10 1 3 1 32 49.72 107.89 97.10 345.28 3107.20 1591.04 3452.48 124.28 0.00 828.48 3107.20 3231.48 3935.68 4059.96 1516.16
3 2451383 73313 2451393 409 74 596485 1096 907 919 41329 1140 351 2 2 6 1 3 1 65 69.18 112.07 22.41 5827.90 1456.65 4496.70 7284.55 29.13 0.00 2476.50 1456.65 1485.78 3933.15 3962.28 -3040.05
4 2451383 73313 2451502 169 74 596485 1096 907 919 41329 1140 351 1 2 2 1 3 1 58 36.62 41.38 16.13 1464.50 935.54 2123.96 2400.04 84.19 0.00 167.62 935.54 1019.73 1103.16 1187.35 -1188.42
5 2451383 73313 2451421 1564 74 596485 1096 907 919 41329 1140 351 2 2 2 1 2 1 90 72.05 161.39 27.43 12056.40 2468.70 6484.50 14525.10 74.06 0.00 4647.60 2468.70 2542.76 7116.30 7190.36 -4015.80
6 2451383 73313 2451457 1750 74 596485 1096 907 919 41329 1140 351 1 2 16 1 2 1 15 83.92 174.55 69.82 1570.95 1047.30 1258.80 2618.25 20.94 0.00 392.70 1047.30 1068.24 1440.00 1460.94 -211.50
7 2451383 73313 2451430 1873 74 596485 1096 907 919 41329 1140 351 1 2 14 1 1 1 16 45.27 128.56 68.13 966.88 1090.08 724.32 2056.96 87.20 0.00 370.24 1090.08 1177.28 1460.32 1547.52 365.76
8 2451383 73313 2451458 925 74 596485 1096 907 919 41329 1140 351 1 2 8 1 1 1 54 53.45 60.39 26.57 1826.28 1434.78 2886.30 3261.06 48.78 215.21 488.70 1219.57 1268.35 1708.27 1757.05 -1666.73
9 2452625 34964 2452702 451 296 436090 2684 278 428 1487225 3907 901 1 1 16 1 3 2 47 49.64 68.99 12.41 2659.26 583.27 2333.08 3242.53 52.49 0.00 1134.58 583.27 635.76 1717.85 1770.34 -1749.81
10 2452625 34964 2452638 1477 296 436090 2684 278 428 1487225 3907 901 1 1 16 1 2 2 12 7.24 12.16 11.91 3.00 142.92 86.88 145.92 10.00 0.00 29.16 142.92 152.92 172.08 182.08 56.04
11 2452625 34964 2452645 1737 296 436090 2684 278 428 1487225 3907 901 2 1 7 1 3 2 6 45.21 67.36 30.31 222.30 181.86 271.26 404.16 16.36 0.00 185.88 181.86 198.22 367.74 384.10 -89.40
12 2452625 34964 2452690 1794 296 436090 2684 278 428 1487225 3907 901 1 2 3 1 3 2 43 9.62 13.08 9.02 174.58 387.86 413.66 562.44 19.39 0.00 117.82 387.86 407.25 505.68 525.07 -25.80
13 2452625 34964 2452707 690 296 436090 2684 278 428 1487225 3907 901 1 2 1 1 1 2 57 35.95 62.55 43.78 1069.89 2495.46 2049.15 3565.35 224.59 0.00 962.16 2495.46 2720.05 3457.62 3682.21 446.31
14 2452625 34964 2452640 1455 296 436090 2684 278 428 1487225 3907 901 1 2 6 1 3 2 93 65.80 152.65 29.00 11499.45 2697.00 6119.40 14196.45 215.76 0.00 7097.76 2697.00 2912.76 9794.76 10010.52 -3422.40
15 2452625 34964 2452634 1824 296 436090 2684 278 428 1487225 3907 901 1 2 18 1 3 2 93 55.42 127.46 1.27 11735.67 118.11 5154.06 11853.78 4.72 0.00 1421.97 118.11 122.83 1540.08 1544.80 -5035.95
16 2452625 34964 2452734 156 296 436090 2684 278 428 1487225 3907 901 1 2 3 1 1 2 82 48.65 91.94 8.27 6860.94 678.14 3989.30 7539.08 13.56 0.00 2788.82 678.14 691.70 3466.96 3480.52 -3311.16
17 2452625 34964 2452739 1407 296 436090 2684 278 428 1487225 3907 901 2 1 9 1 3 2 33 80.23 90.65 55.29 1166.88 1824.57 2647.59 2991.45 0.00 0.00 478.50 1824.57 1824.57 2303.07 2303.07 -823.02
18 2451754 1529 2451801 506 800 1219525 3450 375 180 293885 5550 475 1 2 2 1 1 3 65 5.37 10.31 2.06 536.25 133.90 349.05 670.15 7.47 9.37 26.65 124.53 132.00 151.18 158.65 -224.52
19 2451754 1529 2451791 1861 800 1219525 3450 375 180 293885 5550 475 1 2 9 1 1 3 74 74.66 83.61 52.67 2289.56 3897.58 5524.84 6187.14 116.92 0.00 1546.60 3897.58 4014.50 5444.18 5561.10 -1627.26
20 2451754 1529 2451814 637 800 1219525 3450 375 180 293885 5550 475 1 1 3 1 3 3 26 77.15 198.27 109.04 2319.98 2835.04 2005.90 5155.02 36.28 2381.43 206.18 453.61 489.89 659.79 696.07 -1552.29
21 2451754 1529 2451765 965 800 1219525 3450 375 180 293885 5550 475 2 2 3 1 2 3 25 99.00 292.05 262.84 730.25 6571.00 2475.00 7301.25 65.71 0.00 3285.50 6571.00 6636.71 9856.50 9922.21 4096.00
22 2451754 1529 2451855 725 800 1219525 3450 375 180 293885 5550 475 2 2 7 1 1 3 80 14.55 42.34 27.09 1220.00 2167.20 1164.00 3387.20 43.34 0.00 609.60 2167.20 2210.54 2776.80 2820.14 1003.20
23 2451754 1529 2451862 1393 800 1219525 3450 375 180 293885 5550 475 1 2 13 1 2 3 54 64.58 160.80 120.60 2170.80 6512.40 3487.32 8683.20 586.11 0.00 3646.62 6512.40 7098.51 10159.02 10745.13 3025.08
24 2451754 1529 2451809 1355 800 1219525 3450 375 180 293885 5550 475 2 1 20 1 3 3 30 54.81 81.11 22.71 1752.00 681.30 1644.30 2433.30 6.81 0.00 0.00 681.30 688.11 681.30 688.11 -963.00
25 2451754 1529 2451782 452 800 1219525 3450 375 180 293885 5550 475 1 2 6 1 2 3 19 87.13 170.77 155.40 292.03 2952.60 1655.47 3244.63 88.57 0.00 486.59 2952.60 3041.17 3439.19 3527.76 1297.13
26 2451754 1529 2451760 422 800 1219525 3450 375 180 293885 5550 475 1 1 16 1 1 3 29 86.36 90.67 68.90 631.33 1998.10 2504.44 2629.43 159.84 0.00 236.64 1998.10 2157.94 2234.74 2394.58 -506.34
27 2451754 1529 2451812 1721 800 1219525 3450 375 180 293885 5550 475 2 2 4 1 1 3 2 4.21 10.90 0.54 20.72 1.08 8.42 21.80 0.07 0.00 5.88 1.08 1.15 6.96 7.03 -7.34
28 2451754 1529 2451846 1079 800 1219525 3450 375 180 293885 5550 475 1 1 18 1 1 3 42 56.94 107.04 102.75 180.18 4315.50 2391.48 4495.68 43.15 0.00 1708.14 4315.50 4358.65 6023.64 6066.79 1924.02
29 2451754 1529 2451858 1817 800 1219525 3450 375 180 293885 5550 475 2 1 12 1 2 3 91 88.66 242.04 183.95 5286.19 16739.45 8068.06 22025.64 502.18 0.00 0.00 16739.45 17241.63 16739.45 17241.63 8671.39
30 2451754 1529 2451758 1556 800 1219525 3450 375 180 293885 5550 475 2 2 15 1 2 3 10 32.29 45.85 30.71 151.40 307.10 322.90 458.50 0.61 276.39 137.50 30.71 31.32 168.21 168.82 -292.19
31 2451754 1529 2451801 1688 800 1219525 3450 375 180 293885 5550 475 2 1 18 1 2 3 1 66.29 174.34 137.72 36.62 137.72 66.29 174.34 4.62 71.61 45.32 66.11 70.73 111.43 116.05 -0.18
32 2451754 1529 2451763 860 800 1219525 3450 375 180 293885 5550 475 2 2 19 1 2 3 7 66.22 145.68 144.22 10.22 1009.54 463.54 1019.76 80.76 0.00 193.69 1009.54 1090.30 1203.23 1283.99 546.00
33 2451754 1529 2451807 1813 800 1219525 3450 375 180 293885 5550 475 2 2 2 1 2 3 10 87.53 150.55 58.71 918.40 587.10 875.30 1505.50 27.12 135.03 316.10 452.07 479.19 768.17 795.29 -423.23
34 2451483 77832 2451501 985 187 512359 4331 456 757 1249940 2525 697 2 1 11 1 3 4 83 4.36 10.15 4.66 455.67 386.78 361.88 842.45 27.07 0.00 151.06 386.78 413.85 537.84 564.91 24.90
35 2451483 77832 2451554 1714 187 512359 4331 456 757 1249940 2525 697 1 2 4 1 2 4 20 71.90 103.53 85.92 352.20 1718.40 1438.00 2070.60 154.65 0.00 227.60 1718.40 1873.05 1946.00 2100.65 280.40
36 2451483 77832 2451542 1978 187 512359 4331 456 757 1249940 2525 697 2 1 12 1 3 4 26 81.47 126.27 27.77 2561.00 722.02 2118.22 3283.02 50.54 0.00 1411.54 722.02 772.56 2133.56 2184.10 -1396.20
37 2451483 77832 2451563 373 187 512359 4331 456 757 1249940 2525 697 1 2 12 1 2 4 32 30.81 40.05 22.02 576.96 704.64 985.92 1281.60 35.23 0.00 358.72 704.64 739.87 1063.36 1098.59 -281.28
38 2451483 77832 2451593 1778 187 512359 4331 456 757 1249940 2525 697 2 2 2 1 3 4 44 68.96 143.43 61.67 3597.44 2713.48 3034.24 6310.92 135.67 0.00 0.00 2713.48 2849.15 2713.48 2849.15 -320.76
39 2451483 77832 2451487 476 187 512359 4331 456 757 1249940 2525 697 2 1 12 1 3 4 41 6.21 11.92 1.31 435.01 53.71 254.61 488.72 3.75 0.00 190.24 53.71 57.46 243.95 247.70 -200.90
40 2451483 77832 2451487 578 187 512359 4331 456 757 1249940 2525 697 1 1 2 1 1 4 22 71.63 113.89 69.47 977.24 1528.34 1575.86 2505.58 137.55 0.00 1077.34 1528.34 1665.89 2605.68 2743.23 -47.52
41 2451483 77832 2451569 1105 187 512359 4331 456 757 1249940 2525 697 1 1 11 1 1 4 51 43.92 94.86 52.17 2177.19 2660.67 2239.92 4837.86 102.17 106.42 1209.21 2554.25 2656.42 3763.46 3865.63 314.33
42 2451483 77832 2451536 1096 187 512359 4331 456 757 1249940 2525 697 1 2 20 1 3 4 50 15.41 17.41 6.26 557.50 313.00 770.50 870.50 9.20 159.63 330.50 153.37 162.57 483.87 493.07 -617.13
43 2451483 77832 2451521 1460 187 512359 4331 456 757 1249940 2525 697 2 1 6 1 3 4 65 34.29 75.43 18.10 3726.45 1176.50 2228.85 4902.95 70.59 0.00 1176.50 1176.50 1247.09 2353.00 2423.59 -1052.35
44 2451483 77832 2451518 1862 187 512359 4331 456 757 1249940 2525 697 2 1 3 1 3 4 37 35.86 89.29 0.00 3303.73 0.00 1326.82 3303.73 0.00 0.00 1090.02 0.00 0.00 1090.02 1090.02 -1326.82
45 2451945 25492 2451977 1555 395 1553493 1391 89 505 1123302 983 681 2 2 6 1 1 5 57 69.75 192.51 102.03 5157.36 5815.71 3975.75 10973.07 174.47 0.00 2633.40 5815.71 5990.18 8449.11 8623.58 1839.96
46 2451945 25492 2451960 1607 395 1553493 1391 89 505 1123302 983 681 2 2 20 1 3 5 50 42.11 58.95 46.57 619.00 2328.50 2105.50 2947.50 162.99 0.00 58.50 2328.50 2491.49 2387.00 2549.99 223.00
47 2451945 25492 2452011 735 395 1553493 1391 89 505 1123302 983 681 1 1 1 1 2 5 89 70.02 77.72 55.18 2006.06 4911.02 6231.78 6917.08 147.33 0.00 2766.12 4911.02 5058.35 7677.14 7824.47 -1320.76
48 2451945 25492 2451956 1071 395 1553493 1391 89 505 1123302 983 681 1 1 19 1 1 5 69 21.00 24.36 13.64 739.68 941.16 1449.00 1680.84 9.41 0.00 487.14 941.16 950.57 1428.30 1437.71 -507.84
49 2451945 25492 2451954 653 395 1553493 1391 89 505 1123302 983 681 1 2 16 1 1 5 26 26.29 28.65 18.33 268.32 476.58 683.54 744.90 33.36 0.00 186.16 476.58 509.94 662.74 696.10 -206.96
50 2451945 25492 2451949 1759 395 1553493 1391 89 505 1123302 983 681 2 2 9 1 2 5 94 66.79 165.63 66.25 9341.72 6227.50 6278.26 15569.22 560.47 0.00 2491.00 6227.50 6787.97 8718.50 9278.97 -50.76
51 2451945 25492 2452018 323 395 1553493 1391 89 505 1123302 983 681 1 1 14 1 1 5 37 16.03 20.67 0.62 741.85 22.94 593.11 764.79 0.00 0.00 367.04 22.94 22.94 389.98 389.98 -570.17
52 2451945 25492 2452044 339 395 1553493 1391 89 505 1123302 983 681 2 2 10 1 2 5 51 10.48 30.18 23.84 323.34 1215.84 534.48 1539.18 23.58 36.47 122.91 1179.37 1202.95 1302.28 1325.86 644.89
53 2451945 25492 2452046 1379 395 1553493 1391 89 505 1123302 983 681 1 2 8 1 2 5 45 67.42 113.26 41.90 3211.20 1885.50 3033.90 5096.70 56.56 0.00 2497.05 1885.50 1942.06 4382.55 4439.11 -1148.40
54 2451945 25492 2452060 341 395 1553493 1391 89 505 1123302 983 681 2 2 6 1 1 5 3 47.96 84.88 1.69 249.57 5.07 143.88 254.64 0.20 0.00 30.54 5.07 5.27 35.61 35.81 -138.81
55 2451945 25492 2452065 1909 395 1553493 1391 89 505 1123302 983 681 1 2 2 1 3 5 71 68.25 152.19 4.56 10481.73 323.76 4845.75 10805.49 29.13 0.00 648.23 323.76 352.89 971.99 1001.12 -4521.99
56 2451945 25492 2451997 853 395 1553493 1391 89 505 1123302 983 681 2 1 7 1 3 5 57 25.26 42.18 2.53 2260.05 144.21 1439.82 2404.26 8.65 0.00 624.72 144.21 152.86 768.93 777.58 -1295.61
57 2451945 25492 2451977 305 395 1553493 1391 89 505 1123302 983 681 2 1 16 1 2 5 66 66.72 166.80 90.07 5064.18 5944.62 4403.52 11008.80 416.12 0.00 1651.32 5944.62 6360.74 7595.94 8012.06 1541.10
58 2451945 25492 2452005 1701 395 1553493 1391 89 505 1123302 983 681 2 1 9 1 1 5 60 30.82 56.70 29.48 1633.20 1768.80 1849.20 3402.00 0.00 1715.73 475.80 53.07 53.07 528.87 528.87 -1796.13
59 2451945 25492 2452002 115 395 1553493 1391 89 505 1123302 983 681 2 1 7 1 1 5 13 19.64 34.17 17.76 213.33 230.88 255.32 444.21 6.92 0.00 75.40 230.88 237.80 306.28 313.20 -24.44
60 2451945 25492 2451998 591 395 1553493 1391 89 505 1123302 983 681 2 2 7 1 1 5 63 9.36 19.74 16.38 211.68 1031.94 589.68 1243.62 35.39 526.28 522.27 505.66 541.05 1027.93 1063.32 -84.02
61 2451534 69300 2451633 1333 701 202409 1164 472 718 215362 6843 951 2 2 1 1 2 6 12 56.04 96.38 89.63 81.00 1075.56 672.48 1156.56 96.80 0.00 69.36 1075.56 1172.36 1144.92 1241.72 403.08
62 2451534 69300 2451644 127 701 202409 1164 472 718 215362 6843 951 1 1 10 1 3 6 73 36.58 41.70 35.44 456.98 2587.12 2670.34 3044.10 77.61 0.00 1247.57 2587.12 2664.73 3834.69 3912.30 -83.22
63 2451534 69300 2451610 1618 701 202409 1164 472 718 215362 6843 951 2 2 10 1 1 6 91 48.63 65.16 3.25 5633.81 295.75 4425.33 5929.56 2.95 0.00 2489.76 295.75 298.70 2785.51 2788.46 -4129.58
64 2451534 69300 2451651 1063 701 202409 1164 472 718 215362 6843 951 2 1 8 1 3 6 51 42.52 121.60 38.91 4217.19 1984.41 2168.52 6201.60 0.00 754.07 557.94 1230.34 1230.34 1788.28 1788.28 -938.18
65 2451534 69300 2451639 1111 701 202409 1164 472 718 215362 6843 951 1 1 1 1 1 6 1 99.76 206.50 0.00 206.50 0.00 99.76 206.50 0.00 0.00 33.04 0.00 0.00 33.04 33.04 -99.76
66 2451534 69300 2451583 1550 701 202409 1164 472 718 215362 6843 951 1 2 5 1 2 6 83 39.67 47.60 34.74 1067.38 2883.42 3292.61 3950.80 259.50 0.00 1026.71 2883.42 3142.92 3910.13 4169.63 -409.19
67 2451534 69300 2451576 1612 701 202409 1164 472 718 215362 6843 951 1 2 5 1 1 6 63 97.02 121.27 103.07 1146.60 6493.41 6112.26 7640.01 12.98 6233.67 2597.49 259.74 272.72 2857.23 2870.21 -5852.52
68 2451534 69300 2451604 949 701 202409 1164 472 718 215362 6843 951 2 2 2 1 3 6 11 16.62 23.76 2.61 232.65 28.71 182.82 261.36 2.29 0.00 73.15 28.71 31.00 101.86 104.15 -154.11
69 2451178 76807 2451181 1309 271 1161066 3908 303 91 233980 782 777 2 1 10 1 3 7 47 92.35 229.02 114.51 5381.97 5381.97 4340.45 10763.94 53.81 0.00 4843.35 5381.97 5435.78 10225.32 10279.13 1041.52
70 2451178 76807 2451279 1897 271 1161066 3908 303 91 233980 782 777 1 1 4 1 1 7 44 52.52 126.04 122.25 166.76 5379.00 2310.88 5545.76 430.32 0.00 1219.68 5379.00 5809.32 6598.68 7029.00 3068.12
71 2451178 76807 2451240 712 271 1161066 3908 303 91 233980 782 777 2 2 15 1 3 7 87 4.47 4.82 3.85 84.39 334.95 388.89 419.34 30.14 0.00 108.75 334.95 365.09 443.70 473.84 -53.94
72 2451178 76807 2451210 469 271 1161066 3908 303 91 233980 782 777 1 1 3 1 3 7 9 70.18 106.67 44.80 556.83 403.20 631.62 960.03 0.00 249.98 470.34 153.22 153.22 623.56 623.56 -478.40
73 2451178 76807 2451201 404 271 1161066 3908 303 91 233980 782 777 1 2 20 1 2 7 13 49.14 63.88 31.94 415.22 415.22 638.82 830.44 6.56 87.19 215.80 328.03 334.59 543.83 550.39 -310.79
74 2451178 76807 2451287 262 271 1161066 3908 303 91 233980 782 777 1 1 6 1 1 7 52 51.52 79.85 59.08 1080.04 3072.16 2679.04 4152.20 0.00 0.00 2034.24 3072.16 3072.16 5106.40 5106.40 393.12
75 2451178 76807 2451268 442 271 1161066 3908 303 91 233980 782 777 1 2 19 1 3 7 1 64.29 145.93 135.71 10.22 135.71 64.29 145.93 0.00 0.00 72.96 135.71 135.71 208.67 208.67 71.42
76 2451178 76807 2451243 542 271 1161066 3908 303 91 233980 782 777 2 2 20 1 2 7 44 94.24 201.67 12.10 8341.08 532.40 4146.56 8873.48 21.29 0.00 4170.32 532.40 553.69 4702.72 4724.01 -3614.16
77 2452190 51596 2452220 1093 108 1572482 5456 830 825 1895897 5705 479 1 2 19 1 1 8 76 55.63 72.31 54.23 1374.08 4121.48 4227.88 5495.56 82.42 0.00 164.16 4121.48 4203.90 4285.64 4368.06 -106.40
78 2452190 51596 2452307 1233 108 1572482 5456 830 825 1895897 5705 479 1 2 20 1 3 8 33 31.08 66.20 35.74 1005.18 1179.42 1025.64 2184.60 106.14 0.00 633.27 1179.42 1285.56 1812.69 1918.83 153.78
79 2452190 51596 2452216 1603 108 1572482 5456 830 825 1895897 5705 479 1 2 8 1 1 8 55 45.57 83.84 66.23 968.55 3642.65 2506.35 4611.20 218.55 0.00 1383.25 3642.65 3861.20 5025.90 5244.45 1136.30
80 2452190 51596 2452213 1541 108 1572482 5456 830 825 1895897 5705 479 1 1 14 1 1 8 70 34.71 71.50 50.05 1501.50 3503.50 2429.70 5005.00 0.00 0.00 2051.70 3503.50 3503.50 5555.20 5555.20 1073.80
81 2452190 51596 2452242 1245 108 1572482 5456 830 825 1895897 5705 479 2 2 17 1 3 8 10 28.39 67.00 7.37 596.30 73.70 283.90 670.00 1.47 0.00 180.90 73.70 75.17 254.60 256.07 -210.20
82 2452190 51596 2452221 621 108 1572482 5456 830 825 1895897 5705 479 2 1 2 1 1 8 87 88.69 201.32 30.19 14888.31 2626.53 7716.03 17514.84 0.00 0.00 1050.09 2626.53 2626.53 3676.62 3676.62 -5089.50
83 2452190 51596 2452276 163 108 1572482 5456 830 825 1895897 5705 479 1 1 13 1 2 8 22 46.33 81.54 44.84 807.40 986.48 1019.26 1793.88 49.32 0.00 807.18 986.48 1035.80 1793.66 1842.98 -32.78
84 2452190 51596 2452305 849 108 1572482 5456 830 825 1895897 5705 479 1 2 13 1 1 8 96 79.34 204.69 83.92 11593.92 8056.32 7616.64 19650.24 644.50 0.00 392.64 8056.32 8700.82 8448.96 9093.46 439.68
85 2452190 51596 2452267 1225 108 1572482 5456 830 825 1895897 5705 479 1 1 13 1 1 8 91 44.37 108.70 61.95 4254.25 5637.45 4037.67 9891.70 56.37 0.00 197.47 5637.45 5693.82 5834.92 5891.29 1599.78
86 2452190 51596 2452309 1009 108 1572482 5456 830 825 1895897 5705 479 1 2 4 1 2 8 44 70.93 75.18 10.52 2845.04 462.88 3120.92 3307.92 36.66 4.62 1223.64 458.26 494.92 1681.90 1718.56 -2662.66
87 2452190 51596 2452211 253 108 1572482 5456 830 825 1895897 5705 479 2 2 18 1 3 8 33 54.70 140.03 137.22 92.73 4528.26 1805.10 4620.99 90.56 0.00 2079.33 4528.26 4618.82 6607.59 6698.15 2723.16
88 2452190 51596 2452243 1695 108 1572482 5456 830 825 1895897 5705 479 1 1 3 1 1 8 59 25.18 37.01 0.37 2161.76 21.83 1485.62 2183.59 0.74 3.27 567.58 18.56 19.30 586.14 586.88 -1467.06
89 2452190 51596 2452305 617 108 1572482 5456 830 825 1895897 5705 479 1 1 5 1 1 8 64 5.57 7.07 1.83 335.36 117.12 356.48 452.48 0.82 105.40 153.60 11.72 12.54 165.32 166.14 -344.76
90 2452190 51596 2452192 1429 108 1572482 5456 830 825 1895897 5705 479 1 1 11 1 3 8 44 58.29 112.49 22.49 3960.00 989.56 2564.76 4949.56 89.06 0.00 247.28 989.56 1078.62 1236.84 1325.90 -1575.20
91 2452190 51596 2452242 1353 108 1572482 5456 830 825 1895897 5705 479 2 1 17 1 3 8 93 18.56 18.93 3.97 1391.28 369.21 1726.08 1760.49 0.00 0.00 704.01 369.21 369.21 1073.22 1073.22 -1356.87
92 2450900 56256 2450988 302 676 1815460 4197 581 248 1833962 39 23 1 1 10 1 3 9 16 96.14 256.69 10.26 3942.88 164.16 1538.24 4107.04 0.00 0.00 2053.44 164.16 164.16 2217.60 2217.60 -1374.08
93 2450900 56256 2450943 1316 676 1815460 4197 581 248 1833962 39 23 2 1 17 1 3 9 29 76.54 210.48 134.70 2197.62 3906.30 2219.66 6103.92 156.25 0.00 365.98 3906.30 4062.55 4272.28 4428.53 1686.64
94 2450900 56256 2450988 721 676 1815460 4197 581 248 1833962 39 23 2 1 2 1 2 9 75 77.80 126.03 113.42 945.75 8506.50 5835.00 9452.25 58.69 2637.01 2646.00 5869.49 5928.18 8515.49 8574.18 34.49
95 2450900 56256 2451000 824 676 1815460 4197 581 248 1833962 39 23 2 1 11 1 3 9 92 47.71 59.16 33.12 2395.68 3047.04 4389.32 5442.72 60.94 0.00 2012.96 3047.04 3107.98 5060.00 5120.94 -1342.28
96 2450900 56256 2450994 502 676 1815460 4197 581 248 1833962 39 23 1 2 6 1 1 9 30 84.41 243.10 126.41 3500.70 3792.30 2532.30 7293.00 303.38 0.00 802.20 3792.30 4095.68 4594.50 4897.88 1260.00
97 2450900 56256 2450983 1609 676 1815460 4197 581 248 1833962 39 23 2 2 4 1 2 9 94 93.91 145.56 1.45 13546.34 136.30 8827.54 13682.64 8.17 0.00 2325.56 136.30 144.47 2461.86 2470.03 -8691.24
98 2450900 56256 2450902 1165 676 1815460 4197 581 248 1833962 39 23 1 1 13 1 1 9 79 74.37 135.35 102.86 2566.71 8125.94 5875.23 10692.65 162.51 0.00 1496.26 8125.94 8288.45 9622.20 9784.71 2250.71

stg_web_sales.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"web_sales_renamed" AS (
    -- Rename: Renaming columns
    -- WS_SOLD_DATE_SK -> sale_date_id
    -- WS_SOLD_TIME_SK -> sale_time_id
    -- WS_SHIP_DATE_SK -> shipping_date_id
    -- WS_ITEM_SK -> item_id
    -- WS_BILL_CUSTOMER_SK -> billing_customer_id
    -- WS_BILL_CDEMO_SK -> billing_customer_demo_id
    -- WS_BILL_HDEMO_SK -> billing_household_demo_id
    -- WS_BILL_ADDR_SK -> billing_address_id
    -- WS_SHIP_CUSTOMER_SK -> shipping_customer_id
    -- WS_SHIP_CDEMO_SK -> shipping_customer_demo_id
    -- WS_SHIP_HDEMO_SK -> shipping_household_demo_id
    -- WS_SHIP_ADDR_SK -> shipping_address_id
    -- WS_WEB_PAGE_SK -> web_page_id
    -- WS_WEB_SITE_SK -> website_id
    -- WS_SHIP_MODE_SK -> shipping_mode_id
    -- WS_WAREHOUSE_SK -> warehouse_id
    -- WS_PROMO_SK -> promotion_id
    -- WS_ORDER_NUMBER -> order_id
    -- WS_QUANTITY -> quantity
    -- WS_WHOLESALE_COST -> wholesale_cost
    -- WS_LIST_PRICE -> unit_list_price
    -- WS_SALES_PRICE -> unit_sales_price
    -- WS_EXT_DISCOUNT_AMT -> total_discount_amount
    -- WS_EXT_SALES_PRICE -> total_sales_price
    -- WS_EXT_WHOLESALE_COST -> total_wholesale_cost
    -- WS_EXT_LIST_PRICE -> total_list_price
    -- WS_EXT_TAX -> total_tax_amount
    -- WS_COUPON_AMT -> coupon_amount
    -- WS_EXT_SHIP_COST -> total_shipping_cost
    -- WS_NET_PAID -> net_paid_amount
    -- WS_NET_PAID_INC_TAX -> net_paid_with_tax
    -- WS_NET_PAID_INC_SHIP -> net_paid_with_shipping
    -- WS_NET_PAID_INC_SHIP_TAX -> total_net_paid
    -- WS_NET_PROFIT -> net_profit
    SELECT 
        "WS_SOLD_DATE_SK" AS "sale_date_id",
        "WS_SOLD_TIME_SK" AS "sale_time_id",
        "WS_SHIP_DATE_SK" AS "shipping_date_id",
        "WS_ITEM_SK" AS "item_id",
        "WS_BILL_CUSTOMER_SK" AS "billing_customer_id",
        "WS_BILL_CDEMO_SK" AS "billing_customer_demo_id",
        "WS_BILL_HDEMO_SK" AS "billing_household_demo_id",
        "WS_BILL_ADDR_SK" AS "billing_address_id",
        "WS_SHIP_CUSTOMER_SK" AS "shipping_customer_id",
        "WS_SHIP_CDEMO_SK" AS "shipping_customer_demo_id",
        "WS_SHIP_HDEMO_SK" AS "shipping_household_demo_id",
        "WS_SHIP_ADDR_SK" AS "shipping_address_id",
        "WS_WEB_PAGE_SK" AS "web_page_id",
        "WS_WEB_SITE_SK" AS "website_id",
        "WS_SHIP_MODE_SK" AS "shipping_mode_id",
        "WS_WAREHOUSE_SK" AS "warehouse_id",
        "WS_PROMO_SK" AS "promotion_id",
        "WS_ORDER_NUMBER" AS "order_id",
        "WS_QUANTITY" AS "quantity",
        "WS_WHOLESALE_COST" AS "wholesale_cost",
        "WS_LIST_PRICE" AS "unit_list_price",
        "WS_SALES_PRICE" AS "unit_sales_price",
        "WS_EXT_DISCOUNT_AMT" AS "total_discount_amount",
        "WS_EXT_SALES_PRICE" AS "total_sales_price",
        "WS_EXT_WHOLESALE_COST" AS "total_wholesale_cost",
        "WS_EXT_LIST_PRICE" AS "total_list_price",
        "WS_EXT_TAX" AS "total_tax_amount",
        "WS_COUPON_AMT" AS "coupon_amount",
        "WS_EXT_SHIP_COST" AS "total_shipping_cost",
        "WS_NET_PAID" AS "net_paid_amount",
        "WS_NET_PAID_INC_TAX" AS "net_paid_with_tax",
        "WS_NET_PAID_INC_SHIP" AS "net_paid_with_shipping",
        "WS_NET_PAID_INC_SHIP_TAX" AS "total_net_paid",
        "WS_NET_PROFIT" AS "net_profit"
    FROM "web_sales"
)

-- COCOON BLOCK END
SELECT * FROM "web_sales_renamed"

stg_web_sales.yml (Document the table)

version: 2
models:
- name: stg_web_sales
  description: The table is about web sales transactions. It includes details like
    sale date, item sold, customer info, shipping details, order quantities, prices,
    costs, discounts, taxes, and profit. Each row represents a single item in an online
    order, with financial breakdowns and associated dimension keys for customer, product,
    and promotional attributes.
  columns:
  - name: sale_date_id
    description: Surrogate key for sale date
    tests:
    - not_null
  - name: sale_time_id
    description: Surrogate key for sale time
    tests:
    - not_null
  - name: shipping_date_id
    description: Surrogate key for shipping date
    tests:
    - not_null
  - name: item_id
    description: Surrogate key for item
    tests:
    - not_null
  - name: billing_customer_id
    description: Surrogate key for billing customer
    tests:
    - not_null
  - name: billing_customer_demo_id
    description: Surrogate key for billing customer demographics
    tests:
    - not_null
  - name: billing_household_demo_id
    description: Surrogate key for billing household demographics
    tests:
    - not_null
  - name: billing_address_id
    description: Surrogate key for billing address
    tests:
    - not_null
  - name: shipping_customer_id
    description: Surrogate key for shipping customer
    tests:
    - not_null
  - name: shipping_customer_demo_id
    description: Surrogate key for shipping customer demographics
    tests:
    - not_null
  - name: shipping_household_demo_id
    description: Surrogate key for shipping household demographics
    tests:
    - not_null
  - name: shipping_address_id
    description: Surrogate key for shipping address
    tests:
    - not_null
  - name: web_page_id
    description: Web page identifier for the sale
    tests:
    - not_null
  - name: website_id
    description: Website identifier for the sale
    tests:
    - not_null
  - name: shipping_mode_id
    description: Surrogate key for shipping mode
    tests:
    - not_null
  - name: warehouse_id
    description: Warehouse identifier for web sales
    tests:
    - not_null
  - name: promotion_id
    description: Surrogate key for promotion
    tests:
    - not_null
  - name: order_id
    description: Unique identifier for the order
    tests:
    - not_null
  - name: quantity
    description: Quantity of item ordered
    tests:
    - not_null
  - name: wholesale_cost
    description: Wholesale cost of the item sold
    tests:
    - not_null
  - name: unit_list_price
    description: List price per unit of item
    tests:
    - not_null
  - name: unit_sales_price
    description: Sales price per unit of item
    tests:
    - not_null
  - name: total_discount_amount
    description: Extended discount amount for item
    tests:
    - not_null
  - name: total_sales_price
    description: Extended sales price for item
    tests:
    - not_null
  - name: total_wholesale_cost
    description: Extended wholesale cost for item
    tests:
    - not_null
  - name: total_list_price
    description: Extended list price for item
    tests:
    - not_null
  - name: total_tax_amount
    description: Extended tax amount for item
    tests:
    - not_null
  - name: coupon_amount
    description: Amount of coupon applied to purchase
    tests:
    - not_null
  - name: total_shipping_cost
    description: Extended shipping cost for item
    tests:
    - not_null
  - name: net_paid_amount
    description: Net amount paid excluding shipping and tax
    tests:
    - not_null
  - name: net_paid_with_tax
    description: Net amount paid including tax
    tests:
    - not_null
  - name: net_paid_with_shipping
    description: Net amount paid including shipping
    tests:
    - not_null
  - name: total_net_paid
    description: Net amount paid including shipping and tax
    tests:
    - not_null
  - name: net_profit
    description: Net profit for item
    tests:
    - not_null

stg_customer_demographics (first 100 rows)

education_level employed_dependents gender total_dependents purchase_estimate marital_status credit_rating demographic_id dependents_in_college
0 Primary 0 M 0 500 M Good 1 0
1 Primary 0 F 0 500 M Good 2 0
2 Primary 0 M 0 500 S Good 3 0
3 Primary 0 F 0 500 S Good 4 0
4 Primary 0 M 0 500 D Good 5 0
5 Primary 0 F 0 500 D Good 6 0
6 Primary 0 M 0 500 W Good 7 0
7 Primary 0 F 0 500 W Good 8 0
8 Primary 0 M 0 500 U Good 9 0
9 Primary 0 F 0 500 U Good 10 0
10 Secondary 0 M 0 500 M Good 11 0
11 Secondary 0 F 0 500 M Good 12 0
12 Secondary 0 M 0 500 S Good 13 0
13 Secondary 0 F 0 500 S Good 14 0
14 Secondary 0 M 0 500 D Good 15 0
15 Secondary 0 F 0 500 D Good 16 0
16 Secondary 0 M 0 500 W Good 17 0
17 Secondary 0 F 0 500 W Good 18 0
18 Secondary 0 M 0 500 U Good 19 0
19 Secondary 0 F 0 500 U Good 20 0
20 College 0 M 0 500 M Good 21 0
21 College 0 F 0 500 M Good 22 0
22 College 0 M 0 500 S Good 23 0
23 College 0 F 0 500 S Good 24 0
24 College 0 M 0 500 D Good 25 0
25 College 0 F 0 500 D Good 26 0
26 College 0 M 0 500 W Good 27 0
27 College 0 F 0 500 W Good 28 0
28 College 0 M 0 500 U Good 29 0
29 College 0 F 0 500 U Good 30 0
30 2 yr Degree 0 M 0 500 M Good 31 0
31 2 yr Degree 0 F 0 500 M Good 32 0
32 2 yr Degree 0 M 0 500 S Good 33 0
33 2 yr Degree 0 F 0 500 S Good 34 0
34 2 yr Degree 0 M 0 500 D Good 35 0
35 2 yr Degree 0 F 0 500 D Good 36 0
36 2 yr Degree 0 M 0 500 W Good 37 0
37 2 yr Degree 0 F 0 500 W Good 38 0
38 2 yr Degree 0 M 0 500 U Good 39 0
39 2 yr Degree 0 F 0 500 U Good 40 0
40 4 yr Degree 0 M 0 500 M Good 41 0
41 4 yr Degree 0 F 0 500 M Good 42 0
42 4 yr Degree 0 M 0 500 S Good 43 0
43 4 yr Degree 0 F 0 500 S Good 44 0
44 4 yr Degree 0 M 0 500 D Good 45 0
45 4 yr Degree 0 F 0 500 D Good 46 0
46 4 yr Degree 0 M 0 500 W Good 47 0
47 4 yr Degree 0 F 0 500 W Good 48 0
48 4 yr Degree 0 M 0 500 U Good 49 0
49 4 yr Degree 0 F 0 500 U Good 50 0
50 Advanced Degree 0 M 0 500 M Good 51 0
51 Advanced Degree 0 F 0 500 M Good 52 0
52 Advanced Degree 0 M 0 500 S Good 53 0
53 Advanced Degree 0 F 0 500 S Good 54 0
54 Advanced Degree 0 M 0 500 D Good 55 0
55 Advanced Degree 0 F 0 500 D Good 56 0
56 Advanced Degree 0 M 0 500 W Good 57 0
57 Advanced Degree 0 F 0 500 W Good 58 0
58 Advanced Degree 0 M 0 500 U Good 59 0
59 Advanced Degree 0 F 0 500 U Good 60 0
60 None 0 M 0 500 M Good 61 0
61 None 0 F 0 500 M Good 62 0
62 None 0 M 0 500 S Good 63 0
63 None 0 F 0 500 S Good 64 0
64 None 0 M 0 500 D Good 65 0
65 None 0 F 0 500 D Good 66 0
66 None 0 M 0 500 W Good 67 0
67 None 0 F 0 500 W Good 68 0
68 None 0 M 0 500 U Good 69 0
69 None 0 F 0 500 U Good 70 0
70 Primary 0 M 0 1000 M Good 71 0
71 Primary 0 F 0 1000 M Good 72 0
72 Primary 0 M 0 1000 S Good 73 0
73 Primary 0 F 0 1000 S Good 74 0
74 Primary 0 M 0 1000 D Good 75 0
75 Primary 0 F 0 1000 D Good 76 0
76 Primary 0 M 0 1000 W Good 77 0
77 Primary 0 F 0 1000 W Good 78 0
78 Primary 0 M 0 1000 U Good 79 0
79 Primary 0 F 0 1000 U Good 80 0
80 Secondary 0 M 0 1000 M Good 81 0
81 Secondary 0 F 0 1000 M Good 82 0
82 Secondary 0 M 0 1000 S Good 83 0
83 Secondary 0 F 0 1000 S Good 84 0
84 Secondary 0 M 0 1000 D Good 85 0
85 Secondary 0 F 0 1000 D Good 86 0
86 Secondary 0 M 0 1000 W Good 87 0
87 Secondary 0 F 0 1000 W Good 88 0
88 Secondary 0 M 0 1000 U Good 89 0
89 Secondary 0 F 0 1000 U Good 90 0
90 College 0 M 0 1000 M Good 91 0
91 College 0 F 0 1000 M Good 92 0
92 College 0 M 0 1000 S Good 93 0
93 College 0 F 0 1000 S Good 94 0
94 College 0 M 0 1000 D Good 95 0
95 College 0 F 0 1000 D Good 96 0
96 College 0 M 0 1000 W Good 97 0
97 College 0 F 0 1000 W Good 98 0
98 College 0 M 0 1000 U Good 99 0

stg_customer_demographics.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"customer_demographics_renamed" AS (
    -- Rename: Renaming columns
    -- CD_DEMO_SK -> demographic_id
    -- CD_GENDER -> gender
    -- CD_MARITAL_STATUS -> marital_status
    -- CD_EDUCATION_STATUS -> education_level
    -- CD_PURCHASE_ESTIMATE -> purchase_estimate
    -- CD_CREDIT_RATING -> credit_rating
    -- CD_DEP_COUNT -> total_dependents
    -- CD_DEP_EMPLOYED_COUNT -> employed_dependents
    -- CD_DEP_COLLEGE_COUNT -> dependents_in_college
    SELECT 
        "CD_DEMO_SK" AS "demographic_id",
        "CD_GENDER" AS "gender",
        "CD_MARITAL_STATUS" AS "marital_status",
        "CD_EDUCATION_STATUS" AS "education_level",
        "CD_PURCHASE_ESTIMATE" AS "purchase_estimate",
        "CD_CREDIT_RATING" AS "credit_rating",
        "CD_DEP_COUNT" AS "total_dependents",
        "CD_DEP_EMPLOYED_COUNT" AS "employed_dependents",
        "CD_DEP_COLLEGE_COUNT" AS "dependents_in_college"
    FROM "customer_demographics"
),

"customer_demographics_renamed_null" AS (
    -- NULL Imputation: Impute Null to Disguised Missing Values
    -- education_level: ['Unknown']
    SELECT 
        CASE
            WHEN "education_level" = 'Unknown' THEN NULL
            ELSE "education_level"
        END AS "education_level",
        "employed_dependents",
        "gender",
        "total_dependents",
        "purchase_estimate",
        "marital_status",
        "credit_rating",
        "demographic_id",
        "dependents_in_college"
    FROM "customer_demographics_renamed"
)

-- COCOON BLOCK END
SELECT * FROM "customer_demographics_renamed_null"

stg_customer_demographics.yml (Document the table)

version: 2
models:
- name: stg_customer_demographics
  description: The table is about customer demographics. It contains details such
    as gender, marital status, education level, purchase estimate, credit rating,
    and information about dependents. Each row represents a unique customer with a
    specific demographic profile identified by CD_DEMO_SK. The table provides insights
    into various characteristics of customers for analysis purposes.
  columns:
  - name: education_level
    description: Customer's highest level of education
    tests:
    - not_null
    - accepted_values:
        values:
        - No Formal Education
        - Primary
        - Secondary
        - College
        - 2 yr Degree
        - 4 yr Degree
        - Advanced Degree
        - Vocational/Technical
  - name: employed_dependents
    description: Number of employed dependents
    tests:
    - not_null
  - name: gender
    description: Customer's gender
    tests:
    - not_null
    - accepted_values:
        values:
        - M
        - F
        - O
  - name: total_dependents
    description: Total number of dependents
    tests:
    - not_null
  - name: purchase_estimate
    description: Estimated purchase amount for the customer
    tests:
    - not_null
  - name: marital_status
    description: Customer's marital status
    tests:
    - not_null
    - accepted_values:
        values:
        - D
        - M
        - S
        - W
        - U
        - P
  - name: credit_rating
    description: Customer's credit rating
    tests:
    - not_null
    - accepted_values:
        values:
        - Excellent
        - Good
        - Fair
        - Poor
        - Very Poor
  - name: demographic_id
    description: Unique identifier for customer demographic profile
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a unique identifier for customer demographic profile.
        For this table, each row represents a unique customer with a specific demographic
        profile. The demographic_id is unique across rows, as it's described as a
        "Unique identifier for customer demographic profile".
  - name: dependents_in_college
    description: Number of dependents in college
    tests:
    - not_null

stg_web_returns (first 100 rows)

return_date_key return_time_key item_key refunded_customer_key refunded_customer_demo_key refunded_household_demo_key refunded_address_key returning_customer_key returning_customer_demo_key returning_household_demo_key returning_address_key web_page_key reason_key order_number return_quantity return_amount return_tax return_amount_with_tax return_fee return_shipping_cost refunded_cash reversed_charge account_credit net_loss
0 2451653.0 7022.0 1750 224.0 1011635.0 3446.0 57.0 224.0 1011635.0 3446.0 57.0 1.0 1.0 1 10.0 698.20 13.96 712.16 18.63 820.30 300.22 382.06 15.92 852.89
1 2451627.0 64915.0 925 811.0 18405.0 199.0 793.0 811.0 18405.0 199.0 793.0 1.0 1.0 1 47.0 1248.79 49.95 1298.74 61.81 709.23 262.24 128.25 858.30 820.99
2 2452798.0 NaN 1455 NaN 31639.0 NaN 790.0 NaN 31639.0 2038.0 790.0 NaN 1.0 2 11.0 NaN 25.52 NaN NaN 16.72 NaN 16.36 165.47 NaN
3 2452243.0 23325.0 735 687.0 663037.0 1234.0 984.0 687.0 663037.0 1234.0 984.0 1.0 1.0 5 33.0 1820.94 54.62 1875.56 70.16 1000.23 1802.73 14.56 3.65 1125.01
4 2452305.0 73981.0 1909 552.0 1104998.0 2244.0 90.0 552.0 1104998.0 2244.0 90.0 1.0 1.0 5 18.0 82.08 7.38 89.46 35.63 1342.26 38.57 19.14 24.37 1385.27
5 2451288.0 74891.0 1897 650.0 1309189.0 128.0 420.0 650.0 1309189.0 128.0 420.0 1.0 1.0 7 16.0 1956.00 156.48 2112.48 22.56 221.76 215.16 504.84 1236.00 400.80
6 2451337.0 44242.0 469 377.0 1291615.0 653.0 891.0 377.0 1291615.0 653.0 891.0 1.0 1.0 7 3.0 134.40 0.00 134.40 78.06 108.78 108.86 15.06 10.48 186.84
7 2451278.0 48347.0 542 887.0 1781163.0 3486.0 762.0 887.0 1781163.0 3486.0 762.0 2.0 1.0 7 43.0 520.30 20.81 541.11 54.02 3468.38 504.69 14.36 1.25 3543.21
8 2452098.0 72741.0 109 559.0 1010209.0 2812.0 415.0 559.0 1010209.0 2812.0 415.0 1.0 1.0 10 4.0 79.68 2.39 82.07 11.40 54.52 58.16 1.50 20.02 68.31
9 2452065.0 46137.0 629 204.0 217410.0 1416.0 222.0 204.0 217410.0 1416.0 222.0 1.0 1.0 11 28.0 707.00 28.28 735.28 16.84 382.20 424.20 248.86 33.94 427.32
10 2451936.0 25850.0 1364 623.0 1546796.0 816.0 389.0 623.0 1546796.0 816.0 389.0 1.0 1.0 11 6.0 708.66 21.25 729.91 25.19 146.10 474.80 144.99 88.87 192.54
11 2452508.0 71077.0 925 10.0 1589848.0 6933.0 371.0 10.0 1589848.0 6933.0 371.0 1.0 1.0 12 26.0 528.84 37.01 565.85 90.97 237.12 449.51 23.00 56.33 365.10
12 2451590.0 30553.0 1928 36.0 1376937.0 2285.0 586.0 36.0 1376937.0 2285.0 586.0 1.0 1.0 13 16.0 417.60 25.05 442.65 22.13 539.36 50.11 128.62 238.87 586.54
13 2452495.0 NaN 907 758.0 NaN 2243.0 NaN 758.0 1696824.0 NaN NaN 1.0 NaN 14 4.0 NaN NaN NaN 11.84 NaN 9.39 NaN NaN NaN
14 2452566.0 67292.0 1583 337.0 970065.0 593.0 321.0 337.0 970065.0 593.0 321.0 1.0 1.0 14 5.0 219.85 15.38 235.23 28.94 233.90 147.29 42.81 29.75 278.22
15 NaN NaN 926 NaN NaN 2358.0 NaN 932.0 418645.0 NaN NaN NaN NaN 15 24.0 NaN NaN NaN 54.71 62.40 NaN 129.49 60.94 143.37
16 2452567.0 26030.0 1675 543.0 1118206.0 6669.0 732.0 543.0 1118206.0 6669.0 732.0 1.0 1.0 16 40.0 1479.60 103.57 1583.17 4.99 856.80 665.82 219.72 594.06 965.36
17 2452569.0 29129.0 1879 888.0 217580.0 5919.0 658.0 888.0 217580.0 5919.0 658.0 1.0 1.0 17 10.0 69.00 6.21 75.21 60.35 19.70 31.05 11.38 26.57 86.26
18 2451692.0 37442.0 200 623.0 1176118.0 1613.0 108.0 623.0 1176118.0 1613.0 108.0 1.0 1.0 18 11.0 1628.66 32.57 1661.23 13.11 506.22 1237.78 355.70 35.18 551.90
19 2451495.0 70505.0 793 84.0 1360384.0 4437.0 537.0 84.0 1360384.0 4437.0 537.0 1.0 1.0 18 23.0 447.58 17.90 465.48 30.56 302.22 331.20 51.20 65.18 350.68
20 2451396.0 74839.0 364 NaN NaN NaN NaN 767.0 NaN 3439.0 775.0 NaN 1.0 22 NaN NaN 0.00 NaN NaN 75.90 485.00 NaN NaN NaN
21 2451271.0 72837.0 188 141.0 718131.0 2368.0 405.0 141.0 718131.0 2368.0 405.0 2.0 1.0 22 30.0 247.20 9.88 257.08 23.57 717.30 229.89 15.05 2.26 750.75
22 2451430.0 NaN 313 764.0 NaN NaN NaN 764.0 1060754.0 5497.0 NaN NaN 1.0 22 79.0 NaN 0.00 0.00 92.68 NaN NaN 0.00 0.00 NaN
23 2452236.0 23926.0 997 618.0 8492.0 4766.0 440.0 618.0 8492.0 4766.0 440.0 1.0 1.0 24 9.0 107.46 3.22 110.68 54.67 33.03 33.31 68.21 5.94 90.92
24 2452273.0 38436.0 1815 71.0 1421648.0 5454.0 396.0 71.0 1421648.0 5454.0 396.0 1.0 1.0 24 8.0 252.08 15.12 267.20 62.43 12.72 133.60 29.62 88.86 90.27
25 2451372.0 50248.0 724 691.0 813091.0 5891.0 91.0 691.0 813091.0 5891.0 91.0 1.0 1.0 26 77.0 1088.78 43.55 1132.33 1.05 3811.50 163.31 397.95 527.52 3856.10
26 2451514.0 46416.0 1688 970.0 854030.0 2690.0 550.0 970.0 854030.0 2690.0 550.0 1.0 1.0 26 10.0 362.50 3.62 366.12 68.99 164.80 290.00 60.17 12.33 237.41
27 2451529.0 45968.0 500 943.0 58420.0 2297.0 421.0 943.0 58420.0 2297.0 421.0 1.0 1.0 26 35.0 340.20 13.60 353.80 50.62 453.60 336.79 2.25 1.16 517.82
28 2450982.0 37442.0 367 331.0 1565742.0 5600.0 258.0 331.0 1565742.0 5600.0 258.0 1.0 1.0 27 4.0 19.20 1.72 20.92 63.20 41.36 4.60 10.22 4.38 106.28
29 2450976.0 42382.0 274 968.0 169725.0 1529.0 286.0 968.0 169725.0 1529.0 286.0 1.0 1.0 27 11.0 380.49 15.21 395.70 76.70 77.66 144.58 11.79 224.12 169.57
30 2452492.0 36787.0 875 839.0 1060269.0 5299.0 82.0 839.0 1060269.0 5299.0 82.0 1.0 1.0 29 11.0 400.84 20.04 420.88 16.27 99.11 308.64 18.44 73.76 135.42
31 2451423.0 75368.0 1612 553.0 1687614.0 2228.0 289.0 553.0 1687614.0 2228.0 289.0 1.0 1.0 30 19.0 168.15 3.36 171.51 94.69 107.54 117.70 42.88 7.57 205.59
32 2451476.0 48229.0 80 962.0 12631.0 2900.0 369.0 962.0 12631.0 2900.0 369.0 1.0 1.0 30 5.0 18.20 0.54 18.74 11.66 8.25 2.54 5.79 9.87 20.45
33 NaN 43497.0 422 NaN 1006429.0 3340.0 251.0 318.0 1006429.0 3340.0 NaN NaN NaN 32 7.0 470.26 NaN 484.36 99.14 NaN 470.26 0.00 NaN NaN
34 2451486.0 253.0 1078 754.0 998787.0 3867.0 347.0 754.0 998787.0 3867.0 347.0 1.0 1.0 32 2.0 98.40 8.85 107.25 16.33 131.22 51.16 27.87 19.37 156.40
35 2451420.0 61938.0 1816 841.0 1808855.0 5916.0 330.0 841.0 1808855.0 5916.0 330.0 1.0 1.0 32 44.0 4496.36 314.74 4811.10 5.38 1570.80 4316.50 151.08 28.78 1890.92
36 2451622.0 68694.0 1327 758.0 1477303.0 5095.0 440.0 758.0 1477303.0 5095.0 440.0 1.0 1.0 33 5.0 1231.20 24.62 1255.82 13.24 580.20 295.48 823.43 112.29 618.06
37 2451734.0 55182.0 346 341.0 914970.0 5999.0 428.0 341.0 914970.0 5999.0 428.0 1.0 1.0 33 7.0 88.34 5.30 93.64 24.45 109.27 6.18 6.57 75.59 139.02
38 2451697.0 47575.0 1963 237.0 1089705.0 4773.0 841.0 237.0 1089705.0 4773.0 841.0 1.0 1.0 33 3.0 164.85 1.64 166.49 3.49 57.06 6.59 137.68 20.58 62.19
39 2451615.0 73881.0 1663 870.0 705124.0 5978.0 32.0 870.0 705124.0 5978.0 32.0 2.0 1.0 34 32.0 4588.16 183.52 4771.68 51.92 2136.96 917.63 3523.70 146.83 2372.40
40 2452120.0 67792.0 1789 39.0 1600609.0 4132.0 502.0 39.0 1600609.0 4132.0 502.0 2.0 1.0 36 16.0 496.96 34.78 531.74 71.96 773.12 134.17 261.20 101.59 879.86
41 2452135.0 32975.0 997 233.0 680344.0 3655.0 766.0 233.0 680344.0 3655.0 766.0 2.0 1.0 36 33.0 1560.57 0.00 1560.57 73.33 845.46 1201.63 326.63 32.31 918.79
42 2452038.0 60285.0 1243 96.0 1039516.0 6936.0 109.0 96.0 1039516.0 6936.0 109.0 2.0 1.0 36 91.0 15813.07 632.52 16445.59 65.73 8008.91 13441.10 1352.02 1019.95 8707.16
43 2451873.0 61736.0 823 984.0 1914824.0 7017.0 257.0 984.0 1914824.0 7017.0 257.0 2.0 1.0 38 54.0 2243.70 179.49 2423.19 60.32 1075.68 628.23 1373.14 242.33 1315.49
44 2451812.0 17353.0 1601 13.0 691848.0 1836.0 624.0 13.0 691848.0 1836.0 624.0 1.0 1.0 38 11.0 15.18 0.00 15.18 42.63 5.50 9.71 1.53 3.94 48.13
45 2452054.0 39091.0 1411 582.0 1892903.0 2624.0 392.0 582.0 1892903.0 2624.0 392.0 1.0 1.0 39 27.0 3078.54 30.78 3109.32 79.71 1835.19 1015.91 453.77 1608.86 1945.68
46 2452413.0 27263.0 671 730.0 781278.0 1291.0 963.0 730.0 781278.0 1291.0 963.0 1.0 1.0 40 13.0 1286.22 51.44 1337.66 97.11 95.16 424.45 17.23 844.54 243.71
47 2452476.0 28293.0 1929 777.0 803717.0 3657.0 150.0 777.0 803717.0 3657.0 150.0 2.0 1.0 40 9.0 103.32 1.03 104.35 31.68 2.79 76.45 7.25 19.62 35.50
48 2451905.0 55597.0 1441 775.0 962709.0 43.0 624.0 775.0 962709.0 43.0 624.0 2.0 1.0 41 56.0 4452.00 311.64 4763.64 63.92 3368.96 1958.88 797.79 1695.33 3744.52
49 2451845.0 42388.0 104 546.0 1391011.0 5229.0 847.0 546.0 1391011.0 5229.0 847.0 1.0 1.0 41 29.0 1387.36 69.36 1456.72 14.34 818.67 194.23 608.49 584.64 902.37
50 2451261.0 73439.0 1195 NaN NaN NaN 964.0 NaN NaN NaN 964.0 1.0 NaN 42 NaN NaN NaN NaN 58.60 192.76 80.02 54.48 39.46 NaN
51 2452078.0 22372.0 643 386.0 435559.0 2685.0 258.0 386.0 435559.0 2685.0 258.0 2.0 1.0 43 58.0 4257.20 85.14 4342.34 99.74 1530.04 2469.17 1609.22 178.81 1714.92
52 2451335.0 79473.0 1706 442.0 1432457.0 2425.0 840.0 442.0 1432457.0 2425.0 840.0 1.0 1.0 44 13.0 45.63 3.65 49.28 49.66 0.00 39.24 1.53 4.86 53.31
53 2451441.0 11487.0 1021 405.0 1361990.0 4975.0 407.0 405.0 1361990.0 4975.0 407.0 1.0 1.0 45 43.0 4438.89 133.16 4572.05 83.51 466.98 532.66 2187.48 1718.75 683.65
54 2452105.0 59457.0 979 913.0 1423984.0 4102.0 373.0 913.0 1423984.0 4102.0 373.0 2.0 1.0 46 61.0 704.55 49.31 753.86 33.45 3012.79 295.91 302.39 106.25 3095.55
55 2451677.0 33194.0 1975 918.0 1366834.0 2750.0 819.0 918.0 1366834.0 2750.0 819.0 2.0 1.0 48 9.0 216.81 17.34 234.15 19.81 45.63 21.68 35.12 160.01 82.78
56 2452561.0 35610.0 918 81.0 788648.0 5815.0 582.0 81.0 788648.0 5815.0 582.0 2.0 1.0 49 79.0 10628.66 744.00 11372.66 88.50 2361.31 8502.92 1658.07 467.67 3193.81
57 2452060.0 60418.0 1241 908.0 793212.0 2516.0 620.0 908.0 793212.0 2516.0 620.0 1.0 1.0 51 9.0 355.32 10.65 365.97 99.51 193.77 309.12 6.00 40.20 303.93
58 2452077.0 13035.0 923 668.0 1078154.0 4240.0 373.0 668.0 1078154.0 4240.0 373.0 1.0 1.0 51 58.0 6574.88 460.24 7035.12 57.17 3221.32 1380.72 4051.44 1142.72 3738.73
59 NaN 71745.0 1470 NaN NaN 2111.0 323.0 NaN NaN 2111.0 NaN 1.0 1.0 52 NaN 765.16 NaN 834.02 32.04 229.40 NaN 215.16 351.06 330.30
60 2451900.0 32899.0 1283 971.0 1300813.0 208.0 250.0 971.0 1300813.0 208.0 250.0 1.0 1.0 53 2.0 97.88 1.95 99.83 22.48 13.64 80.26 5.46 12.16 38.07
61 2451958.0 26993.0 782 631.0 1375925.0 1419.0 466.0 631.0 1375925.0 1419.0 466.0 1.0 1.0 53 13.0 1368.77 82.12 1450.89 88.01 727.09 191.62 235.43 941.72 897.22
62 NaN NaN 79 NaN NaN 6738.0 460.0 NaN 1500216.0 NaN NaN 1.0 1.0 55 7.0 70.70 4.94 NaN 38.47 NaN 42.42 4.24 NaN 71.20
63 NaN NaN 874 NaN NaN NaN NaN 199.0 NaN NaN 7.0 1.0 1.0 56 NaN 1717.20 154.54 1871.74 3.62 356.40 NaN NaN NaN NaN
64 2451384.0 77186.0 50 380.0 1708805.0 5983.0 608.0 380.0 1708805.0 5983.0 608.0 2.0 1.0 57 19.0 2002.03 120.12 2122.15 71.12 302.10 1301.31 119.12 581.60 493.34
65 2451443.0 45709.0 1165 800.0 1777124.0 1248.0 619.0 800.0 1777124.0 1248.0 619.0 1.0 1.0 58 9.0 740.34 22.21 762.55 37.92 174.78 222.10 67.37 450.87 234.91
66 2451759.0 67735.0 1687 138.0 821188.0 5885.0 135.0 138.0 821188.0 5885.0 135.0 2.0 1.0 59 26.0 789.36 71.04 860.40 6.20 134.94 149.97 421.99 217.40 212.18
67 2451560.0 59013.0 1712 883.0 539803.0 6923.0 843.0 883.0 539803.0 6923.0 843.0 1.0 1.0 63 31.0 191.58 3.83 195.41 1.63 739.35 42.14 127.02 22.42 744.81
68 NaN NaN 158 670.0 103015.0 NaN NaN NaN 103015.0 2160.0 705.0 NaN NaN 64 36.0 1086.12 32.58 1118.70 4.75 NaN NaN NaN 543.61 NaN
69 2451547.0 32382.0 1507 101.0 99551.0 3001.0 251.0 101.0 99551.0 3001.0 251.0 2.0 1.0 66 7.0 368.97 0.00 368.97 48.34 12.81 99.62 37.70 231.65 61.15
70 2452027.0 26463.0 85 973.0 277684.0 1748.0 259.0 973.0 277684.0 1748.0 259.0 1.0 1.0 69 57.0 5985.57 359.13 6344.70 89.65 1056.21 2394.22 2944.90 646.45 1504.99
71 2452341.0 68091.0 1985 911.0 1511560.0 5409.0 658.0 911.0 1511560.0 5409.0 658.0 2.0 1.0 72 20.0 3750.00 187.50 3937.50 62.87 742.20 187.50 1959.37 1603.13 992.57
72 2452196.0 78918.0 1673 224.0 1559926.0 6228.0 130.0 224.0 1559926.0 6228.0 130.0 1.0 1.0 72 2.0 72.30 4.33 76.63 96.96 24.44 65.79 5.46 1.05 125.73
73 2452538.0 5244.0 821 195.0 94659.0 276.0 493.0 195.0 94659.0 276.0 493.0 1.0 1.0 73 4.0 208.84 0.00 208.84 90.81 202.68 154.54 19.00 35.30 293.49
74 2452648.0 69373.0 91 326.0 571505.0 5084.0 663.0 326.0 571505.0 5084.0 663.0 1.0 1.0 75 35.0 2668.05 80.04 2748.09 62.33 361.20 1414.06 463.97 790.02 503.57
75 2452670.0 41829.0 1035 961.0 4573.0 4185.0 397.0 961.0 4573.0 4185.0 397.0 2.0 1.0 75 23.0 1807.80 0.00 1807.80 14.00 766.36 379.63 1142.53 285.64 780.36
76 2451916.0 34658.0 1189 828.0 990174.0 2720.0 666.0 828.0 990174.0 2720.0 666.0 2.0 1.0 76 72.0 2581.92 77.45 2659.37 20.09 5286.96 568.02 2013.90 0.00 5384.50
77 2451616.0 51966.0 328 626.0 1703073.0 4720.0 567.0 626.0 1703073.0 4720.0 567.0 2.0 1.0 77 8.0 25.28 0.75 26.03 61.93 0.00 11.12 12.17 1.99 62.68
78 NaN NaN 895 99.0 NaN 6659.0 NaN 99.0 1634079.0 NaN NaN NaN NaN 77 NaN 1934.50 NaN NaN 45.51 NaN NaN NaN NaN 838.39
79 2451617.0 28361.0 244 939.0 1603349.0 4959.0 369.0 939.0 1603349.0 4959.0 369.0 2.0 1.0 79 21.0 919.59 18.39 937.98 21.38 509.04 478.18 8.82 432.59 548.81
80 2451871.0 54886.0 1723 537.0 1097050.0 610.0 523.0 537.0 1097050.0 610.0 523.0 1.0 1.0 79 33.0 606.87 36.41 643.28 32.97 290.73 54.61 276.13 276.13 360.11
81 2451726.0 26757.0 524 212.0 1794817.0 4822.0 674.0 212.0 1794817.0 4822.0 674.0 2.0 1.0 81 17.0 371.28 29.70 400.98 28.14 85.68 226.48 50.68 94.12 143.52
82 2452486.0 46513.0 573 862.0 897323.0 1384.0 245.0 862.0 897323.0 1384.0 245.0 1.0 1.0 83 20.0 104.00 0.00 104.00 21.18 333.00 86.32 9.19 8.49 354.18
83 2452557.0 65926.0 681 87.0 1208787.0 7087.0 34.0 87.0 1208787.0 7087.0 34.0 2.0 1.0 83 29.0 300.15 0.00 300.15 44.01 2552.00 168.08 109.61 22.46 2596.01
84 2451280.0 25318.0 1318 396.0 1857247.0 3251.0 702.0 396.0 1857247.0 3251.0 702.0 2.0 1.0 84 2.0 96.36 3.85 100.21 85.73 33.88 30.83 43.90 21.63 123.46
85 2451393.0 62509.0 1954 660.0 1078409.0 3158.0 707.0 660.0 1078409.0 3158.0 707.0 2.0 1.0 84 18.0 265.50 2.65 268.15 49.10 165.24 45.13 103.57 116.80 216.99
86 2452735.0 NaN 1633 6.0 533478.0 2797.0 NaN 6.0 533478.0 NaN 469.0 NaN NaN 85 NaN 20.20 NaN NaN NaN 15.50 19.59 NaN NaN 102.28
87 2452663.0 51913.0 276 493.0 1729053.0 5813.0 973.0 493.0 1729053.0 5813.0 973.0 2.0 1.0 85 34.0 567.80 5.67 573.47 72.34 1817.30 22.71 196.23 348.86 1895.31
88 2451723.0 72393.0 448 324.0 159786.0 601.0 216.0 324.0 159786.0 601.0 216.0 1.0 1.0 86 16.0 56.48 0.00 56.48 78.57 53.60 46.31 2.64 7.53 132.17
89 2451599.0 60380.0 926 909.0 361910.0 864.0 65.0 909.0 361910.0 864.0 65.0 2.0 1.0 86 22.0 3938.88 157.55 4096.43 78.70 1140.04 590.83 1941.86 1406.19 1376.29
90 2452181.0 69772.0 1235 789.0 1625335.0 281.0 27.0 789.0 1625335.0 281.0 27.0 1.0 1.0 87 11.0 1976.59 39.53 2016.12 74.21 951.61 316.25 1278.46 381.88 1065.35
91 NaN 67250.0 187 NaN 254698.0 NaN 424.0 NaN 254698.0 NaN NaN NaN 1.0 91 NaN NaN 89.14 1079.59 NaN NaN NaN NaN 2.98 NaN
92 2452382.0 45230.0 1065 884.0 1353432.0 7180.0 328.0 884.0 1353432.0 7180.0 328.0 2.0 1.0 92 15.0 54.30 1.62 55.92 48.55 37.95 53.21 1.07 0.02 88.12
93 2452555.0 53480.0 1305 174.0 1417259.0 6897.0 535.0 174.0 1417259.0 6897.0 535.0 1.0 1.0 92 18.0 1303.56 117.32 1420.88 71.91 477.90 404.10 638.61 260.85 667.13
94 2452790.0 34442.0 1896 372.0 463802.0 4985.0 815.0 372.0 463802.0 4985.0 815.0 2.0 1.0 93 21.0 1923.81 115.42 2039.23 57.75 72.03 1365.90 530.01 27.90 245.20
95 2452775.0 70628.0 661 176.0 1018443.0 4910.0 377.0 176.0 1018443.0 4910.0 377.0 2.0 1.0 93 88.0 11567.60 115.67 11683.27 84.79 5192.88 4280.01 1967.64 5319.95 5393.34
96 2452056.0 77444.0 569 134.0 701863.0 3839.0 768.0 134.0 701863.0 3839.0 768.0 2.0 1.0 95 11.0 1553.64 124.29 1677.93 50.63 493.46 450.55 573.60 529.49 668.38
97 NaN NaN 715 NaN 253586.0 7137.0 935.0 788.0 253586.0 NaN 935.0 NaN 1.0 96 NaN NaN NaN NaN NaN NaN 175.30 10.67 NaN NaN
98 2452085.0 44364.0 791 385.0 1635385.0 3585.0 385.0 385.0 1635385.0 3585.0 385.0 2.0 1.0 98 44.0 96.80 6.77 103.57 87.44 549.56 90.02 2.23 4.55 643.77

stg_web_returns.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"web_returns_renamed" AS (
    -- Rename: Renaming columns
    -- WR_RETURNED_DATE_SK -> return_date_key
    -- WR_RETURNED_TIME_SK -> return_time_key
    -- WR_ITEM_SK -> item_key
    -- WR_REFUNDED_CUSTOMER_SK -> refunded_customer_key
    -- WR_REFUNDED_CDEMO_SK -> refunded_customer_demo_key
    -- WR_REFUNDED_HDEMO_SK -> refunded_household_demo_key
    -- WR_REFUNDED_ADDR_SK -> refunded_address_key
    -- WR_RETURNING_CUSTOMER_SK -> returning_customer_key
    -- WR_RETURNING_CDEMO_SK -> returning_customer_demo_key
    -- WR_RETURNING_HDEMO_SK -> returning_household_demo_key
    -- WR_RETURNING_ADDR_SK -> returning_address_key
    -- WR_WEB_PAGE_SK -> web_page_key
    -- WR_REASON_SK -> reason_key
    -- WR_ORDER_NUMBER -> order_number
    -- WR_RETURN_QUANTITY -> return_quantity
    -- WR_RETURN_AMT -> return_amount
    -- WR_RETURN_TAX -> return_tax
    -- WR_RETURN_AMT_INC_TAX -> return_amount_with_tax
    -- WR_FEE -> return_fee
    -- WR_RETURN_SHIP_COST -> return_shipping_cost
    -- WR_REFUNDED_CASH -> refunded_cash
    -- WR_REVERSED_CHARGE -> reversed_charge
    -- WR_ACCOUNT_CREDIT -> account_credit
    -- WR_NET_LOSS -> net_loss
    SELECT 
        "WR_RETURNED_DATE_SK" AS "return_date_key",
        "WR_RETURNED_TIME_SK" AS "return_time_key",
        "WR_ITEM_SK" AS "item_key",
        "WR_REFUNDED_CUSTOMER_SK" AS "refunded_customer_key",
        "WR_REFUNDED_CDEMO_SK" AS "refunded_customer_demo_key",
        "WR_REFUNDED_HDEMO_SK" AS "refunded_household_demo_key",
        "WR_REFUNDED_ADDR_SK" AS "refunded_address_key",
        "WR_RETURNING_CUSTOMER_SK" AS "returning_customer_key",
        "WR_RETURNING_CDEMO_SK" AS "returning_customer_demo_key",
        "WR_RETURNING_HDEMO_SK" AS "returning_household_demo_key",
        "WR_RETURNING_ADDR_SK" AS "returning_address_key",
        "WR_WEB_PAGE_SK" AS "web_page_key",
        "WR_REASON_SK" AS "reason_key",
        "WR_ORDER_NUMBER" AS "order_number",
        "WR_RETURN_QUANTITY" AS "return_quantity",
        "WR_RETURN_AMT" AS "return_amount",
        "WR_RETURN_TAX" AS "return_tax",
        "WR_RETURN_AMT_INC_TAX" AS "return_amount_with_tax",
        "WR_FEE" AS "return_fee",
        "WR_RETURN_SHIP_COST" AS "return_shipping_cost",
        "WR_REFUNDED_CASH" AS "refunded_cash",
        "WR_REVERSED_CHARGE" AS "reversed_charge",
        "WR_ACCOUNT_CREDIT" AS "account_credit",
        "WR_NET_LOSS" AS "net_loss"
    FROM "web_returns"
)

-- COCOON BLOCK END
SELECT * FROM "web_returns_renamed"

stg_web_returns.yml (Document the table)

version: 2
models:
- name: stg_web_returns
  description: The table is about web returns. It includes details like return date,
    item, customer, quantities, amounts, and reasons. Each row represents a single
    return transaction. Financial information covers refunded amounts, taxes, fees,
    and net losses. Customer details for both the refunding and returning customers
    are included, along with web page and reason codes.
  columns:
  - name: return_date_key
    description: Surrogate key for return date
    tests:
    - not_null
  - name: return_time_key
    description: Surrogate key for return time
    tests:
    - not_null
  - name: item_key
    description: Surrogate key for the returned item
    tests:
    - not_null
  - name: refunded_customer_key
    description: Surrogate key for refunded customer
    tests:
    - not_null
  - name: refunded_customer_demo_key
    description: Surrogate key for refunded customer demographics
    tests:
    - not_null
  - name: refunded_household_demo_key
    description: Surrogate key for refunded household demographics
    tests:
    - not_null
  - name: refunded_address_key
    description: Surrogate key for refunded address
    tests:
    - not_null
  - name: returning_customer_key
    description: Surrogate key for returning customer
    tests:
    - not_null
  - name: returning_customer_demo_key
    description: Surrogate key for returning customer demographics
    tests:
    - not_null
  - name: returning_household_demo_key
    description: Surrogate key for returning household demographics
    tests:
    - not_null
  - name: returning_address_key
    description: Surrogate key for returning address
    tests:
    - not_null
  - name: web_page_key
    description: Surrogate key for web page
    cocoon_meta:
      missing_acceptable: Not applicable for non-web orders or returns.
  - name: reason_key
    description: Surrogate key for the return reason
    tests:
    - not_null
  - name: order_number
    description: Original order number for the return
    tests:
    - not_null
  - name: return_quantity
    description: Quantity of items returned
    tests:
    - not_null
  - name: return_amount
    description: Return amount before tax
    tests:
    - not_null
  - name: return_tax
    description: Tax amount for the return
    tests:
    - not_null
  - name: return_amount_with_tax
    description: Return amount including tax
    tests:
    - not_null
  - name: return_fee
    description: Fee associated with the return
    tests:
    - not_null
  - name: return_shipping_cost
    description: Shipping cost for the return
    tests:
    - not_null
  - name: refunded_cash
    description: Cash amount refunded
    tests:
    - not_null
  - name: reversed_charge
    description: Reversed charge amount for the return
    tests:
    - not_null
  - name: account_credit
    description: Account credit amount for the return
    tests:
    - not_null
  - name: net_loss
    description: Net loss amount for the return
    tests:
    - not_null

stg_warehouse (first 100 rows)

warehouse_surrogate_key W_WAREHOUSE_ID W_WAREHOUSE_NAME warehouse_size_sqft warehouse_street_type warehouse_suite_number warehouse_city warehouse_county warehouse_state warehouse_country warehouse_timezone_offset warehouse_street_name warehouse_street_number warehouse_zip_code
0 1 AAAAAAAABAAAAAAA Conventional children 977787 Parkway Suite 470 Midway Williamson County TN United States -5 6th 651 31904

stg_warehouse.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"warehouse_renamed" AS (
    -- Rename: Renaming columns
    -- W_WAREHOUSE_SK -> warehouse_surrogate_key
    -- W_WAREHOUSE_SQ_FT -> warehouse_size_sqft
    -- W_STREET_NUMBER -> warehouse_street_number
    -- W_STREET_NAME -> warehouse_street_name
    -- W_STREET_TYPE -> warehouse_street_type
    -- W_SUITE_NUMBER -> warehouse_suite_number
    -- W_CITY -> warehouse_city
    -- W_COUNTY -> warehouse_county
    -- W_STATE -> warehouse_state
    -- W_ZIP -> warehouse_zip_code
    -- W_COUNTRY -> warehouse_country
    -- W_GMT_OFFSET -> warehouse_timezone_offset
    SELECT 
        "W_WAREHOUSE_SK" AS "warehouse_surrogate_key",
        "W_WAREHOUSE_ID",
        "W_WAREHOUSE_NAME",
        "W_WAREHOUSE_SQ_FT" AS "warehouse_size_sqft",
        "W_STREET_NUMBER" AS "warehouse_street_number",
        "W_STREET_NAME" AS "warehouse_street_name",
        "W_STREET_TYPE" AS "warehouse_street_type",
        "W_SUITE_NUMBER" AS "warehouse_suite_number",
        "W_CITY" AS "warehouse_city",
        "W_COUNTY" AS "warehouse_county",
        "W_STATE" AS "warehouse_state",
        "W_ZIP" AS "warehouse_zip_code",
        "W_COUNTRY" AS "warehouse_country",
        "W_GMT_OFFSET" AS "warehouse_timezone_offset"
    FROM "warehouse"
),

"warehouse_renamed_trimmed" AS (
    -- Trim Leading and Trailing Spaces
    SELECT
        "warehouse_surrogate_key",
        "W_WAREHOUSE_ID",
        "W_WAREHOUSE_NAME",
        "warehouse_size_sqft",
        "warehouse_street_number",
        "warehouse_street_type",
        "warehouse_suite_number",
        "warehouse_city",
        "warehouse_county",
        "warehouse_state",
        "warehouse_zip_code",
        "warehouse_country",
        "warehouse_timezone_offset",
        TRIM("warehouse_street_name") AS "warehouse_street_name"
    FROM "warehouse_renamed"
),

"warehouse_renamed_trimmed_cleaned" AS (
    -- Clean unusual string values: 
    -- W_WAREHOUSE_NAME: The problem is that the value 'Conventional childr' appears to be truncated. It's likely that this is meant to be 'Conventional children' or possibly 'Conventional child'. Given that this is a warehouse name, it's more likely to be 'Conventional children' as it probably refers to a warehouse for conventional children's products. 
    SELECT
        "warehouse_surrogate_key",
        "W_WAREHOUSE_ID",
        CASE
            WHEN "W_WAREHOUSE_NAME" = 'Conventional childr' THEN 'Conventional children'
            ELSE "W_WAREHOUSE_NAME"
        END AS "W_WAREHOUSE_NAME",
        "warehouse_size_sqft",
        "warehouse_street_number",
        "warehouse_street_type",
        "warehouse_suite_number",
        "warehouse_city",
        "warehouse_county",
        "warehouse_state",
        "warehouse_zip_code",
        "warehouse_country",
        "warehouse_timezone_offset",
        "warehouse_street_name"
    FROM "warehouse_renamed_trimmed"
),

"warehouse_renamed_trimmed_cleaned_casted" AS (
    -- Column Type Casting: 
    -- warehouse_street_number: from INT to VARCHAR
    -- warehouse_zip_code: from INT to VARCHAR
    SELECT
        "warehouse_surrogate_key",
        "W_WAREHOUSE_ID",
        "W_WAREHOUSE_NAME",
        "warehouse_size_sqft",
        "warehouse_street_type",
        "warehouse_suite_number",
        "warehouse_city",
        "warehouse_county",
        "warehouse_state",
        "warehouse_country",
        "warehouse_timezone_offset",
        "warehouse_street_name",
        CAST("warehouse_street_number" AS VARCHAR) AS "warehouse_street_number",
        CAST("warehouse_zip_code" AS VARCHAR) AS "warehouse_zip_code"
    FROM "warehouse_renamed_trimmed_cleaned"
)

-- COCOON BLOCK END
SELECT * FROM "warehouse_renamed_trimmed_cleaned_casted"

stg_warehouse.yml (Document the table)

version: 2
models:
- name: stg_warehouse
  description: The table is about warehouses. It contains details of each warehouse
    such as its unique identifier, name, size, address (including street, city, state,
    country), and time zone offset. The table likely serves as a central repository
    for warehouse information in a larger database system.
  columns:
  - name: warehouse_surrogate_key
    description: Surrogate key for the warehouse
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key, which is typically an artificially
        created unique identifier for each row in a database table. For this table,
        each row represents a unique warehouse. A surrogate key is designed to be
        unique across rows.
  - name: W_WAREHOUSE_ID
    description: Unique identifier for the warehouse
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is described as a unique identifier for the warehouse.
        For this table, each row represents a unique warehouse, and a unique identifier
        should be unique across all warehouses.
  - name: W_WAREHOUSE_NAME
    description: Name of the warehouse
    tests:
    - not_null
  - name: warehouse_size_sqft
    description: Size of the warehouse in square feet
    tests:
    - not_null
  - name: warehouse_street_type
    description: Type of street (e.g., Avenue, Road, etc.)
    tests:
    - not_null
    - accepted_values:
        values:
        - Avenue
        - Boulevard
        - Circle
        - Court
        - Crescent
        - Drive
        - Lane
        - Parkway
        - Place
        - Plaza
        - Road
        - Square
        - Street
        - Terrace
        - Trail
        - Way
        - Alley
        - Mews
        - Passage
        - Row
  - name: warehouse_suite_number
    description: Suite number of the warehouse
    tests:
    - not_null
  - name: warehouse_city
    description: City where the warehouse is located
    tests:
    - not_null
  - name: warehouse_county
    description: County where the warehouse is located
    tests:
    - not_null
  - name: warehouse_state
    description: State or province where the warehouse is located
    tests:
    - not_null
  - name: warehouse_country
    description: Country where the warehouse is located
    tests:
    - not_null
  - name: warehouse_timezone_offset
    description: Time zone offset from GMT
    tests:
    - not_null
  - name: warehouse_street_name
    description: Name of the street where warehouse is located
    tests:
    - not_null
  - name: warehouse_street_number
    description: Street number of the warehouse
    tests:
    - not_null
  - name: warehouse_zip_code
    description: Zip or postal code of the warehouse
    tests:
    - not_null

stg_household_demographics (first 100 rows)

household_demographic_id income_band_id household_buying_potential dependent_count vehicle_count
0 1 2 0-500 0 0
1 2 3 0-500 0 0
2 3 4 0-500 0 0
3 4 5 0-500 0 0
4 5 6 0-500 0 0
5 6 7 0-500 0 0
6 7 8 0-500 0 0
7 8 9 0-500 0 0
8 9 10 0-500 0 0
9 10 11 0-500 0 0
10 11 12 0-500 0 0
11 12 13 0-500 0 0
12 13 14 0-500 0 0
13 14 15 0-500 0 0
14 15 16 0-500 0 0
15 16 17 0-500 0 0
16 17 18 0-500 0 0
17 18 19 0-500 0 0
18 19 20 0-500 0 0
19 20 1 501-1000 0 0
20 21 2 501-1000 0 0
21 22 3 501-1000 0 0
22 23 4 501-1000 0 0
23 24 5 501-1000 0 0
24 25 6 501-1000 0 0
25 26 7 501-1000 0 0
26 27 8 501-1000 0 0
27 28 9 501-1000 0 0
28 29 10 501-1000 0 0
29 30 11 501-1000 0 0
30 31 12 501-1000 0 0
31 32 13 501-1000 0 0
32 33 14 501-1000 0 0
33 34 15 501-1000 0 0
34 35 16 501-1000 0 0
35 36 17 501-1000 0 0
36 37 18 501-1000 0 0
37 38 19 501-1000 0 0
38 39 20 501-1000 0 0
39 40 1 1001-5000 0 0
40 41 2 1001-5000 0 0
41 42 3 1001-5000 0 0
42 43 4 1001-5000 0 0
43 44 5 1001-5000 0 0
44 45 6 1001-5000 0 0
45 46 7 1001-5000 0 0
46 47 8 1001-5000 0 0
47 48 9 1001-5000 0 0
48 49 10 1001-5000 0 0
49 50 11 1001-5000 0 0
50 51 12 1001-5000 0 0
51 52 13 1001-5000 0 0
52 53 14 1001-5000 0 0
53 54 15 1001-5000 0 0
54 55 16 1001-5000 0 0
55 56 17 1001-5000 0 0
56 57 18 1001-5000 0 0
57 58 19 1001-5000 0 0
58 59 20 1001-5000 0 0
59 60 1 5001-10000 0 0
60 61 2 5001-10000 0 0
61 62 3 5001-10000 0 0
62 63 4 5001-10000 0 0
63 64 5 5001-10000 0 0
64 65 6 5001-10000 0 0
65 66 7 5001-10000 0 0
66 67 8 5001-10000 0 0
67 68 9 5001-10000 0 0
68 69 10 5001-10000 0 0
69 70 11 5001-10000 0 0
70 71 12 5001-10000 0 0
71 72 13 5001-10000 0 0
72 73 14 5001-10000 0 0
73 74 15 5001-10000 0 0
74 75 16 5001-10000 0 0
75 76 17 5001-10000 0 0
76 77 18 5001-10000 0 0
77 78 19 5001-10000 0 0
78 79 20 5001-10000 0 0
79 80 1 >10000 0 0
80 81 2 >10000 0 0
81 82 3 >10000 0 0
82 83 4 >10000 0 0
83 84 5 >10000 0 0
84 85 6 >10000 0 0
85 86 7 >10000 0 0
86 87 8 >10000 0 0
87 88 9 >10000 0 0
88 89 10 >10000 0 0
89 90 11 >10000 0 0
90 91 12 >10000 0 0
91 92 13 >10000 0 0
92 93 14 >10000 0 0
93 94 15 >10000 0 0
94 95 16 >10000 0 0
95 96 17 >10000 0 0
96 97 18 >10000 0 0
97 98 19 >10000 0 0
98 99 20 >10000 0 0

stg_household_demographics.sql (clean the table)

-- COCOON BLOCK START: PLEASE DO NOT MODIFY THIS BLOCK FOR SELF-MAINTENANCE
WITH 
"household_demographics_renamed" AS (
    -- Rename: Renaming columns
    -- HD_DEMO_SK -> household_demographic_id
    -- HD_INCOME_BAND_SK -> income_band_id
    -- HD_BUY_POTENTIAL -> household_buying_potential
    -- HD_DEP_COUNT -> dependent_count
    -- HD_VEHICLE_COUNT -> vehicle_count
    SELECT 
        "HD_DEMO_SK" AS "household_demographic_id",
        "HD_INCOME_BAND_SK" AS "income_band_id",
        "HD_BUY_POTENTIAL" AS "household_buying_potential",
        "HD_DEP_COUNT" AS "dependent_count",
        "HD_VEHICLE_COUNT" AS "vehicle_count"
    FROM "household_demographics"
)

-- COCOON BLOCK END
SELECT * FROM "household_demographics_renamed"

stg_household_demographics.yml (Document the table)

version: 2
models:
- name: stg_household_demographics
  description: The table is about household demographics. It includes details such
    as income band, buying potential, number of dependents, and vehicle count. Each
    row represents a unique household with a specific demographic profile. The table
    provides insights into the economic status and composition of different households.
  columns:
  - name: household_demographic_id
    description: Unique identifier for each household demographic
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a unique identifier for each household demographic.
        For this table, each row represents a unique household with a specific demographic
        profile. household_demographic_id is unique across rows, as it's designed
        to be the primary identifier for each record.
  - name: income_band_id
    description: Income band identifier for the household
    tests:
    - not_null
  - name: household_buying_potential
    description: Estimated buying potential range of the household
    tests:
    - not_null
    - accepted_values:
        values:
        - 1001-5000
        - 5001-10000
        - 501-1000
        - '>10000'
        - 0-500
  - name: dependent_count
    description: Number of dependents in the household
    tests:
    - not_null
  - name: vehicle_count
    description: Number of vehicles owned by the household
    tests:
    - not_null
Some tables log change events, which may be redundant to query. Instead, we take a snapshot of the latest.

snapshot_store (first 100 rows)

store_id store_surrogate_key store_floor_space company_id store_country store_state store_street_type store_hours store_county market_manager store_gmt_offset store_city store_tax_percentage employee_count store_suite_number store_street_name store_manager market_id division_id record_start_date store_close_date store_street_number store_zip_code
0 AAAAAAAACAAAAAAA 2 5285950 1 United States TN Dr. 8AM-4PM Williamson County David Lamontagne -5 Midway 0.03 236 Suite 410 Sycamore Scott Smith 8 1 1997-03-13 NaN 255 31904
1 AAAAAAAABAAAAAAA 1 5250760 1 United States TN Way 8AM-4PM Williamson County Charles Bartley -5 Midway 0.03 245 Suite 250 Spring William Ward 2 1 1997-03-13 2451189.0 767 31904

snapshot_store.sql (clean the table)

-- Slowly Changing Dimension: Dimension keys are "store_id"
-- Effective date columns are "record_end_date"
-- We will create Type 1 SCD (latest snapshot)
SELECT 
    "store_id",
    "store_surrogate_key",
    "store_floor_space",
    "company_id",
    "store_country",
    "store_state",
    "store_street_type",
    "store_hours",
    "store_county",
    "market_manager",
    "store_gmt_offset",
    "store_city",
    "store_tax_percentage",
    "employee_count",
    "store_suite_number",
    "store_street_name",
    "store_manager",
    "market_id",
    "division_id",
    "record_start_date",
    "store_close_date",
    "store_street_number",
    "store_zip_code"
FROM (
     SELECT 
            "store_id",
            "store_surrogate_key",
            "store_floor_space",
            "company_id",
            "store_country",
            "store_state",
            "store_street_type",
            "store_hours",
            "store_county",
            "market_manager",
            "store_gmt_offset",
            "store_city",
            "store_tax_percentage",
            "employee_count",
            "store_suite_number",
            "store_street_name",
            "store_manager",
            "market_id",
            "division_id",
            "record_start_date",
            "store_close_date",
            "store_street_number",
            "store_zip_code",
            ROW_NUMBER() OVER (
                PARTITION BY "store_id" 
                ORDER BY "record_end_date" 
            DESC) AS "cocoon_rn"
    FROM "stg_store"
) ranked
WHERE "cocoon_rn" = 1

snapshot_store.yml (Document the table)

version: 2
models:
- name: snapshot_store
  description: The table is about current retail store information. It tracks the
    most recent version of each store's details, including ID, location, size, employees,
    operating hours, and management. It contains financial data like tax percentage
    and geographical information such as GMT offset. The table includes market, division,
    and company identifiers for each store. It omits historical versions and date
    tracking columns.
  columns:
  - name: store_id
    description: Unique identifier for the store
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Unique dimension key, derived from the slowly changing dimension
  - name: store_surrogate_key
    description: Surrogate key for the store
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This is an artificial key created to uniquely identify each store.
        In a well-designed database, this should be unique for each store entry.
  - name: store_floor_space
    description: Floor space of the store in square units
    tests:
    - not_null
  - name: company_id
    description: Unique identifier for the company
    tests:
    - not_null
  - name: store_country
    description: Country where the store is located
    tests:
    - not_null
  - name: store_state
    description: State where the store is located
    tests:
    - not_null
    - accepted_values:
        values:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
  - name: store_street_type
    description: Type of street (e.g., Ave, St, Blvd)
    tests:
    - not_null
    - accepted_values:
        values:
        - St
        - Ave
        - Blvd
        - Dr
        - Ln
        - Rd
        - Way
        - Pl
        - Ct
        - Ter
        - Cir
        - Pkwy
        - Hwy
        - Expy
        - Fwy
        - Aly
        - Bnd
        - Crst
        - Xing
        - Sq
        - Trl
        - Loop
        - Dr.
  - name: store_hours
    description: Operating hours of the store
    tests:
    - not_null
  - name: store_county
    description: County where the store is located
    tests:
    - not_null
  - name: market_manager
    description: Name of the market manager
    tests:
    - not_null
  - name: store_gmt_offset
    description: GMT offset of the store's timezone
    tests:
    - not_null
  - name: store_city
    description: City where the store is located
    tests:
    - not_null
  - name: store_tax_percentage
    description: Tax percentage applicable to the store
    tests:
    - not_null
  - name: employee_count
    description: Number of employees in the store
    tests:
    - not_null
  - name: store_suite_number
    description: Suite number of the store
    tests:
    - not_null
  - name: store_street_name
    description: Name of the street where store is located
    tests:
    - not_null
  - name: store_manager
    description: Name of the store manager
    tests:
    - not_null
  - name: market_id
    description: Unique identifier for the market
    tests:
    - not_null
  - name: division_id
    description: Unique identifier for the division
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record
    tests:
    - not_null
  - name: store_close_date
    description: Date when the store was closed
    cocoon_meta:
      missing_acceptable: Not applicable for stores still in operation.
  - name: store_street_number
    description: Street number of the store
    tests:
    - not_null
  - name: store_zip_code
    description: ZIP code of the store location
    tests:
    - not_null
cocoon_meta:
  scd_base_table: stg_store

snapshot_item (first 100 rows)

UNIT_OF_MEASURE ITEM_DESCRIPTION MANUFACTURER_ID CONTAINER_TYPE SUBCATEGORY CATEGORY_NAME CATEGORY_ID MANAGER_ID SIZE_ ITEM_SURROGATE_KEY CURRENT_PRICE FORMULATION_CODE COLOR ITEM_ID WHOLESALE_COST SUBCATEGORY_ID BRAND_NAME PRODUCT_NAME BRAND_ID RECORD_START_DATE
0 Cup Applicable versions feel so silly peasants. Lessons make relatively for example medical leaves. Details might want criminal, id 47 Unknown swimwear Women 1 18 medium 55 0.99 7975726dodger7126990 ghost AAAAAAAAHDAAAAAA 0.79 4 edu packamalg #2 anti 1004002 1997-10-27
1 Carton F 630 Unknown toddlers Children 3 25 extralarge 8 2.76 35123wheat3256343398 turquoise AAAAAAAAIAAAAAAA 0.85 3 exportiexporti #1 eing 3003001 1997-10-27
2 Case None 124 Unknown Rock Music 5 59 None 44 5.20 salmon36671081354930 chocolate AAAAAAAAMCAAAAAA 1.71 1 amalgscholar #1 esese 5001001 1997-10-27
3 Dram Teachers carry by the children; old democrats enco 460 Unknown hockey Sports 8 6 None 14 1.85 1144670162goldenrod2 red AAAAAAAAOAAAAAAA 0.59 7 brandnameless #5 eseought 8007005 1997-10-27
4 Ounce None 385 Unknown televisions Electronics 10 2 None 79 2.87 sandy027498424299031 papaya AAAAAAAAPEAAAAAA 1.37 9 maxiunivamalg #12 station 10009012 1997-10-27
5 Case Very private features may not like newspapers. Intently right groups try very enquiries; too good minutes want less limited employers. Books ought to provide accounta 865 Unknown memory Electronics 10 14 None 53 8.26 moccasin133060463675 peru AAAAAAAAEDAAAAAA 2.47 10 univamalgamalg #3 prianti 3002001 1999-10-28
6 Teaspoon Cuts may hold already; daughters can like exclusively pregnant, fresh police; actual, 413 Unknown school-uniforms Children 3 57 medium 59 38.82 602196716medium47751 sandy AAAAAAAAKDAAAAAA 15.13 3 edu packexporti #2 stanti 3004002 1999-10-28
7 Tablespoon Institutions ought to provide good agents; large, comfortable 276 Unknown Pop Music 5 95 None 95 2.55 414160524grey3616827 pale AAAAAAAAOFAAAAAA 1.30 3 exportischolar #2 anti 5003002 1999-10-28
8 Teaspoon Victorian miles would reform as well relationships. However tired institutions will send. Dramatically likely rats catch in a teams. Years may spend nearly mass, high 553 Unknown arts Books 9 5 None 35 2.32 khaki119648424197997 green AAAAAAAACCAAAAAA 1.11 1 amalgmaxi #12 anti 10007001 1999-10-28
9 Bunch Cheap problems can draw please over good stars. Either long children would pass similar, different metres; base, large surroundings 933 Unknown sports-apparel Men 2 36 medium 38 16.70 5red3080638918015686 violet AAAAAAAAGCAAAAAA 8.01 4 edu packimporto #1 eingpri 2004001 1997-10-27
10 Bundle Both new conditions ask acute, ashamed pupils. Short, poor fami 363 Unknown scanners Electronics 10 27 None 65 73.24 567702bisque83928674 blue AAAAAAAAAEAAAAAA 54.19 8 namelessunivamalg #15 anti 10008015 1999-10-28
11 Ton None 364 Unknown sports-apparel Men 2 13 large 19 10.61 85seashell1303417084 smoke AAAAAAAADBAAAAAA 4.77 4 edu packimporto #2 stought 2004002 1997-10-27
12 Bundle Major brothers must not mean true annual, aware workers. Regulations will let more mechanisms. English pictures take tha 338 Unknown swimwear Women 1 18 large 25 75.28 90papaya546284022999 purple AAAAAAAAJBAAAAAA 50.43 4 edu packamalg #2 anti 1004002 1997-10-27
13 Bunch Correct, fo 625 Unknown estate Jewelry 6 26 None 11 54.87 snow1543775706017405 yellow AAAAAAAAKAAAAAAA 4.11 14 edu packbrand #4 oughtought 10008011 1999-10-28
14 Pound None 176 Unknown musicals Electronics 10 74 None 91 0.64 2925royal36510681005 lace AAAAAAAALFAAAAAA 0.28 6 corpunivamalg #7 oughtst 10006007 1997-10-27
15 Cup Activities cover 140 Unknown athletic-wear Shoes 4 72 small 50 4.99 1446003050medium4139 papaya AAAAAAAACDAAAAAA 3.54 4 edu packedu pack #1 bar 4004001 1997-10-27
16 Each Children could not influence most flat, careful figures. Local, true stars could commend. As scottish blocks want still old benefits. Skills should not try precisely. Y 622 Unknown pendants Jewelry 6 5 None 83 4.25 146048520linen957568 misty AAAAAAAACFAAAAAA 1.17 4 brandcorp #4 pring 4004001 1999-10-28
17 Pallet Parents like only new demands. Current players let charges. Specific, young towns realise however countr 985 Unknown diamonds Jewelry 6 2 None 86 0.87 642534525118salmon94 powder AAAAAAAAGFAAAAAA 0.74 2 importocorp #7 cally 6002007 1997-10-27
18 Tablespoon None 653 Unknown maternity Women 1 3 small 73 41.16 03293333saddle019730 misty AAAAAAAAJEAAAAAA 27.57 3 exportiamalg #2 priation 1003002 1997-10-27
19 Pallet None 301 Unknown travel Books 9 19 None 43 6.08 19orchid108200357725 firebrick AAAAAAAALCAAAAAA 4.86 10 univunivamalg #8 priese 9010008 1997-10-27
20 Dram Dominant, christian pp. may not raise 117 Unknown accessories Men 2 41 extralarge 17 6.49 452645olive281530722 snow AAAAAAAAABAAAAAA 0.14 1 amalgimporto #2 ation 1002001 1999-10-28
21 None None 443 Unknown school-uniforms Children 3 56 large 49 8.01 027315130steel656106 powder AAAAAAAABDAAAAAA 2.48 4 edu packexporti #2 stese 3004002 1997-10-27
22 Gross None 275 Unknown fiction Books 9 5 None 97 57.09 96goldenrod451188509 rose AAAAAAAABGAAAAAA 32.54 15 scholarunivamalg #2 ation 9015002 1997-10-27
23 Bunch False opportunities would run alone with a views. Early approaches would show inc, european intentions; important, main passages shall know urban, 294 Unknown dresses Women 1 98 small 2 1.12 516steel060826230906 rosy AAAAAAAACAAAAAAA 0.38 1 amalgamalg #1 able 1001001 1997-10-27
24 Gram Legal, foreign days know losses; briefly equivalent arguments will expect today. New, front grounds look hot, other aspects. Actually national husbands show usually of course other stations; huge, k 995 Unknown maternity Women 1 21 extralarge 20 29.35 97245417ivory0043452 tan AAAAAAAAEBAAAAAA 18.78 3 exportiamalg #1 bar 1003001 1997-10-27
25 Bunch Below long minutes make primarily by a months. Secure effects get much upo 260 Unknown karaoke Electronics 10 44 None 23 3.73 569seashell149755477 papaya AAAAAAAAGBAAAAAA 1.41 5 scholarunivamalg #7 priable 10005006 1999-10-28
26 Box Hands cannot show just administrative studies. Powerful orders come fiscal thanks. Major, certain nurses work still relative pa 26 Unknown sports-apparel Men 2 31 small 26 2.77 thistle3370503164308 spring AAAAAAAAKBAAAAAA 1.91 4 edu packimporto #1 cally 2004001 1997-10-27
27 Ounce Around single relations clear heavily over a controls. Arms could leave signs. T 46 Unknown toddlers Children 3 88 small 77 0.90 140503351631sienna87 purple AAAAAAAAMEAAAAAA 2.76 3 exportiexporti #2 ation 3003002 1999-10-28
28 None Employers w 547 Unknown optics Sports 8 12 None 92 4.48 1906778941seashell97 indian AAAAAAAAMFAAAAAA 2.64 9 maxinameless #3 able 8009003 1997-10-27
29 Carton None 209 Unknown swimwear Women 1 35 large 29 1.04 56715743614hot522158 yellow AAAAAAAAMBAAAAAA 0.07 3 edu packamalg #2 stable 3003001 1999-10-28
30 Cup Normal systems would join simply different theories. Full, new clothes may eat instead achievements. D 220 Unknown shirts Men 2 27 small 5 4.00 42214rosy28066558020 pink AAAAAAAAEAAAAAAA 1.76 2 importoimporto #2 anti 2002002 1999-10-28
31 Teaspoon Anxious accounts must catch also years. Revolutionary, large directors used to embrace then mo 214 Unknown newborn Children 3 64 small 7 9.94 6moccasin24027188872 spring AAAAAAAAHAAAAAAA 6.75 1 amalgexporti #2 ation 3001002 1997-10-27
32 Bunch Deep good activities should resist to a substances; that is beautiful businessmen like problems. Late huge meet 310 Unknown toddlers Children 3 85 small 41 4.40 09031176427khaki3414 red AAAAAAAAICAAAAAA 8.63 8 exportiexporti #2 oughtese 7008001 1999-10-28
33 Teaspoon Events might shape successfully; recent flowers should trace alike hard questions. Small areas could not give easy, enthusiastic ends. Obvious 412 Unknown disk-drives Electronics 10 5 None 56 7.44 45885navy00969807009 hot AAAAAAAAIDAAAAAA 3.94 11 amalgamalgamalg #6 cally 10011006 1997-10-27
34 Ounce None 285 Unknown fiction Books 9 57 None 67 1.47 583spring53597495026 black AAAAAAAADEAAAAAA 0.83 15 scholarunivamalg #8 ation 9015008 1997-10-27
35 Ounce General stars believe for example at a 445 Unknown sports Books 9 26 None 71 3.21 purple89249207875245 lavender AAAAAAAAGEAAAAAA 2.53 14 edu packunivamalg #12 oughtation 9014012 1999-10-28
36 Dram Emotional, nuclear farmers can understand also in t 99 Unknown women's watches Shoes 4 5 small 47 3.00 115838salmon36529828 peru AAAAAAAAOCAAAAAA 1.74 1 amalgedu pack #2 ation 6012007 1999-10-28
37 Bundle Clearly due proceedings should compensate particular, main agreements. Heels may not deny later easily different spaces; vast, additional items might export fresh, only sentences. Patients expand 489 Unknown accessories Men 2 28 small 37 2.42 8violet4563425031455 rose AAAAAAAAFCAAAAAA 0.87 1 amalgimporto #2 ation 2001002 1997-10-27
38 Ounce Again common customers should make hardly proposals. Close groups can prevent after a cars. Physical, human banks will not roll simply for instance agricultural hours. Northern centre 156 Unknown pants Men 2 66 small 85 39.31 859187711467pale4603 sky AAAAAAAAFFAAAAAA 34.98 3 exportiimporto #2 anti 2003002 1997-10-27
39 Carton Clergy ought 954 Unknown sports-apparel Men 2 17 small 74 3.91 8341981838751coral30 papaya AAAAAAAAKEAAAAAA 1.44 4 edu packimporto #1 eseation 2004001 1997-10-27
40 Dram Different numbers might not visit; rights used to remember. Labour students must put as slowly possible children. Never 431 Unknown curtains-and-drapes Home 7 7 None 32 1.77 royal348530153475607 turquoise AAAAAAAAACAAAAAA 1.00 4 edu packbrand #3 able 7004003 1997-10-27
41 Case None 785 Unknown musicals Electronics 10 22 None 61 0.50 83227powder377577506 gainsboro AAAAAAAANDAAAAAA 0.22 6 corpunivamalg #11 oughtcally 10006011 1997-10-27
42 Teaspoon None 52 Unknown Pop Music 5 6 None 1 27.02 3663peru009490160959 spring AAAAAAAABAAAAAAA 23.23 3 exportischolar #2 ought 5003002 1997-10-27
43 Ton Opportunities clear there. Basic rules ask british locations. More financial visits construct other funds. Unk 302 Unknown outdoor Sports 8 24 None 98 3.16 01882924064yellow241 medium AAAAAAAACGAAAAAA 2.18 8 namelessnameless #9 eingst 8008009 1997-10-27
44 Carton None 76 Unknown sports-apparel Men 2 35 small 68 6.93 16294729rose54248882 navy AAAAAAAAEEAAAAAA 3.11 4 edu packimporto #1 eingcally 2004001 1997-10-27
45 Bundle Particular, armed costs ought to spin certainly. Events get in the costs. Late, parliamentary foods shall not arrest there able men. Other, difficult officers hold high interests. Model shares dre 376 Unknown kids Shoes 4 38 None 80 2.16 26985wheat7381826860 yellow AAAAAAAAAFAAAAAA 1.59 3 exportiedu pack #1 bar 4003001 1997-10-27
46 Bundle None 967 Unknown accessories Men 2 5 large 89 4.79 97346sandy2527135842 coral AAAAAAAAIFAAAAAA 3.44 1 amalgimporto #2 sting 3001001 1999-10-28
47 Bundle Hard, private departments spoil more quickly possible members; clear troops fail only needs. 167 Unknown costumes Jewelry 6 51 None 13 8.76 883208731996blue7862 olive AAAAAAAANAAAAAAA 7.62 12 importobrand #6 priought 6012006 1997-10-27
48 Bunch Either british authorities would receive slightly. Yesterday unique clothes work seldom old sales. Famous, possible programmes take reall 633 Unknown bracelets Jewelry 6 84 None 62 3.49 206thistle2954355697 violet AAAAAAAAODAAAAAA 1.18 4 edu packcorp #7 able 6004007 1997-10-27
49 Each None 167 Unknown fishing Sports 8 98 None 31 8.48 7wheat78839382233684 lawn AAAAAAAAPBAAAAAA 3.30 15 scholarmaxi #2 oughtpri 8015002 1997-10-27

snapshot_item.sql (clean the table)

-- Slowly Changing Dimension: Dimension keys are "ITEM_ID"
-- Effective date columns are "RECORD_END_DATE"
-- We will create Type 1 SCD (latest snapshot)
SELECT 
    "UNIT_OF_MEASURE",
    "ITEM_DESCRIPTION",
    "MANUFACTURER_ID",
    "CONTAINER_TYPE",
    "SUBCATEGORY",
    "CATEGORY_NAME",
    "CATEGORY_ID",
    "MANAGER_ID",
    "SIZE_",
    "ITEM_SURROGATE_KEY",
    "CURRENT_PRICE",
    "FORMULATION_CODE",
    "COLOR",
    "ITEM_ID",
    "WHOLESALE_COST",
    "SUBCATEGORY_ID",
    "BRAND_NAME",
    "PRODUCT_NAME",
    "BRAND_ID",
    "RECORD_START_DATE"
FROM (
     SELECT 
            "UNIT_OF_MEASURE",
            "ITEM_DESCRIPTION",
            "MANUFACTURER_ID",
            "CONTAINER_TYPE",
            "SUBCATEGORY",
            "CATEGORY_NAME",
            "CATEGORY_ID",
            "MANAGER_ID",
            "SIZE_",
            "ITEM_SURROGATE_KEY",
            "CURRENT_PRICE",
            "FORMULATION_CODE",
            "COLOR",
            "ITEM_ID",
            "WHOLESALE_COST",
            "SUBCATEGORY_ID",
            "BRAND_NAME",
            "PRODUCT_NAME",
            "BRAND_ID",
            "RECORD_START_DATE",
            ROW_NUMBER() OVER (
                PARTITION BY "ITEM_ID" 
                ORDER BY "RECORD_END_DATE" 
            DESC) AS "cocoon_rn"
    FROM "stg_item"
) ranked
WHERE "cocoon_rn" = 1

snapshot_item.yml (Document the table)

version: 2
models:
- name: snapshot_item
  description: The table is about current item information for sale. It tracks the
    most recent version of each unique product. The table includes details like item
    ID, price, cost, brand, category, size, color, and product name. It serves as
    an up-to-date product database, likely for a retail or e-commerce system. Each
    row represents the latest information for a distinct item, without historical
    versions or date tracking.
  columns:
  - name: UNIT_OF_MEASURE
    description: Unit of measurement for the item
    tests:
    - not_null
  - name: ITEM_DESCRIPTION
    description: Detailed description of the item
    tests:
    - not_null
  - name: MANUFACTURER_ID
    description: Unique identifier for the manufacturer
    tests:
    - not_null
  - name: CONTAINER_TYPE
    description: Container type for the item
    tests:
    - not_null
    - accepted_values:
        values:
        - Unknown
        - Box
        - Bag
        - Bottle
        - Can
        - Jar
        - Tube
        - Pouch
        - Carton
        - Crate
        - Barrel
        - Drum
        - Sack
        - Tub
        - Tank
        - Pallet
        - Tray
        - Envelope
        - Bin
        - Basket
        - Container (generic)
  - name: SUBCATEGORY
    description: Subcategory or class of the item
    tests:
    - not_null
  - name: CATEGORY_NAME
    description: Main category of the item
    tests:
    - not_null
    - accepted_values:
        values:
        - Children
        - Men
        - Women
        - Jewelry
        - Electronics
        - Books
        - Music
        - Shoes
        - Sports
        - Home
        - Beauty
        - Toys
        - Automotive
        - Garden
        - Pet Supplies
        - Food & Grocery
        - Health
  - name: CATEGORY_ID
    description: Unique identifier for the category
    tests:
    - not_null
  - name: MANAGER_ID
    description: Identifier for the item manager
    tests:
    - not_null
  - name: SIZE_
    description: Size of the item
    tests:
    - not_null
    - accepted_values:
        values:
        - tiny
        - small
        - medium
        - large
        - extralarge
        - huge
        - gigantic
  - name: ITEM_SURROGATE_KEY
    description: Surrogate key for the item
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column appears to be a unique identifier for each item. For
        this table, each row represents a unique item or a version of an item over
        time. ITEM_SURROGATE_KEY is unique across rows in the given sample, and its
        name suggests it's designed to be a unique identifier.
  - name: CURRENT_PRICE
    description: Current selling price of the item
    tests:
    - not_null
  - name: FORMULATION_CODE
    description: Unique product formulation code
    tests:
    - not_null
  - name: COLOR
    description: Color of the item
    tests:
    - not_null
  - name: ITEM_ID
    description: Unique alphanumeric identifier for the item
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Unique dimension key, derived from the slowly changing dimension
  - name: WHOLESALE_COST
    description: Wholesale cost of the item
    tests:
    - not_null
  - name: SUBCATEGORY_ID
    description: Unique identifier for the subcategory
    tests:
    - not_null
  - name: BRAND_NAME
    description: Brand name of the item
    tests:
    - not_null
  - name: PRODUCT_NAME
    description: Name of the product
    tests:
    - not_null
  - name: BRAND_ID
    description: Unique identifier for the brand
    tests:
    - not_null
  - name: RECORD_START_DATE
    description: Start date of the item record
    tests:
    - not_null
cocoon_meta:
  scd_base_table: stg_item

snapshot_call_center (first 100 rows)

call_center_name suite_number street_name street_type size_class open_date_key company_id state manager_name square_footage call_center_surrogate_key operating_hours division_name county market_manager_name company_name employee_count city country market_id division_id tax_percentage call_center_id call_center_zip_code closed_date_key gmt_offset record_start_date street_number
0 Mid Atlantic Suite 70 Center Hill Way medium 2450806 1 TN Felipe Perkins 2268 2 24 hours anti Williamson County Julius Durham ought 6 Midway United States 2 5 0.12 AAAAAAAACAAAAAAA 31904 None -5.0 1998-01-01 984
1 NY Metro Suite 0 Ash Hill Boulevard large 2450952 6 TN Bob Belcher 1138 1 8AM-4PM pri Williamson County Julius Tran cally 2 Midway United States 6 3 0.11 AAAAAAAABAAAAAAA 31904 None -5.0 1998-01-01 730

snapshot_call_center.sql (clean the table)

-- Slowly Changing Dimension: Dimension keys are "call_center_id"
-- Effective date columns are "record_end_date"
-- We will create Type 1 SCD (latest snapshot)
SELECT 
    "call_center_name",
    "suite_number",
    "street_name",
    "street_type",
    "size_class",
    "open_date_key",
    "company_id",
    "state",
    "manager_name",
    "square_footage",
    "call_center_surrogate_key",
    "operating_hours",
    "division_name",
    "county",
    "market_manager_name",
    "company_name",
    "employee_count",
    "city",
    "country",
    "market_id",
    "division_id",
    "tax_percentage",
    "call_center_id",
    "call_center_zip_code",
    "closed_date_key",
    "gmt_offset",
    "record_start_date",
    "street_number"
FROM (
     SELECT 
            "call_center_name",
            "suite_number",
            "street_name",
            "street_type",
            "size_class",
            "open_date_key",
            "company_id",
            "state",
            "manager_name",
            "square_footage",
            "call_center_surrogate_key",
            "operating_hours",
            "division_name",
            "county",
            "market_manager_name",
            "company_name",
            "employee_count",
            "city",
            "country",
            "market_id",
            "division_id",
            "tax_percentage",
            "call_center_id",
            "call_center_zip_code",
            "closed_date_key",
            "gmt_offset",
            "record_start_date",
            "street_number",
            ROW_NUMBER() OVER (
                PARTITION BY "call_center_id" 
                ORDER BY "record_end_date" 
            DESC) AS "cocoon_rn"
    FROM "stg_call_center"
) ranked
WHERE "cocoon_rn" = 1

snapshot_call_center.yml (Document the table)

version: 2
models:
- name: snapshot_call_center
  description: The table contains current information about call centers. It tracks
    the most recent version of each call center's details, including location, size,
    management, operational attributes, and financial aspects. Each row represents
    a unique call center with its latest data. The table excludes historical versions
    and version tracking columns, focusing on the up-to-date snapshot of call center
    information.
  columns:
  - name: call_center_name
    description: Name of the call center
    tests:
    - not_null
    - unique
    - accepted_values:
        values:
        - Mid Atlantic
        - NY Metro
        - New England
        - Southeast
        - Midwest
        - Southwest
        - West Coast
        - Northwest
        - South Central
        - Mountain
        - Hawaii
        - Alaska
    cocoon_meta:
      uniqueness: This column represents the name of the call center. For this table,
        each row is for a distinct call center. The call_center_name is likely to
        be unique across rows as it's common for businesses to have unique names for
        different locations.
  - name: suite_number
    description: Suite number of the call center
    tests:
    - not_null
  - name: street_name
    description: Street name of the call center address
    tests:
    - not_null
  - name: street_type
    description: Street type of the call center address
    tests:
    - not_null
    - accepted_values:
        values:
        - Street
        - Avenue
        - Boulevard
        - Way
        - Road
        - Lane
        - Drive
        - Place
        - Court
        - Terrace
        - Circle
        - Alley
        - Square
        - Parkway
        - Highway
        - Crescent
  - name: size_class
    description: Size classification of the call center
    tests:
    - not_null
    - accepted_values:
        values:
        - small
        - medium
        - large
  - name: open_date_key
    description: Surrogate key for the opening date
    tests:
    - not_null
  - name: company_id
    description: Company identifier
    tests:
    - not_null
  - name: state
    description: State where the call center is located
    tests:
    - not_null
  - name: manager_name
    description: Name of the call center manager
    tests:
    - not_null
  - name: square_footage
    description: Square footage of the call center
    tests:
    - not_null
  - name: call_center_surrogate_key
    description: Surrogate key for the call center
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is explicitly described as a surrogate key for the call
        center. For this table, each row is for a distinct call center. Surrogate
        keys are typically designed to be unique identifiers, so this is likely to
        be unique across rows.
  - name: operating_hours
    description: Operating hours of the call center
    tests:
    - not_null
    - accepted_values:
        values:
        - 24 hours
        - 8AM-4PM
        - 9AM-5PM
        - 8AM-8PM
        - 7AM-7PM
        - 6AM-10PM
        - 8AM-6PM
        - 9AM-6PM
        - 10AM-6PM
        - 7AM-3PM
        - 3PM-11PM
        - 11PM-7AM
        - 9AM-9PM
        - 8:30AM-5:30PM
        - 7:30AM-4:30PM
  - name: division_name
    description: Name of the division
    tests:
    - not_null
  - name: county
    description: County where the call center is located
    tests:
    - not_null
  - name: market_manager_name
    description: Name of the market manager
    tests:
    - not_null
  - name: company_name
    description: Name of the company
    tests:
    - not_null
  - name: employee_count
    description: Number of employees in the call center
    tests:
    - not_null
  - name: city
    description: City where the call center is located
    tests:
    - not_null
  - name: country
    description: Country where the call center is located
    tests:
    - not_null
  - name: market_id
    description: Market identifier
    tests:
    - not_null
  - name: division_id
    description: Division identifier
    tests:
    - not_null
  - name: tax_percentage
    description: Tax percentage applicable to the call center
    tests:
    - not_null
  - name: call_center_id
    description: Unique identifier for the call center
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Unique dimension key, derived from the slowly changing dimension
  - name: call_center_zip_code
    description: Zip code of the call center location
    tests:
    - not_null
  - name: closed_date_key
    description: Surrogate key for the closing date
    cocoon_meta:
      missing_acceptable: Not applicable for call centers still in operation.
  - name: gmt_offset
    description: GMT offset of the call center location
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record
    tests:
    - not_null
  - name: street_number
    description: Street number of the call center address
    tests:
    - not_null
cocoon_meta:
  scd_base_table: stg_call_center

snapshot_web_page (first 100 rows)

page_surrogate_key page_id customer_id url page_type character_count link_count image_count max_ad_count creation_date is_auto_generated last_access_date record_start_date
0 2 AAAAAAAACAAAAAAA NaN http://www.foo.com protected 1564 4 3 1 4850815.0 False 4893168.0 1997-09-03
1 1 AAAAAAAABAAAAAAA 539.0 http://www.foo.com welcome 2531 8 3 4 4850811.0 True 4893208.0 1997-09-03

snapshot_web_page.sql (clean the table)

-- Slowly Changing Dimension: Dimension keys are "page_id"
-- Effective date columns are "record_end_date"
-- We will create Type 1 SCD (latest snapshot)
SELECT 
    "page_surrogate_key",
    "page_id",
    "customer_id",
    "url",
    "page_type",
    "character_count",
    "link_count",
    "image_count",
    "max_ad_count",
    "creation_date",
    "is_auto_generated",
    "last_access_date",
    "record_start_date"
FROM (
     SELECT 
            "page_surrogate_key",
            "page_id",
            "customer_id",
            "url",
            "page_type",
            "character_count",
            "link_count",
            "image_count",
            "max_ad_count",
            "creation_date",
            "is_auto_generated",
            "last_access_date",
            "record_start_date",
            ROW_NUMBER() OVER (
                PARTITION BY "page_id" 
                ORDER BY "record_end_date" 
            DESC) AS "cocoon_rn"
    FROM "stg_web_page"
) ranked
WHERE "cocoon_rn" = 1

snapshot_web_page.yml (Document the table)

version: 2
models:
- name: snapshot_web_page
  description: The table is about web pages. It tracks the most recent version of
    each page. It includes details like page ID, customer ID, URL, page type, and
    various metrics. The table contains information on character count, link count,
    image count, and maximum ad count. It also includes creation date, auto-generation
    status, and last access date for each page.
  columns:
  - name: page_surrogate_key
    description: Surrogate key for the web page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column appears to be a unique identifier for each row in the
        table. For this table, each row represents a specific version of a web page,
        and the page_surrogate_key seems to uniquely identify each record.
  - name: page_id
    description: Unique identifier for the web page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Unique dimension key, derived from the slowly changing dimension
  - name: customer_id
    description: Customer identifier associated with the page
    tests:
    - not_null
  - name: url
    description: URL of the web page
    tests:
    - not_null
    - accepted_values:
        values:
        - http://www.foo.com
        - https://www.foo.com
        - www.foo.com
  - name: page_type
    description: Type or category of the web page
    tests:
    - not_null
  - name: character_count
    description: Number of characters in the web page
    tests:
    - not_null
  - name: link_count
    description: Number of links on the web page
    tests:
    - not_null
  - name: image_count
    description: Number of images on the web page
    tests:
    - not_null
  - name: max_ad_count
    description: Maximum number of ads allowed on the page
    tests:
    - not_null
  - name: creation_date
    description: Date when the web page was created
    tests:
    - not_null
  - name: is_auto_generated
    description: Indicates if the page was automatically generated
    tests:
    - not_null
  - name: last_access_date
    description: Date when the web page was last accessed
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record's validity period
    tests:
    - not_null
cocoon_meta:
  scd_base_table: stg_web_page

snapshot_catalog_page (first 100 rows)

page_surrogate_key page_id start_date_key department catalog_id page_number catalog_type page_description
0 3 AAAAAAAADAAAAAAA 2450815 DEPARTMENT 1 3.0 bi-annual Times could not address disabled indians. Effectively public ports c
1 84 AAAAAAAAEFAAAAAA 2450815 DEPARTMENT 1 84.0 bi-annual Industrial cars exist workers. Dependent pages should consider straig
2 55 AAAAAAAAHDAAAAAA 2450815 DEPARTMENT 1 55.0 bi-annual Male requirements can make. Catholic results load maybe common ba
3 8 AAAAAAAAIAAAAAAA 2450815 DEPARTMENT 1 8.0 bi-annual Areas see early for a pounds. New goods study too serious women. Unwittingly sorry incentives shall
4 12 AAAAAAAAMAAAAAAA 2450815 DEPARTMENT 1 12.0 bi-annual Girls indicate so in a countries. Natural, emotional weeks try a
5 44 AAAAAAAAMCAAAAAA 2450815 DEPARTMENT 1 44.0 bi-annual More likely movements shall identify badly other sensitive ideas. Fully other views could not
6 45 AAAAAAAANCAAAAAA 2450815 DEPARTMENT 1 45.0 bi-annual Full heads imply unfortunately good policies. However different periods will not avoid highly in
7 14 AAAAAAAAOAAAAAAA 2450815 DEPARTMENT 1 14.0 bi-annual Rooms would say ago economic sections. Essential properties might not support groups. Ago rare eye
8 78 AAAAAAAAOEAAAAAA 2450815 DEPARTMENT 1 78.0 bi-annual Intelligent buildings might not keep here new cases. Sole
9 79 AAAAAAAAPEAAAAAA 2450815 DEPARTMENT 1 79.0 bi-annual Complaints release views. Really internal interpretations used to make funny, important
10 52 AAAAAAAAEDAAAAAA 2450815 DEPARTMENT 1 52.0 bi-annual Urban, large girls could go. Actions might guard about key ot
11 6 AAAAAAAAGAAAAAAA 2450815 DEPARTMENT 1 6.0 bi-annual Exciting principles wish greatly only excellent women. Appropriate fortunes shall not
12 58 AAAAAAAAKDAAAAAA 2450815 DEPARTMENT 1 58.0 bi-annual Tasks work fun trees. Old employees make colonial, good signs. Famous emo
13 59 AAAAAAAALDAAAAAA 2450815 DEPARTMENT 1 59.0 bi-annual Free, like figures will not leave once similar, eas
14 94 AAAAAAAAOFAAAAAA 2450815 DEPARTMENT 1 94.0 bi-annual Equal, other calls maintain simply. Newspapers cannot touch f
15 34 AAAAAAAACCAAAAAA 2450815 DEPARTMENT 1 34.0 bi-annual Old, essential demonstrations watch absolutely; never woo
16 66 AAAAAAAACEAAAAAA 2450815 DEPARTMENT 1 66.0 bi-annual Simple types stir oddly. More head depths could tak
17 5 AAAAAAAAFAAAAAAA 2450815 DEPARTMENT 1 5.0 bi-annual Classic buildings ensure in a tests. Real years may not receive open systems. Now broad m
18 38 AAAAAAAAGCAAAAAA 2450815 DEPARTMENT 1 38.0 bi-annual Ready perceptions close only with a conservatives.
19 89 AAAAAAAAJFAAAAAA 2450815 DEPARTMENT 1 89.0 bi-annual More responsible bands pursue then including a tasks; extremely traditional numbe
20 64 AAAAAAAAAEAAAAAA 2450815 DEPARTMENT 1 64.0 bi-annual New, other men would hear secret costs. Major lines might think. Modern hands shall
21 33 AAAAAAAABCAAAAAA 2450815 DEPARTMENT 1 33.0 bi-annual Here divine knees could not recall then before a meals. Resources use commercial,
22 65 AAAAAAAABEAAAAAA 2450815 DEPARTMENT 1 65.0 bi-annual Otherwise vast titles could comprehend just, strong forms. Historic, european owners enha
23 19 AAAAAAAADBAAAAAA 2450815 DEPARTMENT 1 19.0 bi-annual Poor, hostile guidelines could hope alone early things. Secret,
24 53 AAAAAAAAFDAAAAAA 2450815 DEPARTMENT 1 53.0 bi-annual Relevant, major backs fly just private findings. New workers must not keep l
25 25 AAAAAAAAJBAAAAAA 2450815 DEPARTMENT 1 25.0 bi-annual Dimensions ensure by a enquiries. Special times may practise much full, bad books; l
26 10 AAAAAAAAKAAAAAAA 2450815 DEPARTMENT 1 10.0 bi-annual Careful, intense funds balance perhaps boys. Romantic chips remove legs. Direct birds get
27 90 AAAAAAAAKFAAAAAA 2450815 DEPARTMENT 1 90.0 bi-annual Enough real studies should not appear weekends. Rich,
28 11 AAAAAAAALAAAAAAA 2450815 DEPARTMENT 1 11.0 bi-annual At least national countries live by an sales. Weap
29 48 AAAAAAAAADAAAAAA 2450815 DEPARTMENT 1 48.0 bi-annual Moving, parliamentary women seal only glad, little damages. Electoral ways
30 35 AAAAAAAADCAAAAAA 2450815 DEPARTMENT 1 35.0 bi-annual Simple blocks feel now whole police. Available meanings must shine clearly real, good departmen
31 57 AAAAAAAAJDAAAAAA 2450815 DEPARTMENT 1 57.0 bi-annual Expressly local horses shall undertake perhaps able, co
32 91 AAAAAAAALFAAAAAA 2450815 DEPARTMENT 1 91.0 bi-annual Safe prices grow there enough private boys. Priorities come eventually forces. Regi
33 50 AAAAAAAACDAAAAAA 2450815 DEPARTMENT 1 50.0 bi-annual Now metropolitan prices survive institutions. Internal cheeks
34 82 AAAAAAAACFAAAAAA 2450815 DEPARTMENT 1 82.0 bi-annual Colonial interests reach also. Results will not pursue seconds. Labour other
35 86 AAAAAAAAGFAAAAAA 2450815 DEPARTMENT 1 86.0 bi-annual Talks draw totally manufacturers. Lines evolve very; conditions see mi
36 73 AAAAAAAAJEAAAAAA 2450815 DEPARTMENT 1 73.0 bi-annual Journalists develop civil, open methods. Very normal vehicles used t
37 43 AAAAAAAALCAAAAAA 2450815 DEPARTMENT 1 43.0 bi-annual Relatively darling limits must not forgive. Rural, dry folk h
38 93 AAAAAAAANFAAAAAA 2450815 DEPARTMENT 1 93.0 bi-annual Perfectly mild differences must visit deaf years. Attractive, interesting women might not tie to t
39 71 AAAAAAAAHEAAAAAA 2450815 DEPARTMENT 1 71.0 bi-annual Numbers may create now concerned families. Machines must
40 16 AAAAAAAAABAAAAAA 2450815 DEPARTMENT 1 16.0 bi-annual Schools must know now empty legs; generally daily children use sharp, loca
41 49 AAAAAAAABDAAAAAA 2450815 DEPARTMENT 1 49.0 bi-annual Old, extensive months cannot write political numbers. Minor lips know as usual f
42 97 AAAAAAAABGAAAAAA 2450815 DEPARTMENT 1 97.0 bi-annual Trees help far also ideal debts. Old, outstanding forces
43 2 AAAAAAAACAAAAAAA 2450815 DEPARTMENT 1 2.0 bi-annual English areas will leave prisoners. Too public countries ought to become beneath the years.
44 20 AAAAAAAAEBAAAAAA 2450815 DEPARTMENT 1 20.0 bi-annual Appropriate years kill. Probably male units come perhaps between the minutes.
45 21 AAAAAAAAFBAAAAAA 2450815 DEPARTMENT 1 21.0 bi-annual Gentle fields understand forward high parental faciliti
46 22 AAAAAAAAGBAAAAAA 2450815 DEPARTMENT 1 22.0 bi-annual Square, good women can refuse. Women allow over courses. Entire, dail
47 24 AAAAAAAAIBAAAAAA 2450815 DEPARTMENT 1 24.0 bi-annual For once public conditions could help even single, free vehicles. Soldi
48 26 AAAAAAAAKBAAAAAA 2450815 DEPARTMENT 1 26.0 bi-annual Nervously reasonable sanctions would not supply often structures. National dangers relieve never
49 27 AAAAAAAALBAAAAAA 2450815 DEPARTMENT 1 27.0 bi-annual Ready restaurants can represent previously perfectly educational thanks; adjacent quantities t
50 76 AAAAAAAAMEAAAAAA 2450815 DEPARTMENT 1 76.0 bi-annual Entirely normal thousands cannot rely just important ti
51 92 AAAAAAAAMFAAAAAA 2450815 DEPARTMENT 1 92.0 bi-annual Years can know. Available, dead degrees may begin ever. Docto
52 77 AAAAAAAANEAAAAAA 2450815 DEPARTMENT 1 77.0 bi-annual American years swallow only, nice thanks. Obvious materials might not discuss just.
53 30 AAAAAAAAOBAAAAAA 2450815 DEPARTMENT 1 30.0 bi-annual Western, legislative courses cause truly else strange costs. Only grey windows come without a depo
54 54 AAAAAAAAGDAAAAAA 2450815 DEPARTMENT 1 54.0 bi-annual Rights should reassure as to a borders; difficult, efficient servants might no
55 39 AAAAAAAAHCAAAAAA 2450815 DEPARTMENT 1 39.0 bi-annual Vastly favorite systems may not imply manufacturing, new facilities. Eventually wo
56 9 AAAAAAAAJAAAAAAA 2450815 DEPARTMENT 1 9.0 bi-annual Intensive, economic changes resist bloody of course simple economies;
57 28 AAAAAAAAMBAAAAAA 2450815 DEPARTMENT 1 28.0 bi-annual Also new funds must not find in addition essential poor friends; now
58 4 AAAAAAAAEAAAAAAA 2450815 None 1 NaN bi-annual None
59 7 AAAAAAAAHAAAAAAA 2450815 DEPARTMENT 1 7.0 bi-annual National services must not come at least into a girls
60 87 AAAAAAAAHFAAAAAA 2450815 DEPARTMENT 1 87.0 bi-annual Away dramatic letters say slightly for a advisers. Severe, difficult points entail h
61 40 AAAAAAAAICAAAAAA 2450815 DEPARTMENT 1 40.0 bi-annual Social, full questions learn already cautiously unemployed solicitors. Alone, close s
62 56 AAAAAAAAIDAAAAAA 2450815 DEPARTMENT 1 56.0 bi-annual Men talk even like a days. Still large feelings see new, quick hotels. Far black relations should
63 95 AAAAAAAAPFAAAAAA 2450815 DEPARTMENT 1 95.0 bi-annual Bonds include completely critical principles. Charges walk just forms. Subsequent, ti
64 17 AAAAAAAABBAAAAAA 2450815 DEPARTMENT 1 17.0 bi-annual More than true carers can ensure at a officers. Candidates s
65 67 AAAAAAAADEAAAAAA 2450815 DEPARTMENT 1 67.0 bi-annual Other developments shall not race in order objective wings. Nearby departments
66 83 AAAAAAAADFAAAAAA 2450815 DEPARTMENT 1 83.0 bi-annual In order compatible schools float particular families. Briefly strong words used
67 36 AAAAAAAAECAAAAAA 2450815 DEPARTMENT 1 36.0 bi-annual Dead rats contain central, interesting years. Classes go.
68 70 AAAAAAAAGEAAAAAA 2450815 DEPARTMENT 1 70.0 bi-annual Visual, major matters witness together so-called days. Obviously sharp men spend meanwhile els
69 23 AAAAAAAAHBAAAAAA 2450815 DEPARTMENT 1 23.0 bi-annual Level, ordinary names would change institutional principles. Fe
70 60 AAAAAAAAMDAAAAAA 2450815 DEPARTMENT 1 60.0 bi-annual Teachers would choose always average investments. Unable, illegal sorts see. Shadows sha
71 46 AAAAAAAAOCAAAAAA 2450815 DEPARTMENT 1 46.0 bi-annual Old beings used to raise. Curtains cannot enable just sites. Cells can say western talks;
72 81 AAAAAAAABFAAAAAA 2450815 DEPARTMENT 1 81.0 bi-annual Vital findings come more about convincing firms. Hor
73 37 AAAAAAAAFCAAAAAA 2450815 DEPARTMENT 1 37.0 bi-annual Approaches demonstrate requirements. Public views can need hard. Almost alone
74 85 AAAAAAAAFFAAAAAA 2450815 DEPARTMENT 1 85.0 bi-annual Minutes ought to keep marginal states. New, financial nurses become later. Legally engl
75 41 AAAAAAAAJCAAAAAA 2450815 DEPARTMENT 1 41.0 bi-annual True friends may not pay once at first good issues. Girls ought to grow t
76 74 AAAAAAAAKEAAAAAA 2450815 DEPARTMENT 1 74.0 bi-annual Cheap problems obtain national, new organisations. Certain, suitable words
77 47 AAAAAAAAPCAAAAAA 2450815 DEPARTMENT 1 47.0 bi-annual Dangerous, desirable relations might forget always free activities. Values ough
78 32 AAAAAAAAACAAAAAA 2450815 DEPARTMENT 1 32.0 bi-annual Quickly industrial trousers remember poor, practica
79 72 AAAAAAAAIEAAAAAA 2450815 DEPARTMENT 1 72.0 bi-annual Sometimes lexical police shall affect women. Personal banks could not cost e
80 42 AAAAAAAAKCAAAAAA 2450815 DEPARTMENT 1 42.0 bi-annual Fine animals may expect solidly. Highest extra vessels take here simila
81 61 AAAAAAAANDAAAAAA 2450815 DEPARTMENT 1 61.0 bi-annual Glad developments improve still unable, invisible communications. High processes ru
82 1 AAAAAAAABAAAAAAA 2450815 DEPARTMENT 1 1.0 bi-annual In general basic characters welcome. Clearly lively friends conv
83 18 AAAAAAAACBAAAAAA 2450815 DEPARTMENT 1 18.0 bi-annual Shops end problems. Urban experiences play new stores. Institutions order as residential places.
84 98 AAAAAAAACGAAAAAA 2450815 DEPARTMENT 1 98.0 bi-annual Still fine services would surrender urban results; mean, serious considerations may say
85 51 AAAAAAAADDAAAAAA 2450815 DEPARTMENT 1 51.0 bi-annual Superior, pink men should plant also recent, very fears. Purposes see other men. Tough, particular
86 68 AAAAAAAAEEAAAAAA 2450815 DEPARTMENT 1 68.0 bi-annual More big police cannot give important, difficult clients. Black, early vessels use
87 75 AAAAAAAALEAAAAAA 2450815 DEPARTMENT 1 75.0 bi-annual Specifically russian plans must use neither grand shares. Harsh, french results increase
88 29 AAAAAAAANBAAAAAA 2450815 DEPARTMENT 1 29.0 bi-annual Small circumstances enter almost potentially spare individuals. Residential women launch
89 15 AAAAAAAAPAAAAAAA 2450815 DEPARTMENT 1 15.0 bi-annual Legal, required ends may not improve in the pictures. Really social structur
90 63 AAAAAAAAPDAAAAAA 2450815 DEPARTMENT 1 63.0 bi-annual Possible, general practitioners must mate in a companies. Small developments per
91 80 AAAAAAAAAFAAAAAA 2450815 DEPARTMENT 1 80.0 bi-annual Words know difficult, lucky areas. Over red parts need extr
92 96 AAAAAAAAAGAAAAAA 2450815 DEPARTMENT 1 96.0 bi-annual Then other details will stop nuclear officers. Capital expenses carve far options. Stru
93 99 AAAAAAAADGAAAAAA 2450815 DEPARTMENT 1 99.0 bi-annual Useful, white courts leave almost high fingers. Popular, basic words plan
94 69 AAAAAAAAFEAAAAAA 2450815 DEPARTMENT 1 69.0 bi-annual More basic colleagues should shift; muscles make however legal authorities.
95 88 AAAAAAAAIFAAAAAA 2450815 DEPARTMENT 1 88.0 bi-annual Particular projects involve always final lakes. Subjects must move
96 13 AAAAAAAANAAAAAAA 2450815 DEPARTMENT 1 13.0 bi-annual Miles see mainly clear hands. Villages finish there blue figures. Moreover wide students travel poo
97 62 AAAAAAAAODAAAAAA 2450815 DEPARTMENT 1 62.0 bi-annual Indeed poor enemies change so to a hours. Either public circumstan
98 31 AAAAAAAAPBAAAAAA 2450815 DEPARTMENT 1 31.0 bi-annual Differences would complete previously at a notes. Important

snapshot_catalog_page.sql (clean the table)

-- Slowly Changing Dimension: Dimension keys are "page_id"
-- Effective date columns are "end_date_key"
-- We will create Type 1 SCD (latest snapshot)
SELECT 
    "page_surrogate_key",
    "page_id",
    "start_date_key",
    "department",
    "catalog_id",
    "page_number",
    "catalog_type",
    "page_description"
FROM (
     SELECT 
            "page_surrogate_key",
            "page_id",
            "start_date_key",
            "department",
            "catalog_id",
            "page_number",
            "catalog_type",
            "page_description",
            ROW_NUMBER() OVER (
                PARTITION BY "page_id" 
                ORDER BY "end_date_key" 
            DESC) AS "cocoon_rn"
    FROM "stg_catalog_page"
) ranked
WHERE "cocoon_rn" = 1

snapshot_catalog_page.yml (Document the table)

version: 2
models:
- name: snapshot_catalog_page
  description: The table is about catalog pages. It tracks the most recent version
    of each unique page. It includes details like page ID, start date, department,
    catalog ID, page number, type, and description. Each row represents a distinct
    catalog page with its current information. The table excludes end dates and version
    identifiers, focusing on the latest data for each page.
  columns:
  - name: page_surrogate_key
    description: Surrogate key for the catalog page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key specifically created to uniquely
        identify each catalog page. For this table, each row represents a unique catalog
        page, and the page_surrogate_key is designed to be unique across rows.
  - name: page_id
    description: Unique identifier for each catalog page
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Unique dimension key, derived from the slowly changing dimension
  - name: start_date_key
    description: Surrogate key for the start date
    tests:
    - not_null
  - name: department
    description: Department associated with the catalog page
    tests:
    - accepted_values:
        values:
        - Electronics
        - Clothing
        - Home & Garden
        - Toys & Games
        - Sports & Outdoors
        - Beauty & Personal Care
        - Books
        - Music
        - Movies & TV
        - Automotive
        - Grocery
        - Pet Supplies
        - Health & Wellness
        - Jewelry
        - Office Supplies
        - Baby & Kids
        - Furniture
        - Appliances
        - Tools & Home Improvement
        - Arts & Crafts
        - DEPARTMENT
    cocoon_meta:
      missing_acceptable: Possibly represents a general or non-departmental page.
  - name: catalog_id
    description: Identifier for the catalog
    tests:
    - not_null
  - name: page_number
    description: Number of the page within the catalog
    tests:
    - not_null
  - name: catalog_type
    description: Type of catalog (e.g., bi-annual)
    tests:
    - not_null
    - accepted_values:
        values:
        - annual
        - bi-annual
        - quarterly
        - monthly
        - weekly
        - daily
        - seasonal
        - special edition
  - name: page_description
    description: Brief description of the catalog page content
    tests:
    - not_null
cocoon_meta:
  scd_base_table: stg_catalog_page

snapshot_web_site (first 100 rows)

gmt_offset suite_number website_id street_name street_type company_id web_state market_manager web_country site_manager website_name web_county website_surrogate_key web_city market_id web_classification tax_percentage record_start_date street_number web_close_date web_open_date zip_code
0 -5 Suite 150 AAAAAAAACAAAAAAA Ridge Wilson Cir 4 TN David Myers United States Tommy Jones site_0 Williamson County 2 Midway 6 Unknown 0.0 1997-08-16 358 2448973.0 4850799.0 31904
1 -5 Suite 330 AAAAAAAABAAAAAAA Dogwood Sunset Ln 6 TN Joe George United States Ronald Shaffer site_0 Williamson County 1 Midway 4 Unknown 0.1 1997-08-16 51 NaN 4850808.0 31904

snapshot_web_site.sql (clean the table)

-- Slowly Changing Dimension: Dimension keys are "website_id"
-- Effective date columns are "record_end_date"
-- We will create Type 1 SCD (latest snapshot)
SELECT 
    "gmt_offset",
    "suite_number",
    "website_id",
    "street_name",
    "street_type",
    "company_id",
    "web_state",
    "market_manager",
    "web_country",
    "site_manager",
    "website_name",
    "web_county",
    "website_surrogate_key",
    "web_city",
    "market_id",
    "web_classification",
    "tax_percentage",
    "record_start_date",
    "street_number",
    "web_close_date",
    "web_open_date",
    "zip_code"
FROM (
     SELECT 
            "gmt_offset",
            "suite_number",
            "website_id",
            "street_name",
            "street_type",
            "company_id",
            "web_state",
            "market_manager",
            "web_country",
            "site_manager",
            "website_name",
            "web_county",
            "website_surrogate_key",
            "web_city",
            "market_id",
            "web_classification",
            "tax_percentage",
            "record_start_date",
            "street_number",
            "web_close_date",
            "web_open_date",
            "zip_code",
            ROW_NUMBER() OVER (
                PARTITION BY "website_id" 
                ORDER BY "record_end_date" 
            DESC) AS "cocoon_rn"
    FROM "stg_web_site"
) ranked
WHERE "cocoon_rn" = 1

snapshot_web_site.yml (Document the table)

version: 2
models:
- name: snapshot_web_site
  description: The table is about current web sites. It tracks the most recent version
    of each site's details. It includes site ID, name, location, management, market
    information, company details, address, and tax percentage. Each row represents
    a unique web site with its latest characteristics. The table provides a snapshot
    of active web sites without historical versions.
  columns:
  - name: gmt_offset
    description: GMT time offset for the website's location
    tests:
    - not_null
  - name: suite_number
    description: Suite number of the website's address
    tests:
    - not_null
  - name: website_id
    description: Unique identifier for the website
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: Unique dimension key, derived from the slowly changing dimension
  - name: street_name
    description: Street name of the website's address
    tests:
    - not_null
  - name: street_type
    description: Street type of the website's address
    tests:
    - not_null
    - accepted_values:
        values:
        - Ave
        - Blvd
        - Cir
        - Ct
        - Dr
        - Ln
        - Pl
        - Rd
        - St
        - Ter
        - Way
        - Pkwy
        - Hwy
        - Aly
        - Expy
  - name: company_id
    description: Unique identifier for the company
    tests:
    - not_null
  - name: web_state
    description: State where the website is registered
    tests:
    - not_null
  - name: market_manager
    description: Name of the market manager
    tests:
    - not_null
  - name: web_country
    description: Country where the website is registered
    tests:
    - not_null
  - name: site_manager
    description: Name of the website manager
    tests:
    - not_null
  - name: website_name
    description: Name of the website
    tests:
    - not_null
  - name: web_county
    description: County where the website is registered
    tests:
    - not_null
  - name: website_surrogate_key
    description: Surrogate key for the website
    tests:
    - not_null
    - unique
    cocoon_meta:
      uniqueness: This column is a surrogate key for the website. For this table,
        each row represents a unique website, and the surrogate key is designed to
        be unique for each website.
  - name: web_city
    description: City where the website is registered
    tests:
    - not_null
  - name: market_id
    description: Unique identifier for the market
    tests:
    - not_null
  - name: web_classification
    description: Classification of the website
    tests:
    - not_null
  - name: tax_percentage
    description: Tax percentage applicable to the website
    tests:
    - not_null
  - name: record_start_date
    description: Start date of the record
    tests:
    - not_null
  - name: street_number
    description: Street number of the website's address
    tests:
    - not_null
  - name: web_close_date
    description: Date when the website was closed
    cocoon_meta:
      missing_acceptable: Website may still be active, so no close date.
  - name: web_open_date
    description: Date when the website was opened
    tests:
    - not_null
  - name: zip_code
    description: ZIP code of the website's location
    tests:
    - not_null
cocoon_meta:
  scd_base_table: stg_web_site
We identify the primary key (PK) and foreign key (FK) from tables. We build a join graph that connects FK to PK.

Join Graph (FK to PK)

%3 stg_catalog_sales stg_catalog_sales stg_customer_address stg_customer_address stg_catalog_sales->stg_customer_address stg_catalog_sales->stg_customer_address snapshot_item snapshot_item stg_catalog_sales->snapshot_item stg_customer stg_customer stg_catalog_sales->stg_customer stg_catalog_sales->stg_customer stg_promotion stg_promotion stg_catalog_sales->stg_promotion stg_warehouse stg_warehouse stg_catalog_sales->stg_warehouse snapshot_call_center snapshot_call_center stg_catalog_sales->snapshot_call_center stg_household_demographics stg_household_demographics stg_catalog_sales->stg_household_demographics stg_catalog_sales->stg_household_demographics stg_ship_mode stg_ship_mode stg_catalog_sales->stg_ship_mode stg_customer_demographics stg_customer_demographics stg_catalog_sales->stg_customer_demographics stg_catalog_sales->stg_customer_demographics snapshot_catalog_page snapshot_catalog_page stg_catalog_sales->snapshot_catalog_page stg_reason stg_reason stg_date_dim stg_date_dim stg_time_dim stg_time_dim stg_catalog_returns stg_catalog_returns stg_catalog_returns->stg_reason stg_catalog_returns->stg_date_dim stg_catalog_returns->stg_time_dim stg_catalog_returns->stg_customer_address stg_catalog_returns->stg_customer_address stg_catalog_returns->snapshot_item stg_catalog_returns->stg_customer stg_catalog_returns->stg_customer stg_catalog_returns->stg_warehouse stg_catalog_returns->snapshot_call_center stg_catalog_returns->stg_household_demographics stg_catalog_returns->stg_household_demographics stg_catalog_returns->stg_ship_mode stg_catalog_returns->stg_customer_demographics stg_catalog_returns->stg_customer_demographics stg_catalog_returns->snapshot_catalog_page stg_customer->stg_customer_address stg_customer->stg_household_demographics stg_customer->stg_customer_demographics snapshot_web_site snapshot_web_site stg_income_band stg_income_band stg_household_demographics->stg_income_band stg_store_sales stg_store_sales stg_store_sales->stg_customer_address stg_store_sales->snapshot_item stg_store_sales->stg_customer stg_store_sales->stg_promotion stg_store_sales->stg_household_demographics snapshot_store snapshot_store stg_store_sales->snapshot_store stg_store_sales->stg_customer_demographics snapshot_web_page snapshot_web_page snapshot_store->snapshot_store stg_web_sales stg_web_sales stg_web_sales->stg_customer_address stg_web_sales->stg_customer_address stg_web_sales->snapshot_item stg_web_sales->stg_customer stg_web_sales->stg_customer stg_web_sales->stg_promotion stg_web_sales->stg_warehouse stg_web_sales->snapshot_web_site stg_web_sales->stg_household_demographics stg_web_sales->stg_household_demographics stg_web_sales->snapshot_web_page stg_web_sales->stg_ship_mode stg_web_sales->stg_customer_demographics stg_web_sales->stg_customer_demographics stg_inventory stg_inventory stg_inventory->snapshot_item stg_inventory->stg_warehouse stg_web_returns stg_web_returns stg_web_returns->stg_reason stg_web_returns->stg_date_dim stg_web_returns->stg_time_dim stg_web_returns->stg_customer_address stg_web_returns->stg_customer_address stg_web_returns->snapshot_item stg_web_returns->stg_customer stg_web_returns->stg_customer stg_web_returns->stg_household_demographics stg_web_returns->stg_household_demographics stg_web_returns->snapshot_web_page stg_web_returns->stg_customer_demographics stg_web_returns->stg_customer_demographics stg_store_returns stg_store_returns stg_store_returns->stg_reason stg_store_returns->stg_date_dim stg_store_returns->stg_time_dim stg_store_returns->stg_customer_address stg_store_returns->snapshot_item stg_store_returns->stg_customer stg_store_returns->stg_promotion stg_store_returns->stg_household_demographics stg_store_returns->snapshot_store stg_store_returns->stg_customer_demographics

cocoon_join.yml (Document the joins)

join_graph:
- table_name: stg_customer
  primary_key: customer_key
  foreign_keys:
  - column: current_address_key
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: current_demographics_key
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: current_household_key
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
- table_name: stg_catalog_sales
  foreign_keys:
  - column: billing_customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: shipping_customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: billing_address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: shipping_address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: billing_customer_demographics_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: shipping_customer_demographics_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: billing_household_demographics_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: shipping_household_demographics_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: promotion_id
    reference:
      table_name: stg_promotion
      column: promotion_id
  - column: shipping_mode_id
    reference:
      table_name: stg_ship_mode
      column: ship_mode_surrogate_key
  - column: warehouse_key
    reference:
      table_name: stg_warehouse
      column: warehouse_surrogate_key
  - column: call_center_id
    reference:
      table_name: snapshot_call_center
      column: call_center_surrogate_key
  - column: catalog_page_id
    reference:
      table_name: snapshot_catalog_page
      column: page_surrogate_key
  - column: item_id
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
- table_name: stg_catalog_returns
  foreign_keys:
  - column: refunded_customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: returning_customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: refunded_address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: returning_address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: refunded_customer_demo_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: returning_customer_demo_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: return_date_id
    reference:
      table_name: stg_date_dim
      column: date_sk
  - column: refunded_household_demo_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: returning_household_demo_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: return_reason_id
    reference:
      table_name: stg_reason
      column: reason_surrogate_key
  - column: shipping_mode_id
    reference:
      table_name: stg_ship_mode
      column: ship_mode_surrogate_key
  - column: return_time_id
    reference:
      table_name: stg_time_dim
      column: time_surrogate_key
  - column: warehouse_id
    reference:
      table_name: stg_warehouse
      column: warehouse_surrogate_key
  - column: call_center_id
    reference:
      table_name: snapshot_call_center
      column: call_center_surrogate_key
  - column: catalog_page_id
    reference:
      table_name: snapshot_catalog_page
      column: page_surrogate_key
  - column: item_id
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
- table_name: stg_store_sales
  foreign_keys:
  - column: customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: customer_demo_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: household_demo_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: promotion_id
    reference:
      table_name: stg_promotion
      column: promotion_id
  - column: item_id
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
  - column: store_id
    reference:
      table_name: snapshot_store
      column: store_id
- table_name: stg_store_returns
  foreign_keys:
  - column: customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: customer_demo_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: sale_date_id
    reference:
      table_name: stg_date_dim
      column: date_sk
  - column: household_demo_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: promotion_id
    reference:
      table_name: stg_promotion
      column: promotion_id
  - column: return_reason_id
    reference:
      table_name: stg_reason
      column: reason_surrogate_key
  - column: sale_time_id
    reference:
      table_name: stg_time_dim
      column: time_surrogate_key
  - column: item_id
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
  - column: store_id
    reference:
      table_name: snapshot_store
      column: store_id
- table_name: stg_web_sales
  foreign_keys:
  - column: billing_customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: shipping_customer_id
    reference:
      table_name: stg_customer
      column: customer_key
  - column: billing_address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: shipping_address_id
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: billing_customer_demo_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: shipping_customer_demo_id
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: billing_household_demo_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: shipping_household_demo_id
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: promotion_id
    reference:
      table_name: stg_promotion
      column: promotion_id
  - column: shipping_mode_id
    reference:
      table_name: stg_ship_mode
      column: ship_mode_surrogate_key
  - column: warehouse_id
    reference:
      table_name: stg_warehouse
      column: warehouse_surrogate_key
  - column: item_id
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
  - column: web_page_id
    reference:
      table_name: snapshot_web_page
      column: page_surrogate_key
  - column: website_id
    reference:
      table_name: snapshot_web_site
      column: website_surrogate_key
- table_name: stg_web_returns
  foreign_keys:
  - column: refunded_customer_key
    reference:
      table_name: stg_customer
      column: customer_key
  - column: returning_customer_key
    reference:
      table_name: stg_customer
      column: customer_key
  - column: refunded_address_key
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: returning_address_key
    reference:
      table_name: stg_customer_address
      column: address_surrogate_key
  - column: refunded_customer_demo_key
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: returning_customer_demo_key
    reference:
      table_name: stg_customer_demographics
      column: demographic_id
  - column: return_date_key
    reference:
      table_name: stg_date_dim
      column: date_sk
  - column: refunded_household_demo_key
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: returning_household_demo_key
    reference:
      table_name: stg_household_demographics
      column: household_demographic_id
  - column: reason_key
    reference:
      table_name: stg_reason
      column: reason_surrogate_key
  - column: return_time_key
    reference:
      table_name: stg_time_dim
      column: time_surrogate_key
  - column: item_key
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
  - column: web_page_key
    reference:
      table_name: snapshot_web_page
      column: page_surrogate_key
- table_name: stg_customer_address
  primary_key: address_surrogate_key
  foreign_keys: []
- table_name: stg_customer_demographics
  primary_key: demographic_id
  foreign_keys: []
- table_name: stg_date_dim
  primary_key: date_sk
  foreign_keys: []
- table_name: stg_household_demographics
  primary_key: household_demographic_id
  foreign_keys:
  - column: income_band_id
    reference:
      table_name: stg_income_band
      column: income_band_id
- table_name: stg_income_band
  primary_key: income_band_id
  foreign_keys: []
- table_name: stg_promotion
  primary_key: promotion_id
  foreign_keys: []
- table_name: stg_reason
  primary_key: reason_surrogate_key
  foreign_keys: []
- table_name: stg_ship_mode
  primary_key: ship_mode_surrogate_key
  foreign_keys: []
- table_name: stg_time_dim
  primary_key: time_surrogate_key
  foreign_keys: []
- table_name: stg_warehouse
  primary_key: warehouse_surrogate_key
  foreign_keys: []
- table_name: stg_inventory
  foreign_keys:
  - column: warehouse_id
    reference:
      table_name: stg_warehouse
      column: warehouse_surrogate_key
  - column: item_id
    reference:
      table_name: snapshot_item
      column: ITEM_SURROGATE_KEY
- table_name: snapshot_call_center
  primary_key: call_center_surrogate_key
  foreign_keys: []
- table_name: snapshot_catalog_page
  primary_key: page_surrogate_key
  foreign_keys: []
- table_name: snapshot_item
  primary_key: ITEM_SURROGATE_KEY
  foreign_keys: []
- table_name: snapshot_store
  primary_key: store_id
  foreign_keys:
  - column: store_surrogate_key
    reference:
      table_name: snapshot_store
      column: store_id
- table_name: snapshot_web_page
  primary_key: page_surrogate_key
  foreign_keys: []
- table_name: snapshot_web_site
  primary_key: website_surrogate_key
  foreign_keys: []
We identify the entities and relationships behind the tables, and tell the story among these relationships.

cocoon_er.yml (Document the ER model)

entities:
- entity_name: Customers
  entity_description: Individual customers with their personal and account details
  table_name: stg_customer
  primary_key: customer_key
- entity_name: Customer Addresses
  entity_description: Physical addresses associated with customers
  table_name: stg_customer_address
  primary_key: address_surrogate_key
- entity_name: Customer Demographics
  entity_description: Demographic profiles of customers including personal and economic
    characteristics
  table_name: stg_customer_demographics
  primary_key: demographic_id
- entity_name: Date Dimensions
  entity_description: Calendar dates with various time-related attributes for analysis
  table_name: stg_date_dim
  primary_key: date_sk
- entity_name: Household Demographics
  entity_description: Demographic profiles of households including economic and family
    characteristics
  table_name: stg_household_demographics
  primary_key: household_demographic_id
- entity_name: Income Bands
  entity_description: Defined ranges of income for categorizing customers or households
  table_name: stg_income_band
  primary_key: income_band_id
- entity_name: Promotions
  entity_description: Marketing campaigns and promotional offers
  table_name: stg_promotion
  primary_key: promotion_id
- entity_name: Return Reasons
  entity_description: Reasons for product returns or order issues
  table_name: stg_reason
  primary_key: reason_surrogate_key
- entity_name: Shipping Modes
  entity_description: Available shipping options and carriers
  table_name: stg_ship_mode
  primary_key: ship_mode_surrogate_key
- entity_name: Time Dimensions
  entity_description: Time of day broken down into various attributes for analysis
  table_name: stg_time_dim
  primary_key: time_surrogate_key
- entity_name: Warehouses
  entity_description: Storage facilities for inventory
  table_name: stg_warehouse
  primary_key: warehouse_surrogate_key
- entity_name: Call Centers
  entity_description: Customer service call centers with operational details
  table_name: snapshot_call_center
  primary_key: call_center_surrogate_key
- entity_name: Catalog Pages
  entity_description: Pages from product catalogs
  table_name: snapshot_catalog_page
  primary_key: page_surrogate_key
- entity_name: Products
  entity_description: Items available for sale with their attributes and pricing
  table_name: snapshot_item
  primary_key: ITEM_SURROGATE_KEY
- entity_name: Retail Stores
  entity_description: Physical retail locations with operational and financial details
  table_name: snapshot_store
  primary_key: store_id
- entity_name: Web Pages
  entity_description: Individual pages on e-commerce websites
  table_name: snapshot_web_page
  primary_key: page_surrogate_key
- entity_name: Websites
  entity_description: E-commerce websites with their operational details
  table_name: snapshot_web_site
  primary_key: website_surrogate_key
relations:
- relation_name: CustomerProfileAssociation
  relation_description: Customers have current addresses, belong to households, and
    possess demographic attributes, all linked through unique keys.
  table_name: stg_customer
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Household Demographics
- relation_name: HouseholdIncomeBandAssociation
  relation_description: Household Demographics are categorized into specific Income
    Bands, representing the economic status of each household.
  table_name: stg_household_demographics
  entities:
  - Household Demographics
  - Income Bands
- relation_name: CatalogSalesTransactions
  relation_description: Customers with specific Demographics and Household Demographics
    place orders for Products from Catalog Pages,  which are processed by Call Centers,
    shipped from Warehouses using Shipping Modes to Customer Addresses,  sometimes
    involving Promotions, resulting in detailed sales transactions.
  table_name: stg_catalog_sales
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Household Demographics
  - Promotions
  - Shipping Modes
  - Warehouses
  - Call Centers
  - Catalog Pages
  - Products
- relation_name: CatalogReturnTransactions
  relation_description: Customers initiate Returns for Products from Catalog Pages,
    processed through Call Centers, involving Customer Demographics, Household Demographics,
    Customer Addresses, Warehouses, Shipping Modes, and Return Reasons, tracked by
    Date and Time Dimensions.
  table_name: stg_catalog_returns
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Date Dimensions
  - Household Demographics
  - Return Reasons
  - Shipping Modes
  - Time Dimensions
  - Warehouses
  - Call Centers
  - Catalog Pages
  - Products
- relation_name: StoreSalesTransaction
  relation_description: Customers, associated with Customer Demographics and Household
    Demographics, purchase Products from Retail Stores,  influenced by Promotions,
    with transactions linked to Customer Addresses.
  table_name: stg_store_sales
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Household Demographics
  - Promotions
  - Products
  - Retail Stores
- relation_name: StoreItemReturns
  relation_description: Customers from specific Households, with their Demographics
    and Addresses, return Products to Retail Stores on certain Dates and Times, potentially
    influenced by Promotions, for various Return Reasons.
  table_name: stg_store_returns
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Date Dimensions
  - Household Demographics
  - Promotions
  - Return Reasons
  - Time Dimensions
  - Products
  - Retail Stores
- relation_name: WebSalesTransaction
  relation_description: Customers place orders for Products through Websites, selecting
    Web Pages and Promotions. Orders are shipped from Warehouses via Shipping Modes
    to Customer Addresses. Customer Demographics and Household Demographics influence
    purchasing behavior.
  table_name: stg_web_sales
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Household Demographics
  - Promotions
  - Shipping Modes
  - Warehouses
  - Products
  - Web Pages
  - Websites
- relation_name: WebReturnTransactions
  relation_description: Customers, identified by demographics and addresses, return
    Products through Web Pages on specific Dates and Times, citing Return Reasons,
    resulting in financial adjustments recorded in detail.
  table_name: stg_web_returns
  entities:
  - Customers
  - Customer Addresses
  - Customer Demographics
  - Date Dimensions
  - Household Demographics
  - Return Reasons
  - Time Dimensions
  - Products
  - Web Pages
- relation_name: WarehouseProductInventory
  relation_description: This tracks the quantity of Products stored in Warehouses
    at specific dates, representing inventory levels across locations and time.
  table_name: stg_inventory
  entities:
  - Warehouses
  - Products
story:
- relation_name: CustomerProfileAssociation
  story_line: Customers register profiles with addresses and demographic information.
- relation_name: HouseholdIncomeBandAssociation
  story_line: System categorizes households into specific income bands.
- relation_name: WebSalesTransaction
  story_line: Customers order products online from promotional web pages.
- relation_name: CatalogSalesTransactions
  story_line: Customers place orders from catalog pages via call centers.
- relation_name: StoreSalesTransaction
  story_line: Customers purchase products in-store, influenced by ongoing promotions.
- relation_name: WebReturnTransactions
  story_line: Customers initiate online returns, citing specific reasons.
- relation_name: CatalogReturnTransactions
  story_line: Customers return catalog items through designated call centers.
- relation_name: StoreItemReturns
  story_line: Customers return products to physical retail stores.
- relation_name: WarehouseProductInventory
  story_line: System updates product inventory levels across warehouse locations.