the-data-base / nhl-data

Repo for version control the dbt transformations on nhl-breakouts data
5 stars 0 forks source link

Hotfix/update liveplays #43

Closed gavh3 closed 2 years ago

gavh3 commented 2 years ago

Overview

Using gameid eventidx and playerid does not guarantee uniqueness across live play IDs. This is because sometimes the same player can be listed twice in the same event when the event type = PENALTY

For example:

Justin Williams Roughing against Tomas Tatar served by Justin Williams

Justin Williams is listed twice, each time with a different player_role: PENALTYON and SERVEDBY.

Therefore, we need to add player_role as part of the surrogate key for stg_nhl__live_plays

Changes

Other notes

Checks