Data Analytics and Business Intelligence (BI) are some of the few technologies that companies are incorporating to better understand their customers. Many tools are built in this field to help companies gain valuable customer insights. One such tool is Looker. Looker is a Business Intelligence software and Big Data Analytics platform that helps companies explore, analyze and share business insights easily in real-time. Looker uses Looker ML (LookML) to describe the relationships between various attributes in a database.

Looker ML is the language Looker uses to describe the dimensions and relationships between various entities in an SQL database. Understanding Looker ML plays a pivotal role in determining the relationships between different database entities and also to construct the correct SQL queries.

In this article, you will be introduced to Looker ML and its importance to any organization. You will also be given a brief introduction to Looker and its features to understand how Looker uses Looker ML to gather insights from SQL databases. Furthermore, you will also be given a step-by-step approach to learn Looker ML. Read along to learn about Looker ML and implement it for your organization.

Prerequisites

  • Technical Working Knowledge of SQL
  • Working knowledge of Databases and Entities that make them up.

What is Looker?

Looker is a Cloud-based BI tool and computer software company that helps businesses improve their overall outlook by providing smarter data-driven insights from multiple data sources. It was founded by Llyod Tabb and Ben Porterfield in 2012 and its current headquarters are in Santa Cruz, California. It was acquired by Google in 2019 and is now part of the Google Cloud Platform. Looker supports multiple data sources and deployment methods so that you can use them for all your analytical needs without compromising the transparency, security, or privacy of your data.

Features of Looker

Looker houses a wide range of features that differentiates it from the other BI tools. Some of those features are given below:

  • Looker helps you create real-time dashboards for an in-depth and consistent analysis of your data.
  • It helps you integrate multiple tools and enhance their capabilities when analyzing data so that you can make better data-driven decisions.
  • It makes all your workflows data-driven by regenerating them with fresh, reliable data. Looker gives teams unified access to the answers they need to drive successful outcomes.
  • Looker also helps you create custom applications to interact with your customers easily.
  • It can also provide a live connection to any SQL database on any infrastructure.
  • It efficiently uses Looker ML (Look ML) to describe the measures and dimensions of all its projects.

Looker is an amazing tool to work with and provides a wide range of features that integrate seamlessly with almost any database or data source.

How is Looker different from other Visualization tools?

Looker differentiates itself from the different Data Visualization tools in the market by enabling its users to create their visualizations and graphs. You can also create all kinds of exploration and collaboration models with minimal SQL knowledge while preserving key data distinctions. Looker can deftly handle web-based data and support different variations including Vertica, Hive, Spark, and BigQuery. 

Introduction to Looker ML (Look ML)

Looker ML Logo
Image Source

Looker ML is the language used by Looker to describe the dimensions, aggregates, calculations, and data relationships for an SQL database. Looker ML creates a model that Looker uses to construct SQL queries to extract the accurate data required for your business analysis.

Looker ML consists of several projects to help Looker choose the apt SQL queries. A Look ML project is a collection of a model, view, and dashboard files that are controlled together by a Git repository. The model contains files providing information on which tables to use and how they should be joined together. The view contains information about how to calculate certain parameters in each table. Dashboard files add a visual appeal to represent data easily.

The relationships between Looker ML projects and the Git repository are depicted in the below figure.

Looker Project Breakdown
Image Source

Looker ML has a unique feature that enables it to separate the structure of an SQL query from the actual content the query returns. This means that the structure of the query (how the tables are joined) is independent of the operation they perform (the columns to access, derived fields, aggregate functions to compute, and filtering expressions to apply).

The working of Looker ML is shown in the figure below.

Looker ML Working
Image Source

Fundamental Looker ML Elements

There are numerous elements that make up a Looker ML project. These elements represent the relationships between each entity in the database. The common elements found in a Looker ML project are:

  • Model: A Model contains information about the tables in a SQL database and helps you decide which tables to use according to your business use case requirements. It also provides information if you need to join tables.
  • View: A View contains information about how to calculate information from each table. Generally, you define the view, dimensions, measures, and fieldsets.
  • Explore: An Explore is a file that adds more details to the model file. In some cases, you need to create a separate Explore file for a derived table or to extend or refine the Explore file across different models.
  • Join: A Join lets you combine data from multiple views.
  • Manifest File: A Manifest FIle contains instructions for using files imported from another project or for your project’s localization settings.

When all of these elements are combined together in a systematic way, a Looker ML Project is developed.

Given below is the code for a minimal Looker ML Project for an E-Commerce store. This code has 1 model file and 2 views.

connection: order_database
include: "*.view.lkml"
explore: orders {
  join: customers {
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}
 
##########################################################
# FILE: orders.view.lkml                                 #
# Define the dimensions and measures for the ORDERS view #
##########################################################
view: orders {
  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }
  dimension: customer_id {      # field: orders.customer_id
    sql: ${TABLE}.customer_id ;;
  }
  dimension: amount {           # field: orders.amount
    type: number
    value_format: "0.00"
    sql: ${TABLE}.amount ;;
  }
  dimension_group: created {                # generates fields:
    type: time                              # orders.created_time, orders.created_date
    timeframes: [time, date, week, month]   # orders.created_week, orders.created_month
    sql: ${TABLE}.created_at ;;
  }
  measure: count {             # field: orders.count
    type: count                # creates a sql COUNT(*)
    drill_fields: [drill_set*] # list of fields to show when someone clicks 'ORDERS Count'
  }
  measure: total_amount {
    type: sum
    sql: ${amount} ;;
  }
  set: drill_set {
    fields: [id, created_time, customers.name, amount]
  }
}
 
#############################################################
# FILE: customers.view.lkml                                 #
# Define the dimensions and measures for the CUSTOMERS view #
#############################################################
view: customers {
  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }
  dimension: city {                    # field: customers.city
    sql: ${TABLE}.city ;;
  }
  dimension: state {                   # field: customers.state
    sql: ${TABLE}.state ;;
  }
  dimension: name {
    sql: CONCAT(${TABLE}.firstname, " ", ${TABLE}.lastname) ;;
  }
  measure: count {             # field: customers.count
    type: count                # creates a sql COUNT(*)
    drill_fields: [drill_set*] # fields to show when someone clicks 'CUSTOMERS Count'
  }
  set: drill_set {                     # set: customers.drill_set
    fields: [id, state, orders.count]  # list of fields to show when someone clicks 'CUSTOMERS Count'
  }
}

The relationships between each Looker ML Element and your project are depicted in the below figure.

LookML Elements
Image Source

How does Looker work?

Looker stands apart by going beyond Business Intelligence to help organizations deliver impactful solutions through data-driven experiences and insights that fit the way people work. Looker simplifies the creation of Dashboards and Reports while avoiding stale data and siloed approaches to enterprise logic with Enterprise-Class Business Intelligence. To tap into the value of your data and build a full spectrum of data experiences you need to have an idea about how Looker functions. Here is a brief outlook of the working of Looker:

  • Connecting Data: Looker utilizes a Database or a Data Warehouse to store the data along with a plethora of connectors out of the box. A database connection is required for Looker to work. This is because Looker operates in a live mode using SQL queries instead of ingesting flat files like Excel sheets or CSVs. 
  • Modeling Data: Once the connections have been established and tested, the next step is to select the tables from the database you wish to work with, and define relationships. You can do this using LookML, the backend of Looker. This provides a Data Modeling layer where you can define the relationships, drill-down features, and add new variables.  
  • Data Collaboration: Looker enables parallel execution of operations, which speeds up how fast you can develop the base for Looker. LookML can be used by numerous teams and the work done in one project can be referenced by others easily.
  • Data Visualization: After the completion of a version of the LookML model, you can start working on creating the visualizations. There are two ways to develop these: Looks and Dashboards. Looks are singular visualizations used to analyze data on an ad-hoc basis and share insights with the stakeholders. Looks are loosely used to refer to Reports in Looker. Dashboards allow multiple visualizations and KPIs (Key Performance Indicators) to be presented together.

Steps to Learn Looker ML (Look ML)

Looker ML is a very simple language that anyone can learn, once they have mastered the fundamentals. Given below are some of the steps and resources you can use to learn this unique language and implement it for your organization:

Step 1: Access Looker’s Learning Environment

One of the easiest ways to learn Looker ML is to have a safe code environment with multiple examples you can use to understand the syntax and fundamentals of Look ML. You can do this by registering on Looker’s learning environment, “https://learn.looker.com/” or by studying the free E-Learning course, “Getting Started with LookML”.

Step 2: Querying & Exploring Data using Looker

If you know how to explore data in Looker, it will help you model data easily in Looker ML. If you are not familiar with Looker, you can use the following links to get started:

  • Start with the Retrieve and Chart Data tutorials. The links at the bottom of each page will guide you through a sequence of the most important Looker features.
  • These videos will take you through the basics of exploring.

Step 3: Reviewing SQL Basics

Writing Looker ML (Look ML) code works best if you have strong SQL fundamentals. You need not be an expert in SQL, but generally, the deeper you go in Looker ML the more you benefit from a deeper understanding of SQL. Some resources to increase your SQL knowledge include:

Step 4: Learning Looker ML Fundamentals

Some of the resources given below will help you expand your knowledge in Looker ML. You can access these resources with a learning account:

Step 5: Consider Looker Training

Looker offers multiple training programs for business users, novice Looker developers, and advanced Looker developers. You can get more information by accessing Looker’s Training Event Page.

When or When not to Use Looker?

When you are in need of customized visuals, a single source of truth, the best customer support, and collaborative dashboards, you can choose Looker. Since it’s completely browser-based, it reduces the possible confusion of your team. The pricing customization option will help you to get the necessary options alone for your company’s analytics goals.

In case you are already a Microsoft ecosystem user, Power BI you suitable option. Using another tool will lead to unwanted confusion and leads to additional costs. For an additional intuitive platform, you can choose tableau over Looker.

Looker Pricing & Alternatives

Looker Alternatives

Sisense

Sisense is a Business-Intelligence, AI-driven software company founded in 2004 by Elad Israeli, Eldad Farkash, Aviad Harell, Guy Boyangu, and Adi Azaria. Its headquarters are located in New York City, New York. The main goal of Sisense is to provide APIs for customizations and building personalized analytic experiences for any application.

Tableau

Tableau is a modern Data Analytics and Business Intelligence platform. It is an easy-to-use tool, hence, it offers a smooth experience to its users. Some of Its amazing features include real-time analytics, quick responsiveness, and interactive dashboards. It also offers simple yet appealing graphics/visualizations that you can use to present your data pictorially. It comes with all the features needed for data extraction, data processing, and generating reports and dashboards. 

Power BI

Power BI is a business analysis tool from Microsoft that can be used as a cloud service or as a standalone on-premise installation. It lets users connect to various data sources and ask questions about the data through queries. It also lets users transform data into reports and dashboards to aid decision-making. Being an offering from Microsoft, Power BI offers tight integration to all the Microsoft ecosystem components like SQL Server, Microsoft Azure databases, etc.

Looker Pricing

Looker will not disclose its pricing details publicly. It provides customized plans based on the number of users and deployment scale. Looker pricing is designed to fit businesses of all sizes.

Conclusion

This article provided a comprehensive guide on Looker ML and its importance to any organization. It also provided a brief overview of Looker and its features. Furthermore, it also provided insights on the fundamental events in Looker ML and 5 easy steps you can follow to learn it. Overall, Looker ML provides an innovative approach when dealing with any type of data. By collaborating with Looker simultaneously, it helps you design models according to your business needs to gather valuable customer insights.

Want to take Hevo for a spin? Sign up here for a 14-day free trial and experience the feature-rich Hevo suite first hand.

Share your experience of understanding Looker ML in the comments section below!

Aakash Raman
Business Associate, Hevo Data

Aakash is a research enthusiast who was involved with multiple teaming bootcamps including Web Application Pen Testing, Network and OS Forensics, Threat Intelligence, Cyber Range and Malware Analysis/Reverse Engineering. His passion to the field drives him to create in-depth technical articles related to data industry. He holds a Undergraduate Degree from Vellore Institute of Technology in Computer Science & Engineering with a Specialization in Information Security and is keen to help data practitioners with his expertise in the related topics.

No-code Data Pipeline For Looker