Model Management Flashcards
What are the key types of files in a looker project?
Model files, view files and other files
Other files include: manifest file, read_me files, tests, dashboards, spec files (data_groups)
What are the 3 main components of a view?
Data source, dimensions, and measures.
Additional components include, source, filters, templated filters, parameters, and field sets
What are the 3 main components of a model?
A model file specifies a database connection and the set of Explores that use that connection. A model file also defines the Explores themselves and their relationships to other views.
[connection, file path for look files and explores]
In our projects the file paths generally include
- data_groups
- view names
- manifest files
- sometimes explores are included as their own files in a project but must be referenced in the explore
How is git used to back up Looker Info?
Each project is its on repository (repo). Users check out their own branch. Depending on team structure you can have pull requests that must be approved by other team members
In a model what parameter is used to select the file paths for a project, explore ect.
include: “filepath/*”
Example Include : “*.view.lkml”
What is an explore and where do they generally live in a project?
An explore normally lives in a model lkml file.
An explore is a collection of data and how users will create looks and dashboards.
Name the 7 Key types (groups) of parameters for an explore
Structural Parameters
- Extensions
- Fields
- Tags (what are these?)
Display Parameters
- name
- description
- display group
Filter Parameters
- access filters
- always filter
- case_sensitive (how does this work?)
- conditionally_filter (What is this?)
- sql_always_having
- sql_always_where
Join Parameters (Between Views)
- Left
- Always join
Query Parameters
- TBD (learn more here)
Aggregate Table Parameters
- aggregate_table:table_name
- query
- materialization
Refinement Parameters
- explore: +base_explore{}
Explore parameters:
This parameter allows you to build upon the content and settings from another Explore, using the other Explore as a starting point
Parameter Name: Extends
Parameter Group: Structural Parameters
Example Code:
Explore: example {
extends: [explore1, explore2, …]
}
- Note in the base explore you must define a view_name. This is what you will reference in the extends parameter
https: //docs.looker.com/reference/explore-params/extends
Explore parameters:
This parameter forces the explore to be a library code. To use anything in this explore you will need to create a new explore that extends this base explore
Parameter Name: Extends
extension: required
Parameter Group: Structural Parameters
Example Code
Explore: example_explore {
extension: required
}
Explore parameters:
This is the parameter you can select to chose the base view for an explore. If this parameter is not included the default value for this parameter will be the name of the explore
Parameter Name: From
Parameter Group: Structural Parameters
Example code:
explore: explore_name {
from: view_name
}
Note for performance it is best to start at the lowest level of granularity. Goal is as many to one joins as possible in an explore for speed.
Explore parameters:
This is a specific set of fields that you want to include in the explore.
Bonus: what is the default value of this parameter?
Parameter Name: Fields
Parameter Group: Structural Parameters
Example Code:
explore: explore_name {
fields:[field_names, -joined_view_name.unwanted_field]
}
BONUS:
Default is ALL_FIELDS*
Note All Caps and * required
Explore parameters:
These are a new meta data field you can use to add information to an explore. This information is not available in looker IDE, but can be accessed with an API call.
Parameter Name: Tags
Parameter Group: Structural Parameters
Example code:
explore: explore_name {
tags: [Tag1, Tag2]
}
Explore parameters:
This parameter is used to give users a brief explanation of your explore. Users can see this explanation when they mouse over the little i
Parameter name: description
Parameter group: Structural Parameters
Example code:
explore: example_explore {
description: “This is the most excellent explore you will ever use built by the best analyst in the Universe”
}
Explore parameters:
This parameter is used to hide an explore from looker’s IDE. This is very helpful when you are developing an explore or have an base explore (library code) that can only be used if extended
Parameter name: hidden
Parameter group: structural parameters
Example code:
explore: example_explore {
hidden: yes
}
Type: yes | no
Model parameters:
This parameter will set the name of the model. Note this can be helpful as the default grouping of the explore navigation menu is by model name
Parameter: label
Parameter group: display parameters
Example code:
connection: “snowflake”
include: “/*.lkml”
label: “best model ever”