Skip to content

Commit

Permalink
Merge branch 'main' into update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joellabes authored Jan 13, 2025
2 parents 1474e7b + 3ecc6cb commit 882e4c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .sqlfluff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[sqlfluff]
templater = dbt
templater = dbt-cloud
dialect = snowflake
runaway_limit = 10
max_line_length = 80
Expand Down
4 changes: 4 additions & 0 deletions macros/cents_to_dollars.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
{% macro bigquery__cents_to_dollars(column_name) %}
round(cast(({{ column_name }} / 100) as numeric), 2)
{% endmacro %}

{% macro fabric__cents_to_dollars(column_name) %}
cast({{ column_name }} / 100 as numeric(16,2))
{% endmacro %}
4 changes: 2 additions & 2 deletions models/marts/order_items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ semantic_models:
- name: food_revenue
description: The revenue generated for each order item. Revenue is calculated as a sum of revenue associated with each product in an order.
agg: sum
expr: case when is_food_item = 1 then product_price else 0 end
expr: case when is_food_item is true then product_price else 0 end
- name: drink_revenue
description: The revenue generated for each order item. Revenue is calculated as a sum of revenue associated with each product in an order.
agg: sum
expr: case when is_drink_item = 1 then product_price else 0 end
expr: case when is_drink_item is true then product_price else 0 end
- name: median_revenue
description: The median revenue generated for each order item.
agg: median
Expand Down
6 changes: 3 additions & 3 deletions package-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ packages:
version: 1.1.1
- package: calogica/dbt_date
version: 0.10.0
- package: dbt-labs/audit_helper
version: 0.12.0
sha1_hash: 974021e878d1894c35a21fb44fb0b6bd04f07078
- git: https://github.com/dbt-labs/dbt-audit-helper.git
revision: 74072850a5bccd90235576d67530c98e3b7437f4
sha1_hash: da0d5b1d5a48f6504805f6b1d5a0b2f9f233f34c

0 comments on commit 882e4c8

Please sign in to comment.