├── 2.4 Filtering Explores with LookML.txt ├── 2.1 Looker Developer - Qwik Start.txt ├── 2.2 Creating Measures and Dimensions Using LookML.txt ├── 2.3 Creating Derived Tables Using LookML.txt ├── README.md └── 2.5 Build LookML Objects in Looker Challenge Lab.txt /2.4 Filtering Explores with LookML.txt: -------------------------------------------------------------------------------- 1 | Build LookML Objects in Looker: GSP892 Filtering Explores with LookML solution 2.4 2 | https://youtu.be/-yihq488qbc 3 | 4 | 5 | Guide to discover Google Cloud training 6 | Google Cloud Skills Boost 7 | https://www.cloudskillsboost.google/quests/187 8 | https://www.qwiklabs.com/quests/187 9 | Qwiklabs GSP892 Tutorial answer 10 | 11 | Build LookML Objects in Looker: Filtering Explores with LookML GSP892 12 | ⏱ Timestamps ⏱ 13 | ├ 00:00 Start Lab 14 | ├ 00:24 Log in to Looker 15 | ├ 01:52 Task 1. Add an always_filter 16 | ├ 04:25 Task 2. Add a sql_always_where filter 17 | ├ 06:20 Task 3. Add a sql_always_having filter 18 | ├ 07:50 Task 4. Add a conditionality_filter 19 | ├ 10:40 Completed! 20 | 21 | 22 | 23 | *** View all tutorial videos *** 24 | https://github.com/JNYH/Build_LookML_Objects_in_Looker 25 | -------------------------------------------------------------------------------- /2.1 Looker Developer - Qwik Start.txt: -------------------------------------------------------------------------------- 1 | Build LookML Objects in Looker: GSP891 Looker Developer - Qwik Start solution 2.1 2 | https://youtu.be/7aKpeAu-IoM 3 | 4 | 5 | Guide to discover Google Cloud training 6 | Google Cloud Skills Boost 7 | https://www.cloudskillsboost.google/quests/187 8 | https://www.qwiklabs.com/quests/187 9 | Qwiklabs GSP891 Tutorial answer 10 | 11 | Build LookML Objects in Looker: Looker Developer - Qwik Start GSP891 12 | ⏱ Timestamps ⏱ 13 | ├ 00:00 Start Lab 14 | ├ 00:23 Log in to Looker 15 | ├ 00:59 Task 1. Create a View 16 | ├─ 01:53 Add some dimensions and measures 17 | ├─ 02:31 Commit changes and deploy to production 18 | ├ 02:56 Task 2. Join a View to an existing Explore 19 | ├─ 04:57 Commit changes and deploy to production 20 | ├ 05:18 Completed! 21 | 22 | 23 | 24 | *** View all tutorial videos *** 25 | https://github.com/JNYH/Build_LookML_Objects_in_Looker 26 | -------------------------------------------------------------------------------- /2.2 Creating Measures and Dimensions Using LookML.txt: -------------------------------------------------------------------------------- 1 | Build LookML Objects in Looker: GSP890 Creating Measures and Dimensions Using LookML solution 2.2 2 | https://youtu.be/hAp4gz16Jbw 3 | 4 | 5 | Guide to discover Google Cloud training 6 | Google Cloud Skills Boost 7 | https://www.cloudskillsboost.google/quests/187 8 | https://www.qwiklabs.com/quests/187 9 | Qwiklabs GSP890 Tutorial answer 10 | 11 | Build LookML Objects in Looker: Creating Measures and Dimensions Using LookML GSP890 12 | ⏱ Timestamps ⏱ 13 | ├ 00:00 Start Lab 14 | ├ 00:26 Log in to Looker 15 | ├ 01:06 Task 1. Creating dimensions 16 | ├─ 01:11 Create a new dimension for age group tiers 17 | ├─ 03:59 Create a new dimension for email source 18 | ├─ 05:58 Create a new dimension for shipping days 19 | ├ 08:48 Task 2. Creating measures 20 | ├─ 08:54 Create a measure of the distinct number of orders 21 | ├─ 11:02 Create a total sales measure 22 | ├ 13:14 Task 3. Creating advanced measures 23 | ├─ 13:17 Create a filtered measure of the total sales for only the users who came to the website via the email traffic source 24 | ├─ 15:07 Create a measure for the percentage of sales that are attributed to users coming from the email traffic source 25 | ├ 17:06 Completed! 26 | 27 | 28 | 29 | *** View all tutorial videos *** 30 | https://github.com/JNYH/Build_LookML_Objects_in_Looker 31 | -------------------------------------------------------------------------------- /2.3 Creating Derived Tables Using LookML.txt: -------------------------------------------------------------------------------- 1 | Build LookML Objects in Looker: GSP858 Creating Derived Tables Using LookML solution 2.3 2 | https://youtu.be/fPU0fQHcmhk 3 | 4 | 5 | Guide to discover Google Cloud training 6 | Google Cloud Skills Boost 7 | https://www.cloudskillsboost.google/quests/187 8 | https://www.qwiklabs.com/quests/187 9 | Qwiklabs GSP858 Tutorial answer 10 | 11 | Build LookML Objects in Looker: Creating Derived Tables Using LookML GSP858 12 | ⏱ Timestamps ⏱ 13 | ├ 00:00 Start Lab 14 | ├ 00:22 Log in to Looker 15 | ├ 00:56 Task 1. Create a SQL derived table summarizing details for each order 16 | ├─ 01:03 Define a new derived table using a SQL query 17 | ├─ 01:55 Create a new view file for the SQL derived table 18 | ├ 04:11 Task 2. Create a native derived table summarizing details for each order 19 | ├─ 04:17 Define a new native derived table from an Explore query 20 | ├─ 05:50 Create a new view file for the native derived table 21 | ├ 07:53 Task 3. Join a new view to an Explore 22 | ├─ 07:56 Join the view for the SQL derived table 23 | ├─ 08:53 Review the data and generated SQL from the SQL derived table in the Explore 24 | ├ 10:36 Task 4. Persist a derived table 25 | ├─ 10:41 Persist the native derived table 26 | ├─ 11:38 Review the generated SQL for the persistent derived table in the Explore 27 | ├ 12:49 Completed! 28 | 29 | 30 | 31 | *** View all tutorial videos *** 32 | https://github.com/JNYH/Build_LookML_Objects_in_Looker 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Build_LookML_Objects_in_Looker 2 | Earn a skill badge by completing the Build LookML Objects in Looker quest, where you will learn how to do the following: design/build new dimensions and measures, views, and derived tables, set measure filters and types based on requirements, update dimensions and measures (change names, use aliases), build and refine Explores, join views to existing Explores, and decide which LookML objects to create based on business requirements. 3 | 4 | A skill badge is an exclusive digital badge issued by Google Cloud in recognition of your proficiency with Google Cloud products and services and tests your ability to apply your knowledge in an interactive hands-on environment. Complete this skill badge quest and the final assessment challenge lab to receive a skill badge that you can share with your network. 5 | 6 | Looker is a modern data platform in Google Cloud that lets you analyze and visualize your data interactively. You can use Looker to do in-depth data analysis, integrate insights across different data sources, build actionable data-driven workflows, and create custom data applications. 7 | 8 | 9 | ## What is LookML? 10 | LookML (Looker Modeling Language) generates abstracted SQL and provides a modeling layer between the database and user. It is Looker’s proprietary language that provides an abstraction layer for SQL databases. 11 | 12 | Specifically, LookML is a language for describing dimensions, aggregates, calculations, and data relationships in a SQL database. Looker uses a model written in LookML to construct SQL queries against a particular database. It creates the layer between that SQL database and how the business user interacts with it. 13 | 14 | As such, it defines many different things, like how to join tables, how to define custom tables, how to define fields from the database, and the logic for new fields. In this lab, you will get hands-on experience with the fundamentals of LookML. 15 | 16 | 17 | ## Tutorials in YouTube 18 | GSP891 Looker Developer - Qwik Start 19 | https://youtu.be/7aKpeAu-IoM 20 | 21 | GSP890 Creating Measures and Dimensions Using LookML 22 | https://youtu.be/hAp4gz16Jbw 23 | 24 | GSP858 Creating Derived Tables Using LookML 25 | https://youtu.be/fPU0fQHcmhk 26 | 27 | GSP892 Filtering Explores with LookML 28 | https://youtu.be/-yihq488qbc 29 | 30 | GSP361 Challenge Lab 31 | https://youtu.be/DP_oXW8MGcY 32 | -------------------------------------------------------------------------------- /2.5 Build LookML Objects in Looker Challenge Lab.txt: -------------------------------------------------------------------------------- 1 | Build LookML Objects in Looker: GSP361 Challenge Lab solution 2.5 2 | https://youtu.be/DP_oXW8MGcY 3 | 4 | 5 | Guide to discover Google Cloud training 6 | Google Cloud Skills Boost 7 | https://www.cloudskillsboost.google/quests/187 8 | https://www.qwiklabs.com/quests/187 9 | Qwiklabs GSP361 Tutorial answer 10 | 11 | Build LookML Objects in Looker: Challenge Lab GSP361 12 | ⏱ Timestamps ⏱ 13 | ├ 00:00 Start Lab 14 | ├ 00:10 Log in to Looker 15 | ├ 00:53 Task 1. Create dimensions and measures 16 | ├─ 02:53 Join the view to an Explore 17 | ├ 04:51 Task 2. Create a persistent derived table 18 | ├─ 04:58 Create a native derived table 19 | ├─ 08:30 Persist the derived table 20 | ├ 09:36 Task 3. Use Explore filters 21 | ├─ 09:53 Filter #1 22 | ├─ 10:35 Filter #2 23 | ├─ 11:57 Filter #3 24 | ├─ 12:49 Filter #4 25 | ├ 13:56 Task 4. Apply a datagroup to an Explore 26 | ├ 15:21 (*I think there is a bug here*) 27 | ├ 19:04 Completed! 28 | 29 | #### Task 1. Create dimensions and measures 30 | #### order_items_challenge.view 31 | # TODO: Add dimensions and measures here 32 | dimension: order_id { 33 | type: number 34 | sql: ${TABLE}.order_id ;; 35 | } 36 | dimension: is_search_source { 37 | type: yesno 38 | sql: ${users.traffic_source} = "Search" ;; 39 | } 40 | measure: sales_from_complete_search_users { 41 | type: sum 42 | sql: ${TABLE}.sale_price ;; 43 | filters: [is_search_source: "Yes", order_items.status: "Complete"] 44 | value_format_name: usd_0 45 | } 46 | measure: total_gross_margin { 47 | type: sum 48 | sql: ${TABLE}.sale_price - ${inventory_items.cost} ;; 49 | value_format_name: usd_0 50 | } 51 | dimension: return_days { 52 | type: number 53 | sql: DATE_DIFF(${order_items.delivered_date}, ${order_items.returned_date}, DAY) ;; 54 | } 55 | 56 | #### training_ecommerce.model 57 | explore: order_items { 58 | join: order_items_challenge { 59 | type: left_outer 60 | sql_on: ${order_items.order_id} = ${order_items_challenge.order_id} ;; 61 | relationship: many_to_one 62 | } 63 | 64 | #### Task 2. Create a persistent derived table 65 | #### training_ecommerce.model 66 | explore: order_items { 67 | join: user_details { 68 | type: left_outer 69 | sql_on: ${order_items.user_id} = ${user_details.user_id} ;; 70 | relationship: many_to_one 71 | } 72 | 73 | #### user_details.view 74 | view: user_details { 75 | derived_table: { 76 | explore_source: order_items { 77 | column: order_id {} 78 | column: user_id {} 79 | column: total_revenue {} 80 | column: age { field: users.age } 81 | column: city { field: users.city } 82 | column: state { field: users.state } 83 | } 84 | datagroup_trigger: training_ecommerce_default_datagroup #do NOT add this 85 | } 86 | 87 | #### training_ecommerce.model 88 | datagroup: training_ecommerce_default_datagroup { 89 | # sql_trigger: SELECT MAX(id) FROM etl_log;; 90 | max_cache_age: "2 hour" #change duration 91 | } 92 | 93 | #### Task 3. Use Explore filters 94 | #### note replace 'greater' with the greater symbol (not allowed in the text here) 95 | #### training_ecommerce.model 96 | # Filter #1 97 | explore: order_items { 98 | always_filter: { 99 | filters: [order_items.sale_price: "greater=104"] 100 | } 101 | # Filter #2 102 | explore: order_items { 103 | conditionally_filter: { 104 | filters: [order_items.shipped_date: "2018"] 105 | unless: [order_items.status, order_items.delivered_date] 106 | } 107 | # Filter #3 108 | explore: order_items { 109 | sql_always_having: ${average_sale_price} greater= 76 ;; 110 | 111 | # Filter #4 112 | explore: order_items { 113 | always_filter: { 114 | filters: [order_items.status: "Shipped", users.state: "California", users.traffic_source: "Search"] 115 | } 116 | 117 | #### Task 4. Apply a datagroup to an Explore 118 | #### training_ecommerce.model 119 | datagroup: order_items_challenge_datagroup { 120 | sql_trigger: SELECT MAX(order_item_id) from order_items ;; 121 | max_cache_age: "4 hour" 122 | } 123 | 124 | 125 | 126 | *** View all tutorial videos *** 127 | https://github.com/JNYH/Build_LookML_Objects_in_Looker 128 | --------------------------------------------------------------------------------