๐ฏ Welcome to Metabase Business Intelligence!
What You'll Learn
- โ Metabase setup and database connections
- โ Creating interactive questions and dashboards
- โ Advanced visualization techniques and charts
- โ User permissions and access control
- โ Embedding dashboards in applications
- โ SQL querying and custom expressions
- โ Alerts and automated reporting
- โ Enterprise deployment and scaling
๐ถ In one sentence
Metabase is a tool that lets you ask questions about your data (with clicks or SQL), build dashboards, and share them with your teamโno coding required for basic use.
๐ซ Common Mistakes in Metabase
- Heavy queries on the main DB โ Point Metabase at a replica or warehouse; avoid slowing production with ad-hoc queries.
- No filters on big tables โ Add date or key filters so dashboards don't scan entire tables and time out.
- Sharing dashboards without checking permissions โ Set up groups and data permissions so users only see what they're allowed to.
Why Metabase?
Metabase democratizes data by making business intelligence accessible to everyone, not just technical users. It's trusted by data-driven organizations like:
- ๐ฆ Nubank - serving 70M+ customers with real-time financial dashboards
- ๐ Tesla - manufacturing analytics and quality control reporting
- ๐ฏ Mailchimp - marketing campaign performance and user engagement
- ๐ช Shopify - merchant success metrics and e-commerce insights
- ๐ฌ Twitch - streaming analytics and creator performance tracking
- ๐ฑ GitLab - product usage analytics and DevOps metrics
๐ธ Screenshot: Metabase Dashboard Overview
Modern Metabase dashboard showing sales performance with interactive charts, filters, and real-time data updates.
๐ Real-World Success Story
Nubank's Data Democracy Revolution
Challenge: Nubank, Latin America's largest fintech, needed to democratize data access across 5,000+ employees while maintaining security and compliance in a regulated industry.
Before Metabase:
- ๐ **Data requests took 2-3 days** - analysts were bottlenecked
- ๐ **Only 50 people** could access data insights
- ๐ฐ **$500K annually** on enterprise BI licenses
- ๐ **Compliance challenges** with data access tracking
After Metabase Implementation:
- โก **Self-service analytics** - instant insights for all teams
- ๐ฅ **3,000+ active users** across the organization
- ๐ธ **80% cost reduction** compared to enterprise BI tools
- ๐ก๏ธ **Full audit trails** for regulatory compliance
- ๐ฑ **Mobile-first dashboards** for executive team
- ๐ **2x faster product iterations** with real-time metrics
Results: Nubank now serves 70M+ customers with data-driven decisions made in minutes, not days, leading to better product outcomes and customer satisfaction.
๐ Metabase vs Traditional BI Tools
| Feature | Metabase | Tableau | Power BI | Looker |
|---|---|---|---|---|
| Setup Time | โ 30 minutes | ๐ถ 2-4 weeks | ๐ถ 1-2 weeks | ๐ถ 4-8 weeks |
| User Friendliness | โ Extremely simple | โ Steep learning curve | ๐ถ Moderate complexity | ๐ถ Technical users only |
| Cost (Annual) | โ $0-$500/user | โ $840-$2,100/user | ๐ถ $120-$240/user | โ $5,000-$25,000/user |
| Open Source | โ Core features free | โ Proprietary only | โ Microsoft ecosystem | โ Google Cloud only |
| Mobile Experience | โ Native mobile app | ๐ถ Limited mobile | ๐ถ Basic mobile app | ๐ถ Web responsive |
| Embedding | โ Easy iframe/JS | ๐ถ Complex setup | ๐ถ Power BI Embedded | โ API-first design |
| SQL Support | โ Full SQL editor | ๐ถ Custom SQL limited | ๐ถ DAX and M language | โ LookML + SQL |
๐ The Story Behind Metabase
๐ฑ The Problem That Started It All
Sameer Al-Sakran and Tom Robinson were working at different startups and experiencing the same frustration:
- ๐ **Business users constantly asking** for reports and data
- โฐ **Hours spent creating** one-off SQL queries and charts
- ๐ฐ **Enterprise BI tools too expensive** for small companies
- ๐ค **"Why is accessing data so hard?"**
The Daily Struggle
Sameer's experience: "I spent 4 hours every Monday creating the same weekly reports for different teams. There had to be a better way."
๐ก The Vision Takes Shape
Sameer and Tom decided to solve the problem themselves:
- ๐ฏ **"Business intelligence for everyone"** - not just data analysts
- ๐ป **Web-first approach** - no desktop software required
- ๐ **Easy setup** - connect and start exploring in minutes
- ๐ฐ **Open source model** - democratize access to BI tools
๐ธ Screenshot: Early Metabase Wireframes
Original design mockups showing the simple, clean interface philosophy that became Metabase.
๐ Metabase 0.1 Launch
First public release of Metabase as open source:
- ๐ **Open sourced on GitHub** - immediate community interest
- ๐ **Visual query builder** - no SQL required for basic questions
- ๐ **Multiple database support** - MySQL, PostgreSQL, MongoDB
- ๐ **Simple charting** - bar charts, line graphs, tables
Early Metabase Installation:
# Original installation method
wget http://downloads.metabase.com/v0.1.0/metabase.jar
java -jar metabase.jar
๐ Rapid Community Growth
Metabase gained unexpected traction in the open source community:
- ๐ **10,000+ GitHub stars** in first year
- ๐ฅ **Active community** contributing features and bug fixes
- ๐ **New database adapters** added by community
- ๐ฑ **Mobile-responsive** design improvements
First Enterprise Adoption
Success story: A mid-size e-commerce company replaced their $100K/year Tableau license with Metabase, enabling 10x more users to access data insights.
๐ฐ Series A Funding
Institutional investment to scale the team and product:
- ๐ต **$8M Series A** led by NEA
- ๐ฅ **Team expansion** from 4 to 15 people
- ๐ข **Enterprise features** development begins
- โ๏ธ **Metabase Cloud** beta launched
๐ธ Screenshot: Metabase v0.30 Interface
Refined Metabase interface showing improved dashboard builder and visualization options.
๐ Enterprise Edition Launch
Addressing enterprise needs while maintaining open source core:
- ๐ก๏ธ **Advanced permissions** and access controls
- ๐ฅ **SSO integration** with SAML and LDAP
- ๐ **White-label embedding** capabilities
- ๐ **Priority support** for enterprise customers
๐ Market Recognition
Industry acknowledgment of Metabase's impact:
- ๐ **50,000+ companies** using Metabase worldwide
- ๐ **"Best Open Source BI Tool"** awards
- ๐ **Global community** with translations in 20+ languages
- ๐ฑ **Native mobile app** for iOS and Android
COVID-19 Impact Response
Community support: Metabase offered free enterprise licenses to healthcare organizations and small businesses affected by the pandemic, helping them track critical metrics during uncertain times.
๐ฐ Series B Growth
Major funding round to accelerate product development:
- ๐ต **$30M Series B** led by Nexus Venture Partners
- ๐ **Performance improvements** for large datasets
- ๐ **Advanced analytics** features (cohort analysis, funnels)
- ๐ **Multi-language support** expansion
๐ค AI and Advanced Features
Modern capabilities for the evolving data landscape:
- ๐ง **AI-powered insights** and anomaly detection
- โก **Real-time dashboards** with streaming data
- ๐ **Advanced embedding** with SDK and APIs
- ๐ **Custom visualizations** and chart types
- ๐ฏ **Metabase Collections** - organized data governance
๐ธ Screenshot: Modern Metabase Interface
Current Metabase dashboard showing AI insights, custom visualizations, and mobile-optimized design.
๐ Current Innovation
Cutting-edge features and market leadership:
- ๐จ **No-code dashboard builder** with drag-and-drop
- ๐ **Native integrations** with modern data stack tools
- โก **Sub-second query performance** with caching improvements
- ๐ **100+ database connectors** and growing
- ๐ฅ **500,000+ active installations** worldwide
๐ Metabase Impact Today
โ๏ธ Complete Metabase Installation Guide
Quick Start - Get Running in 5 Minutes
Download Metabase JAR File
The simplest way to start with Metabase
# Download latest Metabase
wget http://downloads.metabase.com/latest/metabase.jar
# Or using curl
curl -O http://downloads.metabase.com/latest/metabase.jar
# File size: ~300MB
# Java 8+ required
๐ System Requirements:
- โ **Java 8 or higher** (OpenJDK recommended)
- ๐พ **1GB RAM minimum** (2GB+ recommended)
- ๐ฝ **1GB disk space** (plus space for data)
- ๐ **Network access** to your databases
๐ธ Screenshot: Metabase Download Page
Official Metabase downloads page showing latest version and installation options.
Launch Metabase
# Start Metabase (default port 3000)
java -jar metabase.jar
# Custom port
java -jar metabase.jar -Dserver.port=8080
# Expected output:
# Setting up Metabase...
# Metabase Initialization Complete
# Metabase started on port 3000
โฑ๏ธ Startup Process:
Complete Initial Setup
Open your browser and navigate to http://localhost:3000
๐ฏ Setup Wizard Steps:
๐ Step 1: Create Admin Account
Your first name
Your last name
admin@yourcompany.com
Strong password (8+ chars)
๐ข Step 2: Organization Info
Your organization name
๐ Step 3: Usage Analytics (Optional)
โ
Help improve Metabase (recommended)
๐ธ Screenshot: Metabase Setup Wizard
Initial setup screen showing account creation form and organization settings.
Connect Your First Database
๐ Example PostgreSQL Connection:
localhost or your-db-server.com
5432 (PostgreSQL default)
your_database_name
your_db_username
your_db_password
๐ก Enterprise Tip
Multiple environments: Companies like Shopify connect separate databases for production (read-only), staging (full access), and analytics warehouse (optimized for BI queries).
Create Your First Question
๐ฏ Try These Beginner Questions:
๐ Simple Count Query
Question: "How many customers do we have?"
- Click "New" โ "Question"
- Select your database โ customers table
- Choose "Raw Data" โ "Count"
- Click "Visualize"
๐ Time Series Query
Question: "How many orders per month this year?"
- Select orders table
- Count of orders
- Group by created_date (Month)
- Filter: created_date is in the current year
๐ธ Screenshot: Question Builder Interface
Metabase question builder showing intuitive drag-and-drop interface for creating queries.
Docker Installation (Recommended for Development)
Run Metabase with Docker
# Simple Docker run
docker run -d -p 3000:3000 --name metabase metabase/metabase
# With volume for data persistence
docker run -d -p 3000:3000 \
-v ~/metabase-data:/metabase-data \
-e "MB_DB_FILE=/metabase-data/metabase.db" \
--name metabase metabase/metabase
Docker Compose Setup (Production-like)
# docker-compose.yml
version: '3.8'
services:
metabase:
image: metabase/metabase:latest
ports:
- "3000:3000"
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase
MB_DB_PORT: 5432
MB_DB_USER: metabase
MB_DB_PASS: secure_password
MB_DB_HOST: postgres
depends_on:
- postgres
postgres:
image: postgres:13
environment:
POSTGRES_DB: metabase
POSTGRES_USER: metabase
POSTGRES_PASSWORD: secure_password
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
๐ Metabase Fundamentals
๐ฏ Core Concepts
Understanding Metabase's key concepts will help you build effective analytics solutions.
โ Questions
The fundamental unit in Metabase. Questions are queries that can be saved, shared, and reused.
- ๐ **Simple Questions** - Built with the query builder
- ๐ **SQL Questions** - Written in raw SQL
- ๐ **Parameterized Questions** - Dynamic with user inputs
๐ Dashboards
Collections of questions displayed together with filters and interactions.
- ๐จ **Layout control** - Drag and drop positioning
- ๐ **Cross-filtering** - Questions interact with each other
- ๐ฑ **Mobile responsive** - Automatic optimization
๐ Collections
Organizational structure for questions, dashboards, and other items.
- ๐ฅ **Permissions** - Control who sees what
- ๐ **Organization** - Folder-like structure
- ๐ท๏ธ **Tagging** - Additional categorization
๐ Your First Question
Let's create a simple question to understand how Metabase works:
Create a Simple Question
- Click "New" โ "Question"
- Choose "Simple Question"
- Select your data source (e.g., "Orders" table)
- Choose "Raw Data" to see all records
- Click "Visualize"
๐ธ Screenshot: Question Builder Interface
Metabase question builder showing table selection and basic query options.
Add Summarization
- Click "Summarize" button
- Choose "Count" to count rows
- Group by a date field (e.g., "Created At")
- Select "Month" for the date grouping
- Click "Done"
Result: A line chart showing count of orders by month
๐ Real-World Context
Twitch's Approach: Twitch uses similar simple questions to track daily active streamers, viewer engagement, and content performance across different game categories, enabling creators and partners to make data-driven content decisions.
๐ฌ Try It Yourself
Exercise 1: Sales Analysis
- Create a question showing total revenue by month
- Add a filter for the current year
- Change the visualization to a bar chart
- Save the question as "Monthly Revenue 2024"
- Add it to a new dashboard
๐ Dashboard Creation and Management
๐๏ธ Dashboard Design Principles
Effective dashboards tell a story with data and guide users to actionable insights.
๐๏ธ Visual Hierarchy
- ๐ **Most important metrics** at the top
- ๐ **Supporting details** below main KPIs
- ๐ **Consistent sizing** for similar importance
- ๐จ **Color coding** for status and categories
๐ฑ Mobile-First Design
- ๐ **Responsive layouts** that work on phones
- ๐ **Touch-friendly** interactions
- ๐ **Simplified charts** for small screens
- ๐ **Drill-down navigation** for details
โก Performance Considerations
- ๐ **Limit questions** per dashboard (< 20)
- ๐ **Pre-aggregate data** when possible
- โฐ **Cache expensive queries** appropriately
- ๐ **Refresh schedules** based on data freshness needs
๐ธ Screenshot: Executive Sales Dashboard
Monthly Revenue
New Customers
Avg Order Value
Conversion Rate
Revenue Trend (6 months)
Top Product Categories
Sales by Region
Customer Acquisition
Performance Alerts
๐ ๏ธ Building Your First Dashboard
1. ๐ Planning Phase
๐ฏ Define Your Audience
- ๐ฅ **Who** will use this dashboard?
- ๐ **What** decisions will they make?
- โฐ **When** will they check it?
- ๐ฑ **Where** will they access it?
๐ Key Metrics Selection
Example: E-commerce Executive Dashboard
- ๐ฐ **Revenue**: Daily, weekly, monthly trends
- ๐ **Orders**: Count, average value, conversion rate
- ๐ฅ **Customers**: New vs returning, lifetime value
- ๐ฆ **Products**: Top performers, inventory levels
- ๐ **Geography**: Revenue by region/country
2. ๐๏ธ Construction Phase
๐ Create Core Questions
-- Revenue by Day (SQL Question)
SELECT
DATE(order_date) as date,
SUM(total_amount) as daily_revenue,
COUNT(*) as order_count
FROM orders
WHERE order_date >= '2024-01-01'
GROUP BY DATE(order_date)
ORDER BY date;
๐ Visualization Selection
| Data Type | Best Visualization | Use Case |
|---|---|---|
| Time series | Line chart | Revenue trends over time |
| Categories | Bar chart | Sales by product category |
| Proportions | Pie chart | Traffic source breakdown |
| Single metric | Number card | Total revenue, user count |
| Geographic | Map | Sales by region/country |
3. ๐จ Layout and Polish
๐ Grid Layout
- Use Metabase's 18-column grid system
- KPI cards: 3-6 columns wide
- Charts: 6-12 columns wide
- Tables: 12-18 columns wide
๐จ Color and Branding
- Use consistent color schemes
- Brand colors for key metrics
- Red/green for good/bad performance
- Neutral colors for supporting data
๐ Advanced Dashboard Features
๐ Dashboard Filters
Allow users to slice and dice data interactively:
-- SQL with dashboard parameters
SELECT
product_category,
SUM(revenue) as total_revenue
FROM sales
WHERE date_created >= {{start_date}}
AND date_created <= {{end_date}}
AND region = {{selected_region}}
GROUP BY product_category
ORDER BY total_revenue DESC;
- ๐ **Date range pickers** for time-based analysis
- ๐ **Dropdown filters** for categories
- ๐ข **Number filters** for thresholds
- ๐ **Location filters** for geographic data
๐ Cross-Filtering
Enable questions to interact with each other:
- Click on a chart element to filter other questions
- Hover to highlight related data points
- Drill-down from summary to detail views
- Breadcrumb navigation for complex filters
๐ธ Screenshot: Cross-Filtering in Action
Dashboard showing how clicking on a pie chart segment filters the adjacent table and time series chart.
๐ฑ Auto-Refresh and Subscriptions
Keep data current and deliver insights proactively:
- โฐ **Auto-refresh** dashboards every 15 minutes to 24 hours
- ๐ง **Email subscriptions** with PDF attachments
- ๐ฑ **Slack integration** for alerts and updates
- ๐จ **Conditional alerts** when metrics exceed thresholds
๐ Real-World Dashboard Examples
๐ฎ Gaming Company KPI Dashboard
Discord's Analytics Approach:
๐ Top Row - Key Metrics (Full Width)
- ๐ฐ Daily Active Revenue (DAR)
- ๐ฅ Daily Active Users (DAU)
- โฑ๏ธ Average Session Duration
- ๐ Retention Rate (Day 1, 7, 30)
๐ Middle Section - Trends (Half Width Each)
- ๐ **Left:** DAU/MAU trends over 90 days
- ๐ฐ **Right:** Revenue trends with forecasting
๐ Bottom Section - Drill-Downs (Third Width Each)
- ๐ Revenue by geographic region
- ๐ฑ Usage by platform (mobile/desktop/web)
- ๐ฏ Top performing features/channels
๐ Charts and Visualizations
๐จ Choosing the Right Chart Type
The right visualization makes complex data instantly understandable. Here's a comprehensive guide to Metabase's chart options:
๐ Comparison Charts
๐ Bar Charts
Best for: Comparing categories or ranking items
Data requirements: 1 dimension + 1-3 metrics
Example use cases:
- Sales by product category
- Employee performance rankings
- Website traffic by source
- Revenue by sales region
โ๏ธ Configuration Tips
- Limit to 10-15 bars for readability
- Use horizontal bars for long category names
- Sort by value for ranking scenarios
- Add data labels for precise values
๐ธ Screenshot: Sales by Product Category Bar Chart
Revenue by Product Category (Q4 2024)
๐ฅง Pie Charts
Best for: Showing parts of a whole (proportions)
Data requirements: 1 dimension, values that sum to 100%
Example use cases:
- Market share distribution
- Budget allocation by department
- Traffic source breakdown
- Customer segment distribution
โ ๏ธ Use Sparingly
- Limit to 5-7 slices maximum
- Combine small slices into "Other"
- Consider donut charts for modern look
- Avoid 3D effects (distort perception)
๐ธ Screenshot: Traffic Source Breakdown Pie Chart
Traffic Sources Distribution (Last 30 Days)
๐ Time Series Charts
๐ Line Charts
Best for: Showing trends and changes over time
Data requirements: Date/time field + 1-5 metrics
Example use cases:
- Revenue growth over months
- Website visitors daily trends
- Stock price movements
- Temperature variations
๐ Advanced Features
- Multiple series for comparison
- Trend lines and forecasting
- Area charts for cumulative data
- Annotations for key events
๐ธ Screenshot: Revenue Growth Line Chart
Monthly Revenue Growth (2024)
๐ Area Charts
Best for: Cumulative values and stacked categories over time
Example use cases:
- Revenue breakdown by product line
- User acquisition by channel
- Cumulative sales targets
- Resource usage over time
๐ข Single Value Charts
๐ท๏ธ Number Cards
Best for: Highlighting key performance indicators (KPIs)
Design tips:
- Large, bold numbers for easy scanning
- Include percentage change indicators
- Use color coding (green/red) for performance
- Add context with subtitles or comparisons
๐ฏ Gauge Charts
Best for: Progress toward goals or targets
Example use cases:
- Sales quota achievement
- Project completion percentage
- Performance scores (0-100)
- Customer satisfaction ratings
๐บ๏ธ Geographic Visualizations
๐ Region Maps
Best for: Geographic distribution of data
Data requirements: Country/state/region + metric
Configuration:
- Color intensity represents values
- Hover tooltips for detailed data
- Support for country, state, and custom regions
- Drill-down to more specific geographies
๐ Pin Maps
Best for: Specific locations with coordinates
Example use cases:
- Store locations with sales data
- Customer distribution
- Delivery routes and times
- Event locations and attendance
๐ Data Tables
๐ Enhanced Tables
Best for: Detailed data exploration and lookup
Features:
- Sortable columns
- Search and filtering
- Conditional formatting
- Column totals and summaries
- Export to CSV/Excel
- Cell-level drill-down
๐ Advanced Visualization Techniques
๐ Combo Charts
Combine different chart types to show related metrics:
Example: Revenue and Conversion Rate
- ๐ **Bar chart** for monthly revenue (left y-axis)
- ๐ **Line chart** for conversion rate (right y-axis)
- ๐ฏ **Shows relationship** between volume and efficiency
-- Data for combo chart
SELECT
DATE_TRUNC('month', order_date) as month,
SUM(total_amount) as revenue,
COUNT(*) * 100.0 / COUNT(DISTINCT session_id) as conversion_rate
FROM orders o
LEFT JOIN sessions s ON o.session_id = s.id
GROUP BY month
ORDER BY month;
๐ Conditional Formatting
Use colors and formatting to highlight important data points:
๐จ Color Rules
- ๐ด **Red**: Values below target (< 90%)
- ๐ก **Yellow**: Close to target (90-100%)
- ๐ข **Green**: Above target (> 100%)
๐ Progress Bars
- Visual representation of goal completion
- Embedded in table cells
- Custom color schemes
๐ Interactive Features
Enable users to explore data dynamically:
- ๐ฑ๏ธ **Click-through actions** to related dashboards
- ๐ **Zoom and pan** for detailed exploration
- ๐ฑ **Touch gestures** on mobile devices
- ๐ **URL parameters** for bookmarkable states
โ Visualization Best Practices
๐ฏ Clarity and Focus
- One primary message per chart
- Remove unnecessary elements (chart junk)
- Use clear, descriptive titles
- Provide context with subtitles
๐จ Color Strategy
- Consistent color scheme across dashboards
- Use brand colors for key metrics
- Avoid red-green combinations (colorblind friendly)
- Reserve bright colors for important data
๐ฑ Mobile Optimization
- Test on actual mobile devices
- Use larger fonts and touch targets
- Simplify complex charts for small screens
- Consider vertical layouts
โก Performance
- Limit data points in line charts (< 100 points)
- Use aggregated data when possible
- Cache expensive queries
- Consider chart complexity vs. load time
โ๏ธ Metabase Administration
๐ฅ User Management and Permissions
Proper user management ensures data security while enabling self-service analytics across your organization.
๐ข User Roles and Responsibilities
๐ Administrator
- Full system access and configuration
- User management and permissions
- Database connections and settings
- Instance monitoring and maintenance
๐ฏ Curator
- Manage collections and organization
- Review and approve public questions
- Data model management
- Quality control and governance
๐ Analyst
- Create and share questions/dashboards
- Access to assigned databases
- SQL query capabilities
- Collection management within scope
๐ Viewer
- View shared dashboards and questions
- Export data (if permitted)
- Basic filtering and interactions
- No creation or editing capabilities
๐๏ธ Data Sandboxing
Control what data users can see based on their attributes or group membership.
๐ข Multi-Tenant Example
Scenario: SaaS platform with multiple customer organizations
Setup:
- Add user attribute:
customer_id - Create sandbox filter:
Customer ID = {{customer_id}} - Apply to tables: orders, users, analytics
- Users only see their organization's data
๐ Regional Access Example
Scenario: Sales reps should only see their region's data
Setup:
- Add user attribute:
sales_region - Create sandbox filter:
Region = {{sales_region}} - Apply to sales tables
- Regional managers see only their territory
๐ง System Configuration
๐ Database Management
๐ Connection Management
- Add/remove database connections
- Test connection health
- Configure connection pooling
- Set up read replicas for performance
๐๏ธ Data Model Curation
- Hide/show tables and fields
- Create friendly field names
- Set up field types and descriptions
- Configure foreign key relationships
๐ Data Model Best Practices
-- Example: Clean up field names
Orders table:
โโโ customer_id โ "Customer"
โโโ order_date โ "Order Date"
โโโ total_amount โ "Total ($)"
โโโ status โ "Order Status"
โโโ created_at โ [HIDDEN]
โก Performance Optimization
๐๏ธ Caching Configuration
- Question result caching (1-24 hours)
- Database schema caching
- Dashboard cache policies
- Cache invalidation strategies
โฑ๏ธ Query Timeout Settings
- Maximum query execution time
- Database-specific timeouts
- Resource limiting for heavy queries
- Async query processing
๐ Performance Monitoring
-- Query performance analysis
Admin โ Tools โ Query Performance
- Slowest queries by execution time
- Most frequently run queries
- Cache hit rates by question
- Database connection utilization
๐ Security Settings
๐ Authentication
- LDAP/Active Directory integration
- SAML SSO configuration
- Google/GitHub OAuth setup
- Multi-factor authentication
๐ก๏ธ Security Policies
- Password complexity requirements
- Session timeout settings
- IP address restrictions
- Audit logging configuration
๐ Monitoring and Maintenance
๐ Usage Analytics
Understanding how your Metabase instance is being used helps optimize performance and user experience.
๐ Key Metrics to Monitor
- ๐ฅ **Active users** (daily, weekly, monthly)
- โ **Question creation** and usage patterns
- ๐ **Dashboard views** and interaction rates
- ๐๏ธ **Database query volume** and performance
- โฑ๏ธ **Response times** for different query types
- ๐พ **System resource** usage (CPU, memory, disk)
๐ Usage Analysis Queries
-- Most popular dashboards by views
SELECT
d.name as dashboard_name,
COUNT(dv.id) as total_views,
COUNT(DISTINCT dv.user_id) as unique_viewers,
AVG(dv.duration_ms / 1000.0) as avg_view_time_seconds
FROM dashboards d
LEFT JOIN dashboard_views dv ON d.id = dv.dashboard_id
WHERE dv.timestamp >= NOW() - INTERVAL '30 days'
GROUP BY d.id, d.name
ORDER BY total_views DESC
LIMIT 20;
๐จ Alerting and Notifications
โ ๏ธ System Alerts
- Database connection failures
- High query error rates
- System resource exhaustion
- Backup failures
๐ Data Quality Alerts
- Data freshness issues
- Unexpected value ranges
- Missing data scenarios
- Schema changes
๐ข Enterprise Administration
๐ High Availability Setup
โ๏ธ Load Balancing
- Multiple Metabase instances behind load balancer
- Shared application database (PostgreSQL/MySQL)
- Session affinity for WebSocket connections
- Health check endpoints
๐พ Database Clustering
- Read replicas for analytics workloads
- Connection pooling and failover
- Backup and disaster recovery
- Cross-region replication
๐ Advanced Security
๐ก๏ธ Audit and Compliance
- Complete audit trails
- SOC 2 compliance support
- GDPR data handling
- Custom retention policies
๐ Enterprise SSO
- Advanced SAML configurations
- Just-in-time user provisioning
- Group-based permission mapping
- Custom authentication flows
โก Advanced Metabase Features
๐ Custom SQL and Advanced Queries
While Metabase's query builder handles most use cases, SQL questions give you unlimited flexibility for complex analytics.
๐ Joining Multiple Tables
-- Customer lifetime value with detailed breakdown
SELECT
c.customer_id,
c.first_name || ' ' || c.last_name as customer_name,
c.signup_date,
COUNT(DISTINCT o.order_id) as total_orders,
SUM(o.total_amount) as lifetime_value,
AVG(o.total_amount) as avg_order_value,
-- Customer tier based on lifetime value
CASE
WHEN SUM(o.total_amount) >= 10000 THEN 'Platinum'
WHEN SUM(o.total_amount) >= 5000 THEN 'Gold'
WHEN SUM(o.total_amount) >= 1000 THEN 'Silver'
ELSE 'Bronze'
END as customer_tier,
-- Recency analysis
DATE_PART('days', CURRENT_DATE - MAX(o.order_date)) as days_since_last_order,
-- Frequency analysis
CASE
WHEN DATE_PART('days', CURRENT_DATE - c.signup_date) > 0 THEN
COUNT(DISTINCT o.order_id)::float /
(DATE_PART('days', CURRENT_DATE - c.signup_date) / 30.0)
ELSE 0
END as orders_per_month
FROM customers c
LEFT JOIN orders o ON c.customer_id = o.customer_id
WHERE c.signup_date >= '2023-01-01'
GROUP BY c.customer_id, c.first_name, c.last_name, c.signup_date
HAVING COUNT(DISTINCT o.order_id) > 0
ORDER BY lifetime_value DESC;
Shopify's Usage: Similar queries help Shopify merchants understand their customer base, enabling personalized marketing campaigns and retention strategies.
๐ Window Functions for Advanced Analytics
-- Cohort retention analysis
WITH monthly_cohorts AS (
SELECT
customer_id,
DATE_TRUNC('month', first_order_date) as cohort_month,
DATE_TRUNC('month', order_date) as order_month
FROM (
SELECT
o.customer_id,
o.order_date,
MIN(o.order_date) OVER (PARTITION BY o.customer_id) as first_order_date
FROM orders o
) t
),
cohort_data AS (
SELECT
cohort_month,
order_month,
DATE_PART('month', AGE(order_month, cohort_month)) as month_number,
COUNT(DISTINCT customer_id) as customers
FROM monthly_cohorts
GROUP BY cohort_month, order_month
),
cohort_sizes AS (
SELECT
cohort_month,
COUNT(DISTINCT customer_id) as cohort_size
FROM monthly_cohorts
WHERE cohort_month = order_month
GROUP BY cohort_month
)
SELECT
cd.cohort_month,
cs.cohort_size,
cd.month_number,
cd.customers as retained_customers,
ROUND(cd.customers * 100.0 / cs.cohort_size, 2) as retention_rate
FROM cohort_data cd
JOIN cohort_sizes cs ON cd.cohort_month = cs.cohort_month
WHERE cd.month_number <= 12 -- First 12 months
ORDER BY cd.cohort_month, cd.month_number;
๐ Time Series Analysis
-- Revenue growth with moving averages and year-over-year comparison
WITH daily_revenue AS (
SELECT
DATE(order_date) as date,
SUM(total_amount) as daily_revenue
FROM orders
WHERE order_date >= '2022-01-01'
GROUP BY DATE(order_date)
),
enriched_data AS (
SELECT
date,
daily_revenue,
-- 7-day moving average
AVG(daily_revenue) OVER (
ORDER BY date
ROWS BETWEEN 6 PRECEDING AND CURRENT ROW
) as ma_7day,
-- 30-day moving average
AVG(daily_revenue) OVER (
ORDER BY date
ROWS BETWEEN 29 PRECEDING AND CURRENT ROW
) as ma_30day,
-- Year-over-year comparison
LAG(daily_revenue, 365) OVER (ORDER BY date) as revenue_previous_year,
-- Month-over-month growth
LAG(daily_revenue, 30) OVER (ORDER BY date) as revenue_previous_month
FROM daily_revenue
)
SELECT
date,
daily_revenue,
ROUND(ma_7day, 2) as moving_avg_7day,
ROUND(ma_30day, 2) as moving_avg_30day,
revenue_previous_year,
CASE
WHEN revenue_previous_year > 0 THEN
ROUND((daily_revenue - revenue_previous_year) * 100.0 / revenue_previous_year, 2)
ELSE NULL
END as yoy_growth_percent,
CASE
WHEN revenue_previous_month > 0 THEN
ROUND((daily_revenue - revenue_previous_month) * 100.0 / revenue_previous_month, 2)
ELSE NULL
END as mom_growth_percent
FROM enriched_data
WHERE date >= '2023-01-01'
ORDER BY date;
๐ Embedding and Integration
Embed Metabase dashboards and questions directly into your applications for seamless user experiences.
๐ Performance Optimization
๐พ Caching Strategies
๐ Multi-Level Caching
- **Question results**: 1-24 hours based on data freshness
- **Dashboard cache**: Composite caching for multiple questions
- **Database metadata**: Schema information caching
- **Application cache**: Redis/Memcached for high-traffic instances
โ๏ธ Cache Configuration Best Practices
- ๐ **Real-time data**: 5-15 minute cache
- ๐ **Daily reports**: 4-24 hour cache
- ๐ **Historical analysis**: 24+ hour cache
- ๐ **Reference data**: Cache until schema changes
๐ Query Optimization
โก Performance Tips
- Use database indexes on frequently filtered columns
- Limit result sets with appropriate WHERE clauses
- Pre-aggregate data in materialized views
- Use column-based filtering instead of row-level functions
๐ Before vs After Optimization
-- SLOW: Function on every row
SELECT customer_id, EXTRACT(YEAR FROM order_date) as year, SUM(amount)
FROM orders
WHERE EXTRACT(YEAR FROM order_date) = 2024
GROUP BY customer_id, EXTRACT(YEAR FROM order_date);
-- FAST: Index-friendly date comparison
SELECT customer_id, 2024 as year, SUM(amount)
FROM orders
WHERE order_date >= '2024-01-01'
AND order_date < '2025-01-01'
GROUP BY customer_id;
๐๏ธ Data Architecture
๐ Analytics-Optimized Schema
- **Star schema**: Fact tables with dimension lookups
- **Columnstore indexes**: For analytical queries
- **Partitioning**: By date for large time-series data
- **Read replicas**: Separate analytics from transactional load
๐ก Real-World Metabase Projects
๐ช Project 1: E-commerce Analytics Suite
Build a comprehensive analytics platform for an e-commerce business with customer insights, product performance, and operational metrics.
๐ Dashboard Portfolio
๐ฏ Executive Dashboard
- Daily/weekly/monthly revenue trends
- Customer acquisition and retention rates
- Average order value and conversion rates
- Geographic performance breakdown
๐ Product Analytics
- Best and worst performing products
- Inventory turnover rates
- Category performance analysis
- Product recommendation effectiveness
๐ฅ Customer Intelligence
- Customer lifetime value segments
- Cohort retention analysis
- Purchase behavior patterns
- Churn prediction and prevention
๐๏ธ Implementation Approach
- **Data Integration**: Connect to e-commerce platform APIs, payment processors, and customer support systems
- **Data Modeling**: Create clean, normalized tables with proper relationships
- **Question Library**: Build reusable questions for common metrics
- **Dashboard Design**: Create role-specific dashboards with appropriate permissions
- **Automation**: Set up email subscriptions and Slack notifications
- **Training**: Onboard business users with hands-on workshops
๐ฏ Expected Business Impact
- ๐ **20% increase** in marketing ROI through better campaign targeting
- ๐ฐ **15% reduction** in customer acquisition cost
- ๐ **25% improvement** in inventory turnover
- โฐ **5 hours/week saved** on manual reporting
๐ฅ Project 2: Healthcare Operations Dashboard
Design a comprehensive healthcare management system with patient flow tracking, resource utilization, and quality metrics.
๐ฅ Key Features
- ๐ **Real-time patient tracking** through admission to discharge
- ๐จโโ **Staff utilization** and scheduling optimization
- ๐๏ธ **Bed occupancy** and resource availability
- ๐ **Medication tracking** and inventory management
- ๐ **Quality metrics** and regulatory compliance
- ๐ฐ **Financial performance** and billing analytics
๐ HIPAA Compliance Features
- Row-level security for patient data
- Audit logging for all data access
- Role-based permissions by department
- Data masking for non-clinical users
๐ Project 3: Educational Institution Analytics
Create a student performance and institutional effectiveness platform for universities and schools.
๐ Academic Metrics
- ๐ **Student performance** tracking and early warning systems
- ๐ฏ **Course effectiveness** and instructor evaluation
- ๐ **Enrollment trends** and capacity planning
- ๐ฐ **Financial aid** distribution and effectiveness
- ๐ **Graduation rates** and career outcomes
- ๐ฑ **Digital engagement** with online learning platforms
๐ฏ Hands-On Metabase Exercises
๐ฐ Exercise 1: Building Your First Analytics Dashboard
๐ฏ Objective
Create a comprehensive business dashboard using Metabase's query builder and visualization tools.
๐ Scenario
You're the analytics lead for a growing online bookstore. The CEO wants a dashboard to track key business metrics and make data-driven decisions.
๐ Tasks
- Connect to the sample bookstore database
- Create questions for the following metrics:
- ๐ Total books sold this month
- ๐ฐ Revenue trend over the last 6 months
- ๐ Top 10 bestselling books
- ๐ Sales by geographic region
- ๐ฅ Customer acquisition trend
- Design a dashboard layout with proper visual hierarchy
- Add interactive filters for date ranges and regions
- Set up automatic email delivery for weekly updates
- Share the dashboard with different user groups
โ Success Criteria
- Dashboard loads in under 5 seconds
- All visualizations are appropriate for the data type
- Filters work correctly across all questions
- Mobile layout is readable and functional
- Email subscriptions deliver successfully
๐ Exercise 2: Advanced SQL Analytics
๐ฏ Objective
Build sophisticated analytics using custom SQL queries, including cohort analysis, funnel analysis, and predictive metrics.
๐ช Analytics Challenges
- **Customer Cohort Analysis**: Track monthly customer retention rates
- **Purchase Funnel**: Analyze conversion rates from browse to purchase
- **RFM Segmentation**: Segment customers by Recency, Frequency, and Monetary value
- **Seasonal Trends**: Identify seasonal patterns in sales data
- **Churn Prediction**: Calculate probability of customer churn
๐ Starter SQL Templates
-- Cohort Analysis Template
WITH first_purchase AS (
SELECT
customer_id,
MIN(order_date) as first_purchase_date
FROM orders
GROUP BY customer_id
),
cohort_months AS (
-- Your code here: Create monthly cohorts
-- Hint: Use DATE_TRUNC and calculate month differences
)
-- Complete the cohort retention calculation
-- RFM Analysis Template
WITH rfm_calc AS (
SELECT
customer_id,
MAX(order_date) as last_order_date,
COUNT(*) as frequency,
SUM(total_amount) as monetary_value
FROM orders
WHERE order_date >= CURRENT_DATE - INTERVAL '12 months'
GROUP BY customer_id
)
-- Your code here: Calculate RFM scores and segments
๐ข Exercise 3: Enterprise Deployment
๐ฏ Objective
Set up a production-ready Metabase instance with proper security, performance optimization, and governance.
๐ง Implementation Requirements
- **Infrastructure Setup**:
- Docker-based deployment with load balancing
- PostgreSQL backend for application data
- SSL/TLS encryption for all connections
- Backup and disaster recovery plan
- **Security Configuration**:
- SAML SSO integration with Active Directory
- Row-level security for multi-tenant data
- Audit logging and compliance reporting
- Data encryption at rest and in transit
- **Performance Optimization**:
- Query caching strategy implementation
- Database read replica configuration
- Performance monitoring and alerting
- Resource usage optimization
- **Governance Framework**:
- Data governance policies and procedures
- User training and onboarding program
- Content organization and approval workflow
- Usage analytics and adoption tracking
๐ Evaluation Metrics
- System uptime and reliability (>99.5%)
- Query performance (95% under 5 seconds)
- User adoption rate (>80% monthly active users)
- Security compliance score
- Cost optimization vs. baseline
๐ Learning Resources and Next Steps
๐ Official Resources
๐ ๏ธ Tools and Integrations
- Database connectors and drivers
- Third-party visualization plugins
- API clients and SDKs
- Monitoring and alerting tools
๐ฏ Practice Datasets
- **Sample E-commerce**: Orders, customers, products
- **Financial Services**: Transactions, accounts, investments
- **Healthcare**: Patient records, treatments, outcomes
- **Education**: Student performance, courses, enrollments
- **SaaS Metrics**: Users, subscriptions, usage analytics
๐ Advanced Topics
- Custom visualization development
- Advanced embedding patterns
- Performance optimization techniques
- Multi-tenant architecture design
- Enterprise security implementation
๐ Recommended Certification Path
- ๐ฐ **Metabase Fundamentals** - Dashboard creation and basic analytics
- ๐ **Advanced Analytics** - SQL mastery and complex visualizations
- โ๏ธ **Administration** - User management, permissions, and performance
- ๐ข **Enterprise Deployment** - Production setup and governance
- ๐ **Specialization** - Embedding, API integration, or industry-specific analytics
๐ญ Short reflection
In one sentence: why is it important to define row-level or column-level permissions in Metabase before sharing a dashboard with stakeholders?
โ CORE (Must know)
- Connect to DB; create questions (SQL or builder); save as questions.
- Build dashboards with filters; share and set permissions.
- Visualizations: line, bar, table, pivot; customize and embed when needed.
๐ NON-CORE (Good to know)
- Pulses, embedding, audit; Metabase Cloud.