LookML Development Guide
Welcome to the LookML Development Guide! This document will help you onboard LookML successfully, enabling you to contribute to your data model effectively. By following the steps outlined here, you’ll be able to construct a comprehensive data model in Looker using existing database tables, primarily Presto and Redshift.
Introduction
LookML is a powerful tool for constructing data models and creating Explores in Looker.
This guide will walk you through the process of contributing to Looker Explores using LookML, from understanding basic concepts to implementing updates for product changes.
When to Update LookML
Consider updating LookML for your product under the following circumstances:
- User Requests: When data consumers request specific dimensions, measures, or analyses to be available in Looker, and it makes sense to resolve this in the LookML layer. For example, if new dimensions/measures are expected to benefit multiple users, updating Explores via LookML is worthwhile.
- Product Updates: When there are updates or changes in your product that should be reflected in the data model.
Basic Concepts
1. Explores
Explores in Looker are the primary way users interact with data. They represent a curated view of your database tables, providing users with a structured way to explore and analyze data.
2. Dimensions
Dimensions are the attributes by which you want to analyze your data. These can be categorical or time-based and are used to group and filter data in Explores.
3. Measures
Measures are the numerical values you want to analyze. These can be aggregations (such as counts, sums, averages) or calculated metrics derived from your data.
4. Joins
Joins are used to combine data from multiple database tables into a single view. They define the relationships between tables, allowing Looker to query data across different sources.
Development Process
- Identify Requirements: Determine the requirements for updating the data model, including user requests and product updates.
- Review Existing LookML: Familiarize yourself with the existing LookML codebase, including Explores, dimensions, measures, and joins.
- Make Changes: Implement the necessary changes in LookML to accommodate the new requirements. This may involve adding new dimensions/measures, modifying existing ones, or updating joins.
- Test Changes: Test your changes thoroughly to ensure they work as expected. Verify that the new dimensions/measures produce accurate results and that joins are correctly configured.
- Document Changes: Document your changes in the LookML codebase to provide clarity for future developers and users.
- Deploy Changes: Once your changes have been tested and reviewed, deploy them to the production environment.