Looker is a modern, cloud-based business intelligence (BI) platform designed to explore, share, and visualize data at scale. This platform leverages a data modeling language, LookML, to describe and interact with data, making it a compelling choice for companies looking to democratize data insights. This article provides a technical introduction to Looker, discussing its architecture, core components, and capabilities.
Overview of Looker
Looker operates on an in-database architecture, where data stays in the database until a query brings back only the necessary data. Unlike other BI tools that extract data into an intermediate data warehouse, Looker sends SQL queries directly to the connected database, providing real-time insights. This approach reduces the latency and possible inaccuracies associated with data extraction and ensures that users always work with the most current data.
Core Components of Looker
There are three core components of Looker:
- The Looker connection to your SQL database: Looker connects directly to your SQL-based data warehouse. It supports a wide range of SQL dialects, including MySQL, PostgreSQL, BigQuery, Snowflake, Amazon Redshift, and more.
# Example SQL query that Looker might send to your database:
SELECT customer_id, SUM(order_value) AS total_value
FROM orders
WHERE order_date >= '2023-01-01'
GROUP BY customer_id;
- LookML: LookML is Looker's proprietary, easy-to-learn modeling language. It's used to describe the relationships in your database, define calculations, set up default visualizations, and control access to data.
# Example LookML view file:
view: orders {
sql_table_name: schema.orders ;
dimension: customer_id {
type: number
sql: ${TABLE}.customer_id ;;
}
measure: total_value {
type: sum
sql: ${TABLE}.order_value ;;
}
}
- Looker Platform: The Looker platform is where end-users interact with the data. Users can explore data, create and share dashboards and reports, schedule data deliveries, and even trigger actions based on data insights.
# Example Looker exploration:
explore: orders {
field: customer_id
field: total_value
filter: {
field: order_date
value: "2023-01-01"
operator: "on or after"
}
}
Understanding the Looker Workflow
The Looker workflow generally follows these steps:
-
Connect your database: Set up Looker to connect to your SQL database. This process includes providing connection details like host, port, database name, and authentication details.
-
Create a LookML project: This is the development workspace where you create and manage LookML model files.
-
Write LookML: Define your data model by writing LookML code. This involves creating views based on database tables, defining measures and dimensions, and setting up relationships between different views.
-
Explore data: Once your LookML model is defined, you can start exploring data. Looker's Explore section lets you build queries using a simple, intuitive interface.
-
Visualize data: Turn your query results into data visualizations. Looker supports a wide variety of visualization types, including charts, tables, maps, and more.
-
Share insights: You can share your findings with others by creating dashboards, sending reports via email, or even scheduling regular data deliveries.
Conclusion
In summary, Looker is a powerful business intelligence platform that offers real-time data analytics capabilities. It leverages LookML, an easy-to-learn data modeling language, allowing developers to define complex business logic in a simple, human-readable format. The platform's ability to connect directly to your SQL database, coupled with its comprehensive suite of data visualization tools, makes it a popular choice for companies of all sizes. Future posts will delve deeper into Looker's technical aspects, focusing on writing LookML, creating data models, and developing interactive dashboards.