Skip to content

Commit ae2e713

Browse files
committed
Add ETL exercise canonical data
1 parent 60ae1d7 commit ae2e713

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

exercises/etl/canonical-data.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"transform": {
3+
"description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter",
4+
"cases": [
5+
{
6+
"description": "a single letter",
7+
"input": {
8+
"1": ["A"]
9+
},
10+
"expected": {
11+
"a" : 1
12+
}
13+
},
14+
{
15+
"description": "single score with multiple letters",
16+
"input": {
17+
"1": ["A", "E", "I", "O", "U" ]
18+
},
19+
"expected": {
20+
"a" : 1,
21+
"e" : 1,
22+
"i" : 1,
23+
"o" : 1,
24+
"u" : 1
25+
}
26+
},
27+
{
28+
"description": "multiple scores with multiple letters",
29+
"input": {
30+
"1": ["A", "E"],
31+
"2": ["D", "G"]
32+
},
33+
"expected": {
34+
"a" : 1,
35+
"e" : 1,
36+
"d" : 2,
37+
"g" : 2
38+
}
39+
},
40+
{
41+
"description": "multiple scores with differing numbers of letters",
42+
"input": {
43+
"1": [ "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" ],
44+
"2": [ "D", "G" ],
45+
"3": [ "B", "C", "M", "P" ],
46+
"4": [ "F", "H", "V", "W", "Y" ],
47+
"5": [ "K" ],
48+
"8": [ "J", "X" ],
49+
"10": [ "Q", "Z" ]
50+
},
51+
"expected": {
52+
"a": 1, "b": 3, "c": 3, "d": 2, "e": 1,
53+
"f": 4, "g": 2, "h": 4, "i": 1, "j": 8,
54+
"k": 5, "l": 1, "m": 3, "n": 1, "o": 1,
55+
"p": 3, "q": 10, "r": 1, "s": 1, "t": 1,
56+
"u": 1, "v": 4, "w": 4, "x": 8, "y": 4,
57+
"z": 10
58+
}
59+
}
60+
]
61+
}
62+
}

0 commit comments

Comments
 (0)