Issue with the drilling example

Hi guys, I am new to looker and I was reading the documentation by the looker-on the Looker ML. I found an example of drilling as you can see in the picture. Unfortunately, the code given by the Looker doesn’t give the right output(the drilling items) if I click on the count field/measure.
Is it just me or is it actually an error?

you can access the example here:

Getting Started with LookML

This course will enable you to build and maintain standard Looker data models and establish the foundation necessary to learn Looker’s more advanced features.

I should get the order id , inventory id … but all i can see is the first name, last name and other fields that are actually not present in the drilling parameter.

0 1 327
1 REPLY 1

PaulM1
New Member

Can you show us the actual LookML from your View and Model?

It is hard to say without seeing the LookML in your Views and Models. But here are a few things to keep in mind.

Given the example:

view: sales_data {

  dimension: gross_sales {
    type: number
    sql: ${TABLE}."GROSS_SALES" ;;
  }

  measure: count {
    type: count
    drill_fields: [gross_sales, orders.id, inventory_items.product_name, users.id]
  }
}
  • As you can see, ‘gross_sales’ is a Dimension in the current ‘sales_data’ View.
  • ‘orders.id’ is a Dimension from a different View. ‘id’ is the name of the Dimension, and ‘orders’ is the name of the Join in your Model file. NOTE: Anytime you use a dot to reference a Dimension name, you are telling Looker that Dimension is coming in from a different View file.
  • Likewise, ‘inventory_items’ and ‘users’ are also different Views that were Joined in the Model file. And ‘product_name’ and ‘id’ are names of Dimensions in those respective Views.

Example of Model LookML for this:

explore: sales_data {

  join: orders {
    relationship: one_to_one
    type: inner
    sql_on: ${sales_data.order_key} = ${orders.order_key} ;;
  }

  join: inventory_items {
    relationship: one_to_many
    type: inner
    sql_on: ${sales_data.inventory_key} = ${inventory_items.inventory_key} ;;
  }

  join: users {
    relationship: one_to_one
    type: inner
    sql_on: ${sales_data.user_key} = ${users.order_key} ;;
  }

So, if you want Dimensions from other Views to be available, the Views must be Joined similar to this example.

Top Labels in this Space
Top Solution Authors