File tree Expand file tree Collapse file tree 4 files changed +18
-8
lines changed Expand file tree Collapse file tree 4 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,10 @@ include: "/views/*"
33
44explore: pages {
55 description: "Page views for Hubble landing page"
6+
7+ join: users {
8+ type: left_outer
9+ relationship: many_to_one
10+ sql_on: ${users.id} = ${pages.user_id} ;;
11+ }
612}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ view: pages {
3939 description: "The page path. Everything after https://gethubble.io."
4040 }
4141
42- dimension: Unique page view id {
42+ dimension: unique_page_view_id {
4343 type: string
4444 sql: ${TABLE}.id ;;
4545 description: "The primary key for this table"
@@ -51,18 +51,25 @@ view: pages {
5151 description: "Website domain of the referrer. e.g. google.com"
5252 }
5353
54- measure: Total page views {
54+ dimension: user_id {
55+ type: string
56+ sql: ${TABLE}.user_id ;;
57+ description: "persistent id of the user viewing the page"
58+ }
59+
60+ measure: total_page_views {
5561 type: count
5662 sql: ${TABLE}.id ;;
5763 description: "Count of The primary key for this table"
5864 }
5965
60- measure: Blog views {
66+ measure: blog_views {
6167 type: count
6268 sql: ${TABLE}.id ;;
6369 description: "Count of The primary key for this table"
6470 filters: [
6571 path: "/blog%",
6672 ]
73+ value_format_name: decimal_0
6774 }
6875}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ models:
2222
2323 # Optional - override the dimension name for this column
2424 dimension :
25- name : Unique page view id
25+ name : unique_page_view_id
2626 value_format_name : id # Optional - specify a format for a dimension
2727
2828 # Optional - add measures based on this column
@@ -47,7 +47,7 @@ models:
4747 # Optionally - specify how other models join to this table and an explore will be generated
4848 meta :
4949 joins :
50- - name : users # Reference another dbt model to join to
50+ - join : users # Reference another dbt model to join to
5151 sql_on : " ${users.id} = ${pages.user_id}" # Sql string containing join clause
5252 type : left_outer # Optional - left_outer is default
5353 relationship : many_to_one # Optional - many_to_one is default
You can’t perform that action at this time.
0 commit comments