Periagoge
Concept
9 min readagency

AI-Assisted LookML Development | Reduce Coding Time by 70%

AI generates and refines LookML code by understanding model structure and business logic, handling the syntax and framework knowledge that makes hand-coding tedious and error-prone. When development time drops, you scale analytics outputs without proportionally scaling headcount.

Aurelius
Why It Matters

LookML, Looker's modeling language, is powerful but notoriously time-consuming to write and maintain. Analytics engineers spend hours translating business requirements into dimensions, measures, and explores—often repeating similar patterns across multiple models. A single typo in your SQL can break dashboards across your organization, and keeping documentation synchronized with code changes becomes a full-time job.

AI assistants are fundamentally changing this reality. Tools like GitHub Copilot, ChatGPT, Claude, and specialized analytics AI can now generate complete LookML files from natural language descriptions, convert SQL queries into LookML syntax, and even suggest optimal modeling patterns based on your data warehouse schema. Early adopters report 60-70% reductions in development time and significantly fewer syntax errors.

For analytics professionals, this shift means moving from code writer to code reviewer—spending less time on repetitive syntax and more time on strategic decisions about how data should be modeled, what metrics truly matter to the business, and how to make insights more accessible across the organization.

What Is It

AI-assisted LookML development refers to using artificial intelligence tools to generate, modify, and optimize LookML code—the modeling language that defines how Looker accesses and presents data from your warehouse. Instead of manually writing dimensions, measures, joins, and explores from scratch, analytics engineers can describe what they need in plain English and have AI generate syntactically correct LookML code instantly. These AI assistants understand LookML syntax, common modeling patterns, and best practices, functioning as an expert pair programmer that's available 24/7. The technology ranges from code completion tools integrated into your IDE to conversational AI that can architect entire view files based on your database schema and business requirements. AI assistants can also refactor existing LookML, suggest performance optimizations, and help maintain consistency across your modeling layer.

Why It Matters

LookML development is a critical bottleneck in most analytics teams. The average analytics engineer spends 40-60% of their time writing and debugging LookML code, time that could be spent on analysis, stakeholder collaboration, or strategic data architecture decisions. As organizations grow, LookML projects become increasingly complex—with hundreds of view files, intricate join logic, and thousands of dimensions and measures to maintain. Manual coding at this scale leads to inconsistencies, technical debt, and long backlogs of data modeling requests. AI assistance directly addresses these pain points by accelerating initial development, reducing errors, and making it easier to maintain code quality standards. This matters financially: a typical analytics engineer costs $120,000-180,000 annually, so recovering even 20% of their time represents $24,000-36,000 in value per person per year. Beyond efficiency, AI-assisted development democratizes LookML creation, allowing less experienced team members to contribute effectively while learning proper patterns from AI-generated code.

How Ai Transforms It

AI transforms LookML development across four key dimensions. First, code generation speed increases dramatically—what once took 30 minutes to code manually now takes 2-3 minutes with AI assistance. You can describe a dimension in natural language ('create a dimension for customer lifetime value calculated as the sum of all order totals for each customer') and receive properly formatted LookML code including appropriate SQL, type declarations, and formatting. GitHub Copilot and Cursor AI excel at auto-completing entire code blocks based on your context, while ChatGPT and Claude can generate complete view files from database schema information.

Second, AI handles the tedious pattern recognition and repetition that consumes analytics engineer time. If you need to create similar dimensions across multiple views, AI can extrapolate the pattern and generate consistent code. Tools like Cody AI and Tabnine learn from your existing LookML codebase, suggesting code that matches your team's conventions and style. This consistency is crucial for maintainability—AI ensures naming conventions, formatting standards, and documentation practices remain uniform across hundreds of files.

Third, AI serves as an error prevention layer. LookML syntax errors are notoriously easy to make—misplaced commas, incorrect indentation, or forgetting required parameters can break entire explores. AI assistants trained on millions of code examples catch these issues before they reach production. They also suggest optimizations like derived tables versus persistent derived tables, appropriate use of indexes, and SQL patterns that perform better in your specific data warehouse (Snowflake, BigQuery, Redshift).

Fourth, AI accelerates learning and knowledge transfer. New team members can ask AI to explain existing LookML code, translate business logic into proper syntax, or suggest best practices for complex scenarios like many-to-many joins or period-over-period calculations. This reduces onboarding time from months to weeks. Advanced AI tools like Looker's emerging AI features can even analyze your entire LookML project and suggest refactoring opportunities, identify unused code, and highlight performance bottlenecks—tasks that would require days of manual code review.

Key Techniques

  • Natural Language to LookML Translation
    Description: Describe the dimension, measure, or explore you need in plain English, then have AI generate the complete LookML code. Provide context about your data model and business logic. For example, prompt Claude or ChatGPT with your database schema and ask it to 'create a measure for 30-day active users' or 'build an explore joining orders to customers with appropriate relationship settings.' Review and refine the generated code. This technique works best when you provide schema context, existing code examples, and clear business requirements.
    Tools: ChatGPT, Claude, GitHub Copilot Chat
  • Intelligent Code Completion
    Description: Enable AI-powered autocomplete in your IDE that predicts entire code blocks based on your current context. Start typing a dimension or measure name, and the AI suggests the complete implementation including SQL logic, type definitions, and formatting. Accept suggestions with a tab key, significantly accelerating coding velocity. This works exceptionally well for repetitive patterns like creating multiple similar dimensions or implementing standard metric calculations across views.
    Tools: GitHub Copilot, Cursor AI, Tabnine, Cody AI
  • Schema-to-Model Generation
    Description: Provide your database schema (tables, columns, relationships) to an AI assistant and have it generate starter LookML view files with appropriate dimensions, measures, and suggested explores. This technique is invaluable when onboarding new data sources or building data models for new business domains. The AI can infer appropriate LookML types (string, number, time), suggest primary keys, and recommend initial measures based on column names and data types. You then refine and enhance the generated models.
    Tools: ChatGPT, Claude, Custom GPTs trained on LookML
  • SQL-to-LookML Conversion
    Description: Convert existing SQL queries into proper LookML syntax by feeding them to an AI assistant. This is particularly useful when business analysts provide SQL-based metric definitions that need to be formalized in LookML. The AI translates the SQL logic into appropriate dimension groups, measures with sql parameters, and derived tables when necessary. This technique bridges the gap between ad-hoc SQL analysis and production data models.
    Tools: GitHub Copilot, ChatGPT, Claude
  • Code Review and Optimization
    Description: Paste existing LookML code into an AI assistant and ask it to identify issues, suggest optimizations, or ensure it follows best practices. AI can spot inefficient SQL patterns, recommend appropriate use of persistent derived tables for expensive calculations, suggest missing indexes, and identify consistency issues across your codebase. Use this technique during pull request reviews or when refactoring legacy LookML projects.
    Tools: ChatGPT, Claude, GitHub Copilot
  • Documentation Generation
    Description: Have AI automatically generate documentation for your LookML code, including descriptions for dimensions and measures, usage examples, and business logic explanations. Provide the AI with your LookML file and context about what the data represents, and it will create clear, business-friendly documentation. This solves the perennial problem of outdated or missing LookML documentation, making your data models more accessible to business users.
    Tools: ChatGPT, Claude, GitHub Copilot

Getting Started

Begin by setting up GitHub Copilot or Cursor AI in your development environment—these tools integrate directly with VS Code and other IDEs where you write LookML. Start small: use AI assistance for routine tasks like creating standard dimensions from database columns or generating boilerplate code for new view files. As you build confidence, graduate to more complex tasks like having AI generate measure definitions from business requirements or create explores with proper join logic. Create a prompt library with your most common LookML patterns—save effective prompts that consistently generate quality code for reuse. For instance, develop a standard prompt template for generating customer-related dimensions that includes your naming conventions and preferred SQL patterns. Test AI-generated code thoroughly in development environments before promoting to production. Establish a review process where AI-generated LookML is peer-reviewed just like human-written code—AI accelerates development but doesn't eliminate the need for human oversight. Consider creating a custom GPT or Claude Project trained on your organization's LookML style guide and common patterns for even better results. Finally, use AI to document your existing LookML codebase—this creates valuable context for future AI assistance and helps new team members understand your data model faster.

Common Pitfalls

  • Accepting AI-generated code without understanding it—this creates technical debt when you need to modify or debug the code later. Always review and comprehend what the AI produces.
  • Providing insufficient context to the AI, resulting in generic code that doesn't match your specific data warehouse, performance requirements, or business logic. Always include schema information, existing patterns, and clear requirements.
  • Over-relying on AI for complex join logic or aggregation patterns without validating the results against expected outputs. AI can confidently generate incorrect SQL for nuanced scenarios—always test generated measures against known good queries.
  • Neglecting to establish team standards for AI use, leading to inconsistent code quality. Create guidelines for when AI assistance is appropriate and what level of review is required.
  • Ignoring AI suggestions for performance optimization because 'the code works.' AI often spots inefficiencies humans miss—evaluate optimization recommendations seriously.

Metrics And Roi

Track time saved on LookML development by measuring 'time to complete' for common tasks (creating a view file, building an explore, defining complex measures) before and after implementing AI assistance. Most teams see 50-70% reductions. Monitor code quality metrics including pull request cycle time, number of bugs caught in code review versus production, and consistency scores across your LookML project. Calculate direct cost savings: if AI assistance recovers 20 hours per month per analytics engineer, that's $1,200-1,800 in salary costs saved monthly per person (based on $120K-180K annual salaries), or $14,400-21,600 annually. Measure velocity improvements through metrics like number of data model requests completed per sprint, time from request to production deployment, and backlog reduction rate. Track adoption metrics including percentage of LookML code with AI assistance, team satisfaction scores, and reduction in onboarding time for new analytics engineers. Monitor business impact through increased stakeholder satisfaction with analytics delivery speed, reduction in time from question to insight, and growth in self-service analytics adoption. Quality metrics should include syntax error rates, production incidents related to LookML bugs, and time spent on debugging versus new development. For a team of five analytics engineers, effective AI assistance typically generates $75,000-100,000 in annual value through time savings alone, not counting quality improvements and accelerated delivery.

Helpful guides
Aurelius
Work & Leadership
Related Concepts
Peri
Questions about AI-Assisted LookML Development | Reduce Coding Time by 70%?

Peri can explain this concept, give practical examples, help you decide whether it applies to your situation, or recommend a journey if appropriate.

Ready to work on AI-Assisted LookML Development | Reduce Coding Time by 70%?

Explore related journeys or tell Peri what you're working through.