Tags arrive as one comma-separated string per article, typed by hand. The warehouse wants them as a bridge table.
One row per article and tag, with the columns article_id and tag.
| article_id | tags |
|---|---|
| 1 | spark, sql ,python |
| 3 | a,,b, a |
| article_id | tag |
|---|---|
| 1 | spark |
| 1 | sql |
| 1 | python |
| 3 | a |
| 3 | b |
Delta, delta and DELTA are three different tags.articles| tags | article_id |
|---|---|
| spark, sql ,python | 1 |
| etl | 2 |
| article_id | tag |
|---|---|
| 1 | spark |
| 1 | sql |
| 1 | python |
| 2 | etl |
articles| tags | article_id |
|---|---|
| a,,b, a | 3 |
| 4 |
| article_id | tag |
|---|---|
| 3 | a |
| 3 | b |
Community-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.