Skip to content

Commit fc64099

Browse files
updating dagster definitions and dbt sources to include standings table (#249)
1 parent 2d30554 commit fc64099

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

card_data/pipelines/definitions.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
import dagster as dg
66

7+
from .defs.extract.limitless.extract_standings import create_standings_dataframe
78
from .defs.extract.tcgcsv.extract_pricing import build_dataframe
89
from .defs.extract.tcgdex.extract_sets import extract_sets_data
910
from .defs.extract.tcgdex.extract_series import extract_series_data
11+
from .defs.load.limitless.load_standings import load_standings_data
1012
from .defs.load.tcgcsv.load_pricing import load_pricing_data, data_quality_checks_on_pricing
1113
from .defs.load.tcgdex.load_sets import load_sets_data, data_quality_check_on_sets
1214
from .defs.load.tcgdex.load_series import load_series_data, data_quality_check_on_series
@@ -17,7 +19,7 @@
1719
def defs() -> dg.Definitions:
1820
# load_from_defs_folder discovers dbt assets from transform_data.py
1921
folder_defs: dg.Definitions = load_from_defs_folder(project_root=Path(__file__).parent.parent)
20-
return dg.Definitions.merge(folder_defs, defs_discord_sensors, defs_pricing, defs_sets, defs_series)
22+
return dg.Definitions.merge(folder_defs, defs_discord_sensors, defs_pricing, defs_sets, defs_series, defs_standings)
2123

2224

2325
defs_discord_sensors: dg.Definitions = dg.Definitions(
@@ -63,4 +65,15 @@ def defs() -> dg.Definitions:
6365
defs_sets: dg.Definitions = dg.Definitions(
6466
assets=[extract_sets_data, load_sets_data, data_quality_check_on_sets],
6567
jobs=[sets_pipeline],
68+
)
69+
70+
# Standings pipeline job
71+
standings_pipeline = dg.define_asset_job(
72+
name="standings_pipeline_job",
73+
selection=dg.AssetSelection.assets(create_standings_dataframe).downstream(include_self=True),
74+
)
75+
76+
defs_standings: dg.Definitions = dg.Definitions(
77+
assets=[create_standings_dataframe, load_standings_data],
78+
jobs=[standings_pipeline],
6679
)

card_data/pipelines/poke_cli_dbt/models/sources.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ sources:
102102
- name: attack_3_cost
103103
description: "Third attack energy cost"
104104

105+
- name: standings
106+
description: "Tournament standings data"
107+
108+
- name: tournaments
109+
description: "Tournament metadata"
110+
111+
- name: country_codes
112+
description: "Country code to country name mapping"
113+
105114
- name: pricing_data
106115
description: "Card pricing data"
107116
meta:

0 commit comments

Comments
 (0)