Skip to content

Commit dc4387b

Browse files
adding pricing_data table to dbt
1 parent 519a3cf commit dc4387b

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

card_data/pipelines/defs/transformation/transform_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def get_asset_key(self, dbt_resource_props):
1515
source_mapping = {
1616
"series": "quality_checks_series",
1717
"sets": "load_set_data",
18-
"cards": "load_card_data"
18+
"cards": "load_card_data",
19+
"pricing_data": "load_pricing_data",
1920
}
2021
if name in source_mapping:
2122
return dg.AssetKey([source_mapping[name]])
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{ config(
2+
materialized='table',
3+
post_hook="{{ enable_rls() }}"
4+
) }}
5+
6+
SELECT name, card_number, market_price
7+
FROM {{ source('staging', 'pricing_data') }}

card_data/pipelines/poke_cli_dbt/models/sources.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,16 @@ sources:
9292
- name: attack_2_effect
9393
description: "Second attack effect"
9494
- name: attack_2_cost
95-
description: "Second attack energy cost"
95+
description: "Second attack energy cost"
96+
97+
- name: pricing_data
98+
description: "Card pricing data"
99+
columns:
100+
- name: product_id
101+
description: "Product ID"
102+
- name: name
103+
description: "Card name"
104+
- name: card_number
105+
description: "Card number"
106+
- name: market_price
107+
description: "Market price"

0 commit comments

Comments
 (0)