|
| 1 | +# ETL |
| 2 | + |
| 3 | +We are going to do the `Transform` step of an Extract-Transform-Load. |
| 4 | + |
| 5 | +### ETL |
| 6 | + |
| 7 | +Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so |
| 8 | +we're going to migrate this." |
| 9 | + |
| 10 | +(Typically, this is followed by, "We're only going to need to run this |
| 11 | +once." That's then typically followed by much forehead slapping and |
| 12 | +moaning about how stupid we could possibly be.) |
| 13 | + |
| 14 | +### The goal |
| 15 | + |
| 16 | +We're going to extract some scrabble scores from a legacy system. |
| 17 | + |
| 18 | +The old system stored a list of letters per score: |
| 19 | + |
| 20 | +- 1 point: "A", "E", "I", "O", "U", "L", "N", "R", "S", "T", |
| 21 | +- 2 points: "D", "G", |
| 22 | +- 3 points: "B", "C", "M", "P", |
| 23 | +- 4 points: "F", "H", "V", "W", "Y", |
| 24 | +- 5 points: "K", |
| 25 | +- 8 points: "J", "X", |
| 26 | +- 10 points: "Q", "Z", |
| 27 | + |
| 28 | +The shiny new scrabble system instead stores the score per letter, which |
| 29 | +makes it much faster and easier to calculate the score for a word. It |
| 30 | +also stores the letters in lower-case regardless of the case of the |
| 31 | +input letters: |
| 32 | + |
| 33 | +- "a" is worth 1 point. |
| 34 | +- "b" is worth 3 points. |
| 35 | +- "c" is worth 3 points. |
| 36 | +- "d" is worth 2 points. |
| 37 | +- Etc. |
| 38 | + |
| 39 | +Your mission, should you choose to accept it, is to transform the legacy data |
| 40 | +format to the shiny new format. |
| 41 | + |
| 42 | +### Notes |
| 43 | + |
| 44 | +A final note about scoring, Scrabble is played around the world in a |
| 45 | +variety of languages, each with its own unique scoring table. For |
| 46 | +example, an "E" is scored at 2 in the Māori-language version of the |
| 47 | +game while being scored at 4 in the Hawaiian-language version. |
| 48 | + |
| 49 | +## Setup |
| 50 | + |
| 51 | +Go through the setup instructions for Javascript to install the necessary |
| 52 | +dependencies: |
| 53 | + |
| 54 | +[https://exercism.io/tracks/javascript/installation](https://exercism.io/tracks/javascript/installation) |
| 55 | + |
| 56 | +## Requirements |
| 57 | + |
| 58 | +Install assignment dependencies: |
| 59 | + |
| 60 | +```bash |
| 61 | +$ npm install |
| 62 | +``` |
| 63 | + |
| 64 | +## Making the test suite pass |
| 65 | + |
| 66 | +Execute the tests with: |
| 67 | + |
| 68 | +```bash |
| 69 | +$ npm test |
| 70 | +``` |
| 71 | + |
| 72 | +In the test suites all tests but the first have been skipped. |
| 73 | + |
| 74 | +Once you get a test passing, you can enable the next one by changing `xtest` to |
| 75 | +`test`. |
| 76 | + |
| 77 | +## Source |
| 78 | + |
| 79 | +The Jumpstart Lab team [http://jumpstartlab.com](http://jumpstartlab.com) |
| 80 | + |
| 81 | +## Submitting Incomplete Solutions |
| 82 | + |
| 83 | +It's possible to submit an incomplete solution so you can see how others have |
| 84 | +completed the exercise. |
0 commit comments