Skip to content

Commit 1bc30f2

Browse files
committed
fix example
1 parent 1c86a6a commit 1bc30f2

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

example/lookml/hubble_analytics.model renamed to example/lookml/pages.model

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,10 @@ include: "/views/*"
33

44
explore: 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
}

example/lookml/views/events.view

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/lookml/views/pages.view

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

example/models/prod/pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)