1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation in Snowflake

Connected

Exercise

Validating data quality

Data isn't always very clean. Both the composer field in the track table and the name in the artist table contain information about a song's author. You'd like to validate the data quality in these fields for each track. To do this, you'll use a CASE statement and the columns from JOIN'ed tables. Go get 'em.

Instructions

100 XP
  • When the track.composer field is NULL, then label as 'Track Lacks Detail'.
  • If the track.composer field matches the artist.name, then return 'Matching Artist'.
  • Finally, LEFT JOIN the artist table to album using the field artist_id; note that track and album have already been joined for you.
Powered by Snowflake