Looker Guide
Looker Architecture
Looker Platform Architecture
Core components of the Looker platform and how they interact
Legend
Components
Connection Types
What Makes Looker Different
LookML Data Modeling
LookML creates a semantic layer that translates complex database structures into business-friendly terminology, providing:
- A single source of truth for business metrics across the organization
- Consistent definitions that prevent conflicting reports
- Empowerment of non-technical users to explore data safely
- Reduced reporting bottlenecks from centralized BI teams
LookML Data Modeling
LookML is a language for describing dimensions, aggregates, calculations, and data relationships in a SQL database. Key technical aspects include:
- Git-integrated version control for model development
- Reusable model components via extends and refinements
- Centralized business logic with derived tables and SQL Runner
- Advanced SQL generation with symmetric aggregates and fan-out control
Embedded Analytics
Embedded analytics transforms applications by bringing data directly to users in context:
- Increases user engagement through contextual insights
- Creates new revenue streams through data monetization
- Reduces development effort for in-app analytics features
- Maintains consistent metrics between internal and customer-facing analytics
- Enables "analytics as a product" business models
Embedded Analytics
Looker provides comprehensive embedding capabilities for integrating analytics into applications:
- iframe embedding with signed URLs and SSO authentication
- JavaScript API for two-way communication with embedded content
- Components SDK for embedding specific visualization elements
- Extension Framework for custom applications within Looker
- White-labeled embedding with custom themes and branding
LookML Development Guide
Key LookML Concepts
LookML models include these key components:
- Connection: Defines the database connection
- Model: Container for explores and views
- View: Defines a table or derived table
- Dimension: A field that represents an attribute
- Measure: An aggregate calculation (sum, count, average)
- Explore: Joins multiple views for querying
Example LookML Model
connection: "my_database"
include: "/views/*.view.lkml"
# Base model for e-commerce analytics
model: ecommerce {
# Define a view for the orders table
view: orders {
sql_table_name: public.orders ;;
dimension: order_id {
primary_key: yes
type: number
sql: ${TABLE}.id ;;
}
dimension_group: created {
type: time
timeframes: [date, week, month, year]
sql: ${TABLE}.created_at ;;
}
measure: count {
type: count
drill_fields: [order_id, created_date]
}
measure: total_revenue {
type: sum
sql: ${TABLE}.amount ;;
value_format_name: usd
}
}
# Define the explore that users will query
explore: order_analysis {
from: orders
join: users {
type: left_outer
sql_on: ${orders.user_id} = ${users.id} ;;
relationship: many_to_one
}
}
}
Looker Administration
Looker Security Model
Looker's security model balances accessibility with governance:
- Ensures sensitive data is only visible to authorized users
- Provides customized views based on user roles or departments
- Maintains regulatory compliance with GDPR, HIPAA, and other frameworks
- Reduces risk of data leakage through consistent policy application
- Enables safe self-service without compromising security
Looker Security Model
Looker security implementation details:
- Role-based access control with user attributes
- Row-level security via access grants and datagroups
- Content access controls with folders and permissions
- SAML/OIDC integration for SSO authentication
- API key rotation and OAuth management
- Field-level permissions via LookML access_filters
Looker Performance Optimization
Query Performance
Optimize Looker query performance with these techniques:
-
Database-Level Optimizations:
- Create appropriate indexes on join and filter fields
- Use materialized views for complex calculations
- Implement proper partitioning strategies
- Use distribution keys in cloud warehouses
-
LookML-Level Optimizations:
- Create aggregate awareness with PDTs
- Implement datagroups for cache control
- Use symmetric aggregates to prevent fan-out
- Deploy clustering keys in persistent derived tables
-
Front-End Optimizations:
- Limit the number of dimensions and visualizations per dashboard
- Use dashboard filters effectively
- Implement dashboard level caching policies
- Configure appropriate query timeout settings
Enterprise Deployment Best Practices
Looker Enterprise Deployment Architecture
Recommended deployment architecture for enterprise Looker implementations
Legend
Components
Connection Types
Development Workflow
For enterprise implementations, follow this Looker development workflow:
-
Development Instance:
- Developers create and modify LookML models
- Unit testing with SQL Runner and Explores
- Content validation with test users
-
Version Control Integration:
- Commit changes to Git repository
- Pull request workflows for code review
- Branch management for feature development
-
Staging Environment:
- Automated testing of deployment changes
- Performance testing with production-like data volumes
- UAT with selected business users
-
Production Deployment:
- Scheduled deployment windows
- Rollback procedures for failed deployments
- Post-deployment validation