Skip to content

Commit d041933

Browse files
author
Callum McCann
committed
upgrading to 1.3
1 parent 88ffd2d commit d041933

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

models/marts/average_order_amount.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metrics:
55
model: ref('orders')
66
description: "The average size of a jaffle order"
77

8-
type: average
9-
sql: amount
8+
calculation_method: average
9+
expression: amount
1010

1111
timestamp: order_date
1212
time_grains: [day, week, month]

models/marts/example_develop_metric.sql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metrics:
66
label: Total Discount ($)
77
timestamp: order_date
88
time_grains: [day, week, month]
9-
type: average
10-
sql: amount
9+
calculation_method: average
10+
expression: amount
1111
dimensions:
1212
- had_discount
1313
- order_country
@@ -17,6 +17,7 @@ metrics:
1717
select *
1818
from {{ metrics.develop(
1919
develop_yml=my_metric_yml,
20-
grain='month'
20+
grain='month',
21+
metric_list=['develop_metric']
2122
)
2223
}}

models/marts/expenses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metrics:
66
model: ref('orders')
77
description: "The total expenses of our jaffle business"
88

9-
type: sum
10-
sql: amount / 4
9+
calculation_method: sum
10+
expression: amount / 4
1111

1212
timestamp: order_date
1313
time_grains: [day, week, month, year]

models/marts/profit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metrics:
55
label: Profit
66
description: "The total money we get to take home from our jaffle business"
77

8-
type: expression
9-
sql: "{{metric('revenue')}} - {{metric('expenses')}}"
8+
calculation_method: derived
9+
expression: "{{metric('revenue')}} - {{metric('expenses')}}"
1010

1111
timestamp: order_date
1212
time_grains: [hour, day, week, month, year]

models/marts/revenue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metrics:
66
model: ref('orders')
77
description: "The total revenue of our jaffle business"
88

9-
type: sum
10-
sql: amount
9+
calculation_method: sum
10+
expression: amount
1111

1212
timestamp: order_date
1313
time_grains: [day, week, month, year]

packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
packages:
22
- package: dbt-labs/metrics
3-
version: [">=0.3.0", "<0.4.0"]
3+
version: [">=1.3.0-rc1", "<1.4.0"]
44

55
- package: dbt-labs/dbt_utils
6-
version: 0.8.4
6+
version: [">=0.9.0", "<1.0.0"]

0 commit comments

Comments
 (0)