Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .gitkeep
Empty file.
6 changes: 3 additions & 3 deletions ci_enablement.model.lkml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
connection: "bq_faa"
connection: "sample_bigquery_connection"

include: "/views/dimensions/dim_products.view.lkml"
include: "/views/dimensions/dim_users.view.lkml"
Expand Down Expand Up @@ -39,7 +39,7 @@ test: orders_items_2021 {
filters: [order_items.created_year: "2021"]
}
assert: matches_historic_lower_bound {
expression: ${order_items.count_order_items} > 13000 ;;
expression: ${order_items.count_order_items} > 10000 ;;
}
assert: matches_historic_upper_bound {
expression: ${order_items.count_order_items} < 14000 ;;
Expand All @@ -54,7 +54,7 @@ test: orders_items_2020 {
filters: [order_items.created_year: "2020"]
}
assert: matches_historic_lower_bound {
expression: ${order_items.count_order_items} > 7000 ;;
expression: ${order_items.count_order_items} > 5000 ;;
}
assert: matches_historic_upper_bound {
expression: ${order_items.count_order_items} < 8000 ;;
Expand Down
17 changes: 16 additions & 1 deletion views/facts/fct_order_items.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@ view: fct_order_items {

# Step 1: Update id -> order_item_id

dimension: id {
dimension: order_item_id {
primary_key: yes
type: number
sql: ${TABLE}.id ;;
}

dimension_group: delivered {
type: time
description: "The date/timestamp the line item was created."
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.delivered ;;
}

dimension_group: created {
type: time
description: "The date/timestamp the line item was created."
Expand Down