LookML Flashcards

1
Q

What are the three types of files a LookML Project contains?

A
  • Models
  • Views
  • LookML dashboards
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In what file type are “Explores” defined.

A

Models

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What 5 types of fields can a view contain

A
  • Dimensions
  • Measures
  • Parameters
  • Filters
  • Field Sets
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe the difference between an “object” and a “file”

A

A file ends with .lkml or .lookml

An object is something defined with code (e.g., “view: foo {}”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

There are object models? T / F

A

False. There are only model files, unlike views, which can be a file or an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Should an include refer to the object name or the file name?

A

File name. E.g., “include: /views/your_mommas.view.lkml”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is every file in Looker completely separate from the files?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Are there cases where it’s acceptable to have a view not match the file name?

A

Yes. For example, if we want to include a group of files, we may include the group name. E.g.,

view_name = "bobs"
view_file_name = "people.bobs.view.lkml"
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens if you include a model inside another model?

A

The LookML validator will throw an error about the connection being defined twice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two things “Explore” refers to in Looker?

A
  1. An “explore” is a LookML object that lives inside a model file. E.g., “explore: bobs_burgers {}”
  2. An “explore” is an interactive page where the standard user can SQL queries by clicking on fields in the UI.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the reason you don’t want to make your explore (object) contain too many views? What is the reason you don’t want to break explores apart too much? (too few views)

A

The user will be overwhelmed by the number of fields and options inside an Explore.

If you make Explores for every view, the user will be overwhelmed knowing what Explore to choose.

Balance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Should you join a view you -think- you may need?

A

No. Only join what you will use. This saves clutter in the UI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between a “model” and “project”?

A

Models are LookML files that contain Explores Projects are collections of LookML files. A Project “owns” a model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Can a project contain multiple models?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Is the following valid SQL for a measure?

${orders.total} + ${bakesales.total}

Assuming both of these fields are measures of type: sum.

A

Yes. If the measure wrapping them is type: number. This tells Looker to add these fields, but not to aggregate them (i.e., not include the field in the GROUP BY).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

If you add a measure as a filter and set it to > 0, what appears in the SQL to fulfill the filter?

A

Something like,

HAVING field_name > 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

When you make a change in development mode, what other users can see this change?

A

None. Unless they sudo you.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

If you change the “Project Settings” in development mode, which users are impacted?

A

All users. The “Project Settings” impact the entire project–not just your development branch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Is “Production Mode” LookML read-only? T / F

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What happens if you have a view which extends another view, neither view has an sql_table_name defined?

A

The LookML parser assumes the table name matches the view name. If it does not, it will through a DB error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

dimension: view:, type:, sql: are all examples of what?

A

LookML parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The ${} is referred to as what?

A

Substitution syntax. It replaces anything inside ${} with a corresponding object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the purpose of using substitution syntax?

A

Reduces the number of changes which need to be made throughout a model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Why is it important to use the substitution operator? I.e., ${}?

A
  1. It makes LookML code more reusable.
  2. It simplifies code maintenance.
  3. It removes the need for the same SQL code to be written multiple places (DRY).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What does ${TABLE} become?

A

The table defined in the sql_table_name. Or, the name of the view if the sql_table_name parameter is not defined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

If you create a dimension_group called “start” with the type “time” and timeframes [raw, time, date, month, year], how would you refer to the month?

A

${start_month}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

If you create a dimension_group called “start” with the type “time” and timeframes [raw, time, date, month, year], which of these fields would not show in the UI?

A

${start_raw} would not show in the UI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

T / F – A dimension_group of type: time automatically adjust for user’s timezone?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What are the required parameters of a dimension_group of type: duration? (other than the type).

A
  • sql_start:
  • sql_end:
  • intervals: []
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Given the following dimension_group:

dimension_group: created {
    type: duration
    interval: [
       day,
       week,
       month,
       year
    ]
   sql_start: ${created_date}
   sql_end: ${created_date}
}

How would you refer to the number of days in a custom filter?

A

The interval part goes first:

${days_created}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Consider the following dimension:

dimension: in_house {
type: yesno
sql: ${TABLE}. in_house ;;
}

What will show in the UI when

  1. in_house = 1
  2. in_house is NULL
  3. in_house = “no”
  4. in_house = 0
A
  1. in_house = “Yes”
  2. in_house = “No”
  3. in_house = “Yes”
  4. in_house = “No”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Consider the following dimension:

dimension: age_tier {
type: tier
tiers: [0, 30, 50]
sql: ${TABLE}. age ;;
}

What is the category label for someone

  1. ${TABLE}. age = -1
  2. ${TABLE}. age = 30
  3. ${TABLE}. age = 49
  4. ${TABLE}. age = 55
A
  1. “Below 0”
  2. “31 to 49”
  3. “31 to 49”
  4. “50 or Above”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Consider the following dimension:

dimension: age_tier {
type: tier
tiers: [0, 30, 50]
sql: ${TABLE}. age ;;
}

What parameter and value should be added to have the values show as numbers?

A

style: integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Consider the following dimension:

dimension: age_tier {
type: tier
tiers: [0, 30, 50]
sql: ${TABLE}. age ;;
}

Could you add both a style and value_format parameters?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are the 5 built in map_layers which Looker provides?

A
  • countries
  • uk_postcode_areas
  • us_states
  • us_counties_fips
  • us_zipcode_tabulation_area
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What are the required parameters for a dimension of type: location?

A
  • sql_latitude

* sql_longitude

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What format does a custom map layer file need to be in?

A

TopoJSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

If no type is provided to a dimension, what type will it be?

A

String.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

You have a sale_price dimension and a cost dimension. If you wanted to create a profit dimension that subtracts cost from sale_price, what type would you specify for this new dimension?

A

number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

When should a type: count_distinct be used on a measure?

A

When counting a unique field which is not the primary key in a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

What is wrong with this measure definition:

measure: order_items {
type: count
sql: ${order_items} ;;
}

A

The measure does not need to include sql: parameter, as the primary key will be used to perform a count.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

What is wrong with this measure definition:

measure: order_items {
type: count_distinct
}

A

A measure of type count_distinct must include a sql: parameter, as it will be used to perform the distinct count.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

What are the 4 types of formatting for the value_format_name parameter?

A
  • ID (id)
  • Decimal (decimal_0, decimal_1, decimal_2, decimal_3, decimal_4)
  • Currency (usd, usd_0, gbp_0, gbp, eur, etc.)
  • Percents (percent_0, percent_1, etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

T / F – Can a user access this dimension?

dimension: order_id {
hidden: yes
sql: ${order_id} ;;
}

A

Yes. The “hidden:” parameter only impacts whether the field will show in the UI, it is still accessible in custom filters, custom dimensions, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

How many database connection can a model file have?

A

One.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

T / F – Looker production mode is read-only

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What is the keyboard shortcut for toggling dev mode?

A

CMD / CTRL + SHIFT + D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What are the two things a model file defines?

A
  1. Database connection

2. Explores

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

What is one of the primary advantages of LookML dashboards?

A

They are defined LookML and therefore version controlled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

How do you define navigation in a Looker document file

A
At the front matter of the document use YAML to define it as a navigation enabled document.
---
navigation:
  - document_one
  - document: document_two
    label: Customized Label for Document Two
  - section: My Section Name
  - document_three
---
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

What all can be defined in a manifest file?

A
  • project imports (remote or local)
  • model localization settings
  • LookML constants
  • Extension definitions
  • Custom visualization definitions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

Where should the manifest.lkml file be located in the project directory?

A

It can -only- be stored in the root directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

When is a manifest_lock.lkml file added?

A

When a remote dependency is added to the project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

What is the appropriate (but not required) file extension for an explore file?

A

.explore.lklml

E.g., my_explore.explore.lkml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Is LookML case sensitive.

A

Yup!

my_dimension != My_DIMENSION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

When you move a LookML file from one folder to another in the IDE, what does its Git history look like?

A

It is blank. When moving a file, the IDE deletes it and creates a new file in the new directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Can you bulk delete views not in a directory?

A

Yes, the IDE has a bulk deletion option.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

Given the path “/views/business_views/new_views”

How would you create an include statement to include all .lkml files in the “/views/business_view” and /views/business_views/new_views”

A

include: “/views/**/*.lkml”

The double asterisk is a recursive wildcard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

What does Looker cache?

A

Looker caches the results of every query run. Queries can be run from explores, Looks, dashboards, and schedules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

Does Looker cache dashboards?

A

No. But it does cache the queries on a dashboard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

What is the default cache duration?

A

1 hour, unless overridden by a caching policy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

What happens if the Looker cache fills up?

A

The oldest results will be dropped to make way for new results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

What is the recommended way to control caching behavior?

A

Looker recommends to use Datagroups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

Other than “label” and “description,” what are the other two parameters: on a datagroup.

A
  1. max_cache_age:

2. sql_trigger:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

T / F – Datagroups can contain a description?

A

True. The option description: should explain the datagroup’s purpose.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

How many rows can the sql in a sql_trigger parameter return?

A

One.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

What is the result of a sql_trigger compared to determine if it is triggered?

A

The sql_trigger results are compared to the previous results. They must be different to trigger.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

What timezone do sql_trigger dates use?

A

They are not adjusted by Looker; they will be the timezone set in your database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

How does sql_trigger_value: work in dev mode?

A

Any sql_trigger_value becomes replaced with persist_for: “24 hours” no matter what setting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

What are the 3 intervals allowed in a max_cache_age?

A
  • seconds
  • minutes
  • hours
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

What’s the difference between max_cache_age and persist_for when assigned to a PDT?

A

max_cache_age only invalidates the results (deletes the cache), it does not cause the PDT to rebuild.

persist_for invalidates the PDT and rebuilds it.

Pro tip, if you define a datagroup with only max_cache_age, a derived table assigned that datagroup will persist, but because there is no trigger assigned, the PDT will sit in the scratch schema indefinitely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

What parameter is used in an explore: to apply a datagroup caching policy?

A

persist_with:

E.g.,
explore: my explore {

persist_with: name_of_datagroup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

How can you control the default caching policy for all explores?

A

Define a datagroup for the caching policy and add persist_with: at the model level. This should cascade to all explores.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

What is the default interval which a sql_trigger runs at

A

Every 5 minutes. It can be overridden in the connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

Given it’s 18:00 UTC (0600 database time), when would this PDT rebuild?

derived_table: my_pdt {

sql_trigger: SELECT EXTRACT(day FROM DATEADD(hour, -3, GETDATE()))

A

3 AM.

76
Q

What’s wrong with this PDT trigger?

derived_table: my_pdt {

sql_trigger: SELECT EXTRACT(minute FROM DATEADD(hour, -3, GETDATE()))

A

The minute is being extracted, therefore, it will fire every hour.

77
Q

What does suggest_persist_for control?

A

How long a filter dimension lookup query is persisted for

78
Q

T / F – a user who manually clicking on “Clear Cache and Refresh” causes any “persist_for” countdown to be reset?

A

True.

79
Q

If any explore is dependent on an ETL should persist_for or datagroup be used?

A

datagroup. The datagroup parameter can tie together a check if an ETL has completed with sql_trigger: SELECT MAX(id) ;; and max_cache_age: “24 hours”

If the explore had a simple persist_for: “24 hours” parameter set, then it may be reset by a user hitting “Clear Cache and Refresh”

80
Q

A persist_with can apply a datagroup to…

A
  • An explore

* A model

81
Q

What are 4 common reasons to use derived tables?

A
  1. Dimensionalizing a measure.
  2. Building subqueries or CTEs
  3. Performance.
  4. SQL which can’t be modeled (e.g., “UNION”s)
82
Q

What are some SQL set operations which require a DT / PDT?

A
  1. UNION
  2. UNION ALL
  3. EXCEPT
  4. INTERSECT
  5. MINUS
83
Q

Are WINDOW functions executed pre- or post- aggregation

A

Post.

84
Q

What are the 3 parameters which can be added to a derived table (DT) to persist it (PDT)?

A
  1. persist_for
  2. sql_trigger_value
  3. datagroups
85
Q

Why does Looker not recommend using “persist_for” for PDTs?

A

Often, the objective of PDTs is reduce user wait. The first user running a query on the PDT will have a horrible experience.

86
Q

What are the “repear” and “regenerator”?

A

The repeat is the Looker tool which runs every 5 minutes and check if PDTs and cache need to be dropped.

The regenerator runs every 5 minutes and determines which PDTs need to be dropped

87
Q

In most SQL dialects, what SQL does a Native Derived Table (NDT) generate?

A

It is converted into a CTE, based on the explore joins defined on the explore from which the NDT is based.

88
Q

What is one big advantage of Native Derived Tables ( NDTs)?

A

They have the parameters bind_filter: and bind_all_filters, which inject the user’s filter into the CTE.

89
Q

How often will a PDT rebuild with sql_trigger: SELECT 1;;?

A

Never. Since 1 never changes, it will never rebuild.

90
Q

From admin level, what 3 functions combined determine what a user can do?

A
  1. Roles.
  2. Permission sets.
  3. Model sets.
91
Q

What 2 components make up a user “Role”?

A
  1. Permission sets

2. Model set

92
Q

On an admin level, what controls what -data- a user can access?

A

Model Set(s).

93
Q

On an admin level, what controls what -actions- a user can make?

A

Permission Set(s).

94
Q

What are the 5 default Permission Sets?

A
  1. Admin
  2. Developer
  3. User
  4. User who can’t view LookML
  5. LookML dashboard user
95
Q

Define the “Developer” default Permission Set.

A

The user can develop and deploy, but has no Admin level access.

96
Q

Define the “User” default Permission Set.

A

Can’t develop or deploy, but can view LookML

97
Q

Define the “User who can’t view LookML” default Permission Set.

A

Can’t view LookML, but can explore

98
Q

Define the “LookML dashboard user” default Permission Set.

A

Can’t explore, can only view Dashboards

99
Q

From an admin perspective, define a “Permission.”

A

A permission is an enablement which can be toggled per “Permission Set.” E.g., “see_looks”, “save_content”, etc.

100
Q

What can a “Role” be assigned to?

A

A “Role” can be assigned directly to a “User” or a “Group,” which contains users.

101
Q

Can an admin sudo any user?

A

They can not sudo admins, but otherwise can sudo all users.

102
Q

What are the two things “Groups” makes easier to manage?

A
  1. Space Access

2. User Permissions.

103
Q

Can a user be assigned two two groups?

A

Yes. Their permissions will be based on a union of both groups.

104
Q

What is “content” in context of permissions?

A

Looks and Dashboards.

105
Q

Where are the two places you can a user’s folder permissions?

A

Inside a folder, click the cog at the top right and assign a “User” or “Group” and what level of access. I.e., “View” or “Manage / Edit”.

OR

In the Admin -> Content Access.

106
Q

When creating a folder inside a folder, what “Content Access” (Users and Groups) will the folder have?

A

It will inherit the parent folder’s Content Access settings.

107
Q

T / F – Are admins the only ones who can change a folder’s access settings?

A

No. Any user with the “manage_space” permission can make changes to a folder’ “Content Access”

108
Q

What is a “Closed System”?

A
  1. The “All Users” group is removed.
  2. All user folders are made “Private” by default. Though, users can still share content in their folder with other members of their groups.
  3. Ensures Looker users can only view other users in their group.
109
Q

Can you name all of the instance wide permissions?

A
  1. create_table_calculations
  2. save_content
  3. create_alerts
  4. follow_alerts
  5. deploy
  6. support_access_toggle
  7. manage_spaces
  8. manage_homepage
  9. manage_models
  10. embed_browse_spaces
  11. see_queries
  12. see_logs
  13. see_users
  14. sudo
  15. see_schedules
  16. see_system_activity
110
Q

What are the two types of permissions?

A
  1. Model specific.

2. Instance wide.

111
Q

T / F – I can make it so a user can develop one one model, but only view another model.

A

False.

Since “develop” and “see_lookml” permissions will be given a user for all models.

112
Q

If the plan is to white-label and allow customers to write LookML, how should an admin control so users can only develop certain LookML models?

A

The client asks, “How do I control which models a user or group can edit and develop on?”

The initial thought is: Simple, create a role that the has the develop and see_lookml permissions (both are model-specific permission) and then grant this role the specific Model Set access. Done and done right?

Well, the “expected” unexpectedness here is that if you have a single Project with multiple models, granting develop and see_lookml on a single model will allow this user to develop on all models if they can see all models. Interesting right? As mentioned, this is in Docs at a high level.

The important take away is if a customer wants to break out and separate develop permissions, the best option is to create completely separate Projects.

113
Q

What are the two primary applications of User Attributes?

A

Use with

  1. access_filters
  2. access_grants
114
Q

Which of these is an access_grant and access_filter?

xxxxx: this {
user_attribute: my_customers
allowed_values: [ “51” ]
}

xxxxxx: that {
field: customer_id
user_attribute: my_customers
}

A

access_filter: that {
field: customer_id
user_attribute: my_customers
}

access_grant: this {
user_attribute: my_customers
allowed_values: [ “51” ]
}

115
Q

Describe the difference between “access_grant” and “access_filter”?

A

“access_grant” filters columns. They are applied to joins, fields, or can be referenced in “required_access_grants”. It limits what fields a user can access.

“access_filter” filters rows. It is added directly in an explore: object. It creates a where clause restricting what data user can access.

116
Q

What parameter should one use to restrict the fields a user can access based on their user_attributes? Where should it be applied?

A

access_grant.

It can be applied by adding it directly to a dimension or join. Or, defined in a file and then applied to joins or fields using the required_access_grant: parameter.

117
Q

What parameter should one use to restrict the -rows- (data) a user can access based on their user_attributes? Where should it be applied?

A

access_filter.

It should be declared directly in an explore: object.

118
Q

T / F – You can apply multiple access_grants to fields and joins.

A

True.

E.g.,

access_grant: can_view_financial_data {
user_attribute: department
allowed_values: [ “finance”, “executive” ]
}

access_grant: can_view_payroll_data {
user_attribute: view_payroll
allowed_values: [ “yes” ]
}

view: payroll {
required_access_grants: [can_view_financial_data, can_view_payroll_data]
}

119
Q

If a user is given an Explore with content which is restricted for the user with an access_grant, what will the user see when opening the Explore?

A

The Explore will contain warnings at the top stating there is (are) field(s) which are not accessible by this user.

120
Q

Given a dimension which has an access_grant applied the user -does- have access to, but the dimension is contained in a view with an access_grant the user does not have, does the user have access to the dimension?

A

No. The access_grants are additive.

121
Q

What are the 4 places where you can apply a “required_access_grants:” parameter?

A
  1. Inside an explore
  2. Inside a view.
  3. Inside a join.
  4. Inside a field (dimension, measure, etc.)
122
Q

The sql_always_where: creates SQL in what part of the output query?

A

The “WHERE” clause.

123
Q

The sql_always_having: creates SQL in what part of the output query?

A

The “HAVING” clause.

124
Q

Where can sql_always_where: and sql_always_having: parameters be applied?

A

Inside

  1. explores
  2. joins
125
Q

If you use raw SQL in your sql_always_where: parameter, what might you also need to do?

A

You may need to add a always_join the table being referred to in the sql_always_where.

E.g.,
explore: order {
sql_always_where: customer.name <> ‘Periaptly Corporation’ ;;
join: customer {
sql_on: ${order.customer_id} = ${customer.id} ;;
}
}

In this example, the “customer.name” is referring directly to the database and not the LookML object ${customer.name}.

A better fix is probably adding the join properly and changing the code to:
“sql_always_where: ${customer.name} <> ‘Periaptly Corporation’”

126
Q

If you want filters a user can change but not remove, what parameter should you use?

A

always_filter.

This parameter is added to an Explore and always adds a filter to the Explore, though, the user can change the values making it “completely open.”

127
Q

If you want filters a user cannot change, what parameter should you use?

A

access_filter. These and be applied directly to views, joins, explore and limit what a user can

128
Q

What is the primary difference between access_filter and sql_always_where?

A

The “access_filter” allows restricting row-level data from user access based on user_attributes.

E.g.,
explore: customer {
  access_filter: {
    field: sales.region
    user_attribute: sales_region
  }
}

The “sql_always_where” filters row-level data to specific value

E.g.,
# Using Looker references
explore: order {
  sql_always_where: ${created_date} >= '2012-01-01' ;;
}
129
Q

Describe the functionality of the conditionally_filter: parameter.

A

A default filter that can be removed if at least one of the specified alternative filter fields is selected as filter.

explore: order_items {
   conditionally_filter: {
         filters: [created_date: "1 month"]
         unless: [users.id]
   }
}
130
Q

Describe the behavior of measure, type: average

A

Aggregate.

It is an aggregate which finds the mean of a numeric data cross rows.

131
Q

Describe the behavior of measure, type: average_distinct

A

Aggregate.

It is an aggregate which finds the mean of a numeric data cross rows, -meant for denormalized data-.

132
Q

Describe the behavior of measure, type: date

A

Non-aggregate

A measure which contains a date.

133
Q

Describe the behavior of measure, type: list

A

Aggregate.

It creates a comma separated list of values across rows.

134
Q

Describe the behavior of measure, type: max

A

Aggregate.

Finds the maximum value across rows.

135
Q

Describe the behavior of measure, type: min

A

Aggregate.

Finds the minimum value across rows.

136
Q

Describe the behavior of measure, type: median

A

Aggregate.

Gets the midpoint value across rows for numeric data.

137
Q

Describe the behavior of measure, type: median_distinct

A

Aggregate.

Gets the midpoint value across rows for numeric data -which is denormalized.-

138
Q

Describe the behavior of measure, type: number

A

Non-aggregate.

For a non-aggregate measure containing a number. Note, like all measures, there is no GROUP BY added.

139
Q

Describe the behavior of measure, type: percentile

A

Aggregate.

Generates the total for each row (i.e., “value / SUM(value)”).

140
Q

Describe the behavior of measure, type: percentile_distinct

A

Aggregate.

Generates the total for each row (i.e., “value / SUM(DISTINCT value)”) for denormalized data.

141
Q

Describe the behavior of measure, type: running_total

A

Post-SQL

Running total for every row.

142
Q

Describe the behavior of measure, type: string

A

Non-aggregate.

For measures containing letters or special characters.

143
Q

Describe the behavior of measure, type: sum

A

Aggregate.

Adds all values across rows (i.e., SUM(value))

144
Q

Describe the behavior of measure, type: sum_distinct

A

Aggregate

Generates a sum of values within a column for denormalized data.

145
Q

Describe the behavior of measure, type: yesno

A

Non-aggregate.

Fields that will show “Yes” or “No” for their result.

146
Q

T / F – when extending a view, in the extended view you can delete a field.

A

False.

You can override the values of a dimension, but your cannot delete it. However, you can hide it from UI or remove it from the field: [] in the join.

147
Q

Why should extending a view which contains a PDT be avoided?

A

This will cause two different PDTs to be created, as they are tracked by their view name.

148
Q

What does the permission_set “access_data” control? And what does it depend on?

A

No dependencies.

Allows users to access the LookML data files.

149
Q

What does the permission_set “see_lookml_dashboards” control? And what does it depend on?

A

Depends on model specific “explore”

Allows users to view LookML dashboards. If they have “develop” permission, they can also edit them.

150
Q

What does the permission_set “see_looks” control? And what does it depend on?

A

Depends on access_data.

Users can see saved Looks (but not dashboards). Users must have the “explore” permission to “Explore from Here” on the Looks.

151
Q

What does the permission_set “see_user_

dashboards” control? And what does it depend on?

A

Depends on “see_looks”.

Users can view dashboards.

152
Q

What does the permission_set “explore” control? And what does it depend on?

A

Depends on “see_looks”

Users can access and use the Explore page to generate reports. Without this permission, users can only view saved dashboards (if see_lookml_dashboards or see_user_dashboards has been granted).

153
Q

What does the permission_set “create_table_calculations” control? And what does it depend on?

A

Depends on “explore”

Users can view, edit, or add table calculations and custom fields; users with only the explore permission can only view table calculations and custom fields.

154
Q

What does the permission_set “save_content” control? And what does it depend on?

A

Depends on “see_looks.”

Users can save and edit Looks and dashboards. Users must have explore permission for any relevant models to explore from those Looks and dashboards. Users must have download_with_limit and/or download_without_limit permissions to download the content.

155
Q

What does the permission_set “create_public_looks” control? And what does it depend on?

A

Dependencies are model specific.

Users can mark a saved Look as public, which will then generate URLs granting access to that report without authentication.

156
Q

What does the permission_set “download_with_limit” control? And what does it depend on?

A

Depends on “see_looks.”

Users can download queries (as CSV, Excel, and other formats) but must specify a row limit of 5,000 or fewer to avoid memory problems from large downloads on the instance.

157
Q

What does the permission_set “download_without_

limit” control? And what does it depend on?

A

Depends on “see_looks.”

The same as download_with_limit, but does not require the user to specify a row limit. Downloading all results for some types of queries may require substantial memory, potentially causing performance issues or even crashing the Looker instance.

158
Q

What does the permission_set “schedule_look_emails” control? And what does it depend on?

A

Depends on “see_looks”

Users can deliver any Looks, dashboards, and queries with visualizations to which they have data access to email. Users can schedule delivery to occur after a datagroup has been triggered, has managed the cache, and has rebuilt relevant PDTs.

To send or schedule System Activity dashboards, users must have access to all models.

Users who also have create_alerts permissions can send email alert notifications.

If no email domains are specified in the Email domain allowlist on the Settings page of the Admin panel, the user can deliver to any email domain.

There are additional considerations for embed users.

This permission is applied to individual models or model sets, rather than across the entire Looker instance.

159
Q

What does the permission_set “schedule_external_

look_emails” control? And what does it depend on?

A

Depends on schedule_look_
emails.

The same as schedule_look_emails. If any email domains are specified in the Email domain allowlist on the Settings page of the Admin panel, the user can deliver to any email domain.

Users who also have create_alerts permissions can set alerts that send notifications to emails with any domain.

There are additional considerations for embed users.

This permission is applied to individual models or model sets, rather than across the entire Looker instance.

160
Q

What does the permission_set “create_alerts” control? And what does it depend on?

A

Depends on see_looks.

Users can create, duplicate, and delete their own alerts; and see and duplicate alerts marked Public by other users. The user must be signed in to Slack to see alerts that send Slack notifications. Users can view their alerts on the Manage Alerts user page. Admins can access the alerts admin pages.

161
Q

What does the permission_set “follow_alerts” control? And what does it depend on?

A

Depends on see_looks.

Users can view and follow alerts. View the alerts they have followed or for which they are listed as a recipient from the Manage Alerts user page.

162
Q

What does the permission_set “send_to_s3” control? And what does it depend on?

A

Depends on see_looks.

Users can deliver any Looks, dashboards, and queries with visualizations to which they have data access to an Amazon S3 bucket. Users can schedule delivery to occur after a datagroup has been triggered, has managed the cache, and has rebuilt relevant PDTs.

This permission is applied to individual models or model sets, rather than across the entire Looker instance.

163
Q

What does the permission_set “send_to_sftp” control? And what does it depend on?

A

Depends on see_looks.

Users can deliver any Looks, dashboards, and queries with visualizations to which they have data access to an SFTP server. Users can schedule delivery to occur after a datagroup has been triggered, has managed the cache, and has rebuilt relevant PDTs.

This permission is applied to individual models or model sets, rather than across the entire Looker instance.

164
Q

What does the permission_set “send_outgoing_webhook” control? And what does it depend on?

A

Depends on see_looks.

Users can deliver any Looks, dashboards, and queries with visualizations to which they have data access to a webhook. Users can schedule delivery to occur after a datagroup has been triggered, has managed the cache, and has rebuilt relevant PDTs.

This permission is applied to individual models or model sets, rather than across the entire Looker instance.

165
Q

What does the permission_set “send_to_integration” control? And what does it depend on?

A

Depends on see_looks.

Users can deliver any Looks, dashboards, and queries with visualizations to which they have data access to the third-party services integrated with Looker via the Looker Action Hub. If using custom actions with user attributes, users must have this permission and have a non-null and valid user attribute value for the specified user attribute to deliver Looker content to that action destination. This permission is not related to data actions. Users can schedule delivery to occur after a datagroup has been triggered, has managed the cache, and has rebuilt relevant PDTs.

This permission is applied to individual models or model sets, rather than across the entire Looker instance.

166
Q

What does the permission_set “see_sql” control? And what does it depend on?

A

Depends on see_looks.

Users can access the SQL tab while exploring and any SQL errors caused by their queries.

167
Q

What does the permission_set “see_lookml” control? And what does it depend on?

A

Depends on see_looks.

Users have read-only access to LookML. Users must have this permission to see the Go to LookML link in the Admin panel.

If you want a user to be able to edit LookML you must also give them the develop permission. This permission interacts with model sets in a potentially unexpected way, as described above.

168
Q

What does the permission_set “develop” control? And what does it depend on?

A

Depends on “see_lookml.”

Users can make local changes to LookML but will not let them make those changes available to everyone unless they also have the deploy permission. This permission interacts with model sets in a potentially unexpected way, as described above.

This permission is required to see the Chat option in the Help menu, and to see metadata in the Looker IDE. Users also need this permission to access the Rebuild Derived Tables & Run option in the Explore gear menu. Note that this is not model-specific, so if a user has this permission in one model, they will have access to Rebuild Derived Tables & Run in all models.

169
Q

What does the permission_set “deploy” control? And what does it depend on?

A

Depends on “develop.”

Users can push their local LookML changes to production so that those changes become available to everyone.

170
Q

What does the permission_set “support_access_toggle” control? And what does it depend on?

A

Depends on “develop.”

Users can enable or disable access by Looker analysts to your Looker instance.

171
Q

What does the permission_set “use_sql_runner” control? And what does it depend on?

A

Depends on “see_lookml.”

Users can use SQL Runner to run raw SQL against their allowed connections.

172
Q

What does the permission_set “see_drill_overlay” control? And what does it depend on?

A

Depends on access_data.

Users can see the results of drilling into a dashboard tile but cannot explore those results. If explore is granted, this permission is also automatically granted (even if it isn’t checked).

173
Q

What does the permission_set “manage_spaces” control? And what does it depend on?

A

No dependencies.

Users can create, edit, move, and delete folders. Users will also need the Manage Access, Edit content access permission.

174
Q

What does the permission_set “manage_models” control? And what does it depend on?

A

No dependencies.

Each LookML model is mapped to a specific set of database connections on the Manage LookML Projects page. With this permission, users can configure these mappings and create new projects. Non-admin users granted this permission will have access to all connections that are allowed by the models to which they have access.

175
Q

What does the permission_set “create_prefetches” control? And what does it depend on?

A

No dependencies.

Allows API calls to the pre-fetch API endpoint, which you can read more about in this Community topic.

176
Q

What does the permission_set “login_special_email” control? And what does it depend on?

A

No dependencies.

Users can log in with traditional email/password credentials, even if other login mechanisms (such as Google, LDAP, or SAML) have been enabled on your instance. This can be useful for consultants or others who may not be a part of your normal authentication system.

177
Q

What does the permission_set “embed_browse_spaces” control? And what does it depend on?

A

No dependencies.

Enables the content browser for single sign-on (SSO) embeds. If you are using SSO embeds you should give this permission to users who have the save_content permission.

178
Q

What does the permission_set “see_queries” control? And what does it depend on?

A

No dependencies.

Users can see the Queries page in the Admin section of Looker. This privilege does not give a user the ability to terminate a query on the Queries page.

179
Q

What does the permission_set “see_logs” control? And what does it depend on?

A

No dependencies.

Users can see the Log page in the Admin section of Looker.

180
Q

What does the permission_set “see_users” control? And what does it depend on?

A

No dependencies.

Users can see the Users page (but not the Groups page) in the Admin section of Looker. This privilege does not give a user the ability to create new users, see or create API credentials, reset passwords, or otherwise modify users or privileges. A user granted this permission can see all users in all groups on an instance, even on a closed system. A user can see all group names and all role names, which some companies may consider sensitive.

181
Q

What does the permission_set “sudo” control? And what does it depend on?

A

Depends on “see_users”

Users can sudo (in other words, act as and temporarily inherit the permissions of) another user by clicking the Sudo button on the Users page.

The sudo permission does not allow a non-admin to sudo as an admin, but a non-admin could potentially escalate their privileges by using sudo, so exercise caution.

182
Q

What does the permission_set “see_schedules” control? And what does it depend on?

A

No dependencies.

Users can see the Schedules and Schedule History pages from the Admin panel in Looker.

183
Q

What does the permission_set “see_pdts” control? And what does it depend on?

A

No dependencies.

Users can see the Persistent Derived Tables page in the Admin section of Looker and view information about PDTs from projects that use any connection associated with models for which they have data access.

ADDED6.22 This permission is applied to connections to which users have data access, rather than across the entire Looker instance or to individual models or model sets.

184
Q

What does the permission_set “see_datagroups” control? And what does it depend on?

A

No dependencies.

Users can see the Datagroups page in the Admin section of Looker. Users can see connection names, model names, and other information about datagroups defined in a model for which they have data access.

This permission is applied to individual models or model sets, rather than across the entire Looker instance or to connections.

185
Q

What does the permission_set “update_datagroups” control? And what does it depend on?

A

Depends on see_datagroups.

Users can trigger a datagroup, or reset its cache, via the Datagroups page in the Admin section of Looker. Like users with the see_datagroups permission, users with update_datagroups can see datagroups defined in projects that use a model for which they have data access.

This permission is applied to individual models or model sets, rather than across the entire Looker instance or to connections.

186
Q

What does the permission_set “see_system_activity” control? And what does it depend on?

A

No dependencies.

Users can access the System Activity Explores and dashboards and the internal i__looker database to view usage, history, and other metadata about a Looker instance.