Skip to content

Looker

Structure

A model is a set of explores, an explore joins one or more views, a view is a table with dimensions and measures. Explores feed looks, a collection of looks is a dashboard.

  • One project, rebtel_production, with six models based on team structure: Product, Accounting, CRM, Operations, Finance, Acquisition
  • Views are dbt models plus derived tables made in Looker
  • No LookML dashboards: users build looks and dashboards in the UI
  • Data Dictionary and LookML diagram list all fields per explore

Model owners

Model Owner team
Accounting Finance
Finance Finance
Acquisition Growth
CRM Growth
Operations Operations
Product Product

New explores go into the model of the team they serve. Ask in #team-data if unsure.

User management

Login is Google SSO at rebtel.eu.looker.com. New users start with no access.

Add a user

  1. Ask them to log in with Authenticate with Google
  2. Go to Admin > Users and open the user
  3. Assign the department group (e.g. Operations, Growth). Departments get User (read and create) and Gemini roles. Add Looker Power User for the Developer role (LookML)
  4. Remove the no access role
  5. Save

Warning

Never grant roles directly to a user. Roles come from groups only.

Grant a role to a group

Create the group under Admin > Groups if needed. Then in Admin > Roles, edit the role, tick the group, and click Update Role.

Dormant and leaving users

  • No login in 6 months (dashboard): move to the team's (Dormant) group, since licences are limited per role. Reverse it when they need access again
  • Leaving Rebtel: set the account to disabled and remove all groups and roles

Public URL for a report

Public URLs need no login, so prefer email, SFTP or S3 sharing. If needed, fill the request form and message the data team.

Approval process and coding standards

Developers need a GitHub account in the Rebtel org and access to the data-team-looker repo. Always test in dev mode first.

Deploying LookML

  1. Commit with a descriptive message and Commit Changes & Push
  2. Click Open Pull Request, add a title and create the PR
  3. A message with the PR link lands in #looker-approval
  4. A data team admin reviews it in GitHub against the standards. If they pass and content validation is green, the admin merges and a message confirms it in #looker-approval. Otherwise the developer fixes and resubmits

Enforced standards

  1. CamelCase names for new views, models and dashboards, in both the file code and file name, and identical
  2. All views in the Views folder, with no duplicates
  3. Explicit include for every view used in a model, e.g. include: "/Views/DimUser.view.lkml", not /**/*.view.lkml
  4. Mandatory explore properties: persist_with (e.g. dg_rebtel_production, 24h cache), label, group_label (the model name), description, hidden
explore: view_name {
  persist_with: dg_rebtel_production
  group_label: "Model name"
  label: "Name shown in the UI"
  description: "What this explore contains and what it is for"
  hidden: no
}
  • Keep the default IDE indentation
  • When joining a view into an explore, only include required fields (fields: [col1, col2])
  • Dimensions first, measures last
  • Add description and relevant attributes to fields
  • Label counts "Count of ..." and "Count of Distinct ...", and yesno fields "Is ...?" or "Has ...?"
  • Samples: UserEngagementSummary view, Finance model

Content validation

Renaming or deleting a field can break looks and dashboards. A Content Validation CI runs on every PR (about a minute) and fails if downstream content breaks.

Warning

Tell the data team before fixing a content validation error. Production breaks for the affected content between the fix and the merge, and the window should be as short as possible.

To fix, open Content Validator, click Validate, select rebtel_production and all folders, then:

  • Renamed field: click Replace and enter the new field name
  • Deleted field: click Remove, then manually delete custom calculations and filters that still reference it (open the content, edit the tile, delete the red-underlined custom fields, run, save)

Repeat until your errors are gone, re-run the failed CI jobs, and tell the data team.

Create a new Looker model

Needed for a new structure or to split Snowflake compute for performance.

  1. Warehouse: create a new Snowflake warehouse with suspend after 1 minute of inactivity
  2. Connection: under Admin > Connections, add a Snowflake connection with: - Host rebtel.eu-west-1.snowflakecomputing.com, port 443, database DW4_PROD, schema DBT - Authentication OAuth. Get the client ID and secret with select system$show_oauth_client_secrets('LOOKER'); - Max connections per node 30, pool timeout 600, JDBC parameter warehouse=<new warehouse> - Verify SSL and connection pooling on, time zones UTC - Test the connection until it is green
  3. Model: in dev mode create the model with a PascalCase name and place it in the Models folder. Use the new connection, include the necessary views, follow the standards, and delete migrated explores from the old model. Remove persist_with for explores moved from the old label, since OAuth queries run per user. Run the LookML validator and commit
  4. Deploy: in dev mode go to Develop > Projects and configure the new model without changes. Then in Admin > Roles edit the production model set and tick the new model
  5. Check what breaks: moving explores breaks content saved on them. Use Content Validator to confirm only expected content breaks (1000+ errors on a busy explore is fine)
  6. Announce in #team-data, create the PR and merge once CI fails only as expected
  7. Fix content: in Content Validator click Replace, choose type Model, enter the new model name. One click fixes all errors for an explore, repeat per explore
  8. Tell people the deploy is done and verify

Troubleshooting slowness

See Looker slowness due to queuing.