Skip to content

Commit

Permalink
Merge pull request #61 from TeoMeWhy/feat/dota
Browse files Browse the repository at this point in the history
Team matches
  • Loading branch information
TeoCalvo authored Aug 17, 2023
2 parents cd82867 + 5e0d9c7 commit 66ec4a8
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/03.silver/dota/etl/matches_teams.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
WITH tb_union AS (

SELECT match_id,
start_time,
radiant_team.*,
true flIsRadiant
FROM bronze.dota.matches

UNION ALL

SELECT match_id,
start_time,
dire_team.*,
false flIsRadiant
FROM bronze.dota.matches
),

tb_union_consolidate AS (

SELECT match_id AS idMatch,
from_unixtime(start_time) AS dtMatch,
team_id AS idTeam,
name AS descTeamName,
tag AS descTeamTag,
logo_url AS urlteamLogo,
flIsRadiant
FROM tb_union
WHERE team_id IS NOT NULL
ORDER BY match_id, flIsRadiant

)

SELECT *
FROM tb_union_consolidate
18 changes: 18 additions & 0 deletions src/06.workflows/data4u_dota.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@
"timeout_seconds": 0,
"email_notifications": {}
},
{
"task_key": "silver_matches_teams",
"depends_on": [
{
"task_key": "bronze_matches"
}
],
"notebook_task": {
"notebook_path": "src/03.silver/dota/ingestao",
"base_parameters": {
"table": "matches_teams"
},
"source": "GIT"
},
"existing_cluster_id": "0809-155233-nc569ju7",
"timeout_seconds": 0,
"email_notifications": {}
},
{
"task_key": "fs_players_30",
"depends_on": [
Expand Down

0 comments on commit 66ec4a8

Please sign in to comment.