--- id: sqlfluff-templater-dbt version: "4.3.0" license: MIT License Copyright (c) 2018-2026 Alan Cruickshank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) license_treatment: permissive maintenance: active --- # sqlfluff-templater-dbt — Lint your dbt project SQL License: permissive · Maintenance: active · Downloads: 3.7M/mo ## What it is and what it does sqlfluff-templater-dbt is a plugin that extends SQLFluff's linting capabilities to work with dbt projects. It allows SQLFluff to parse and lint dbt template syntax—Jinja2 expressions, dbt macros, and ref() calls—by rendering them through dbt's templating engine before analysis. This bridges the gap between dbt's SQL generation and SQLFluff's dialect-aware linting, letting you enforce SQL style and correctness rules across your entire dbt project. The plugin is designed for teams using dbt for ELT workflows who want to maintain consistent SQL quality and formatting standards. It integrates dbt-core and jinja2-simple-tags to handle template resolution, then applies SQLFluff's linting rules to the rendered output. You can use it to auto-fix formatting issues, catch SQL errors, and enforce organizational style guides on dbt-generated SQL. Use it for: - Enforce SQL formatting and style standards across a dbt project's models and tests. - Auto-fix spacing, indentation, and syntax issues in dbt SQL before deployment. - Catch SQL dialect-specific errors in dbt models targeting Snowflake, BigQuery, or other databases. - Integrate dbt SQL linting into CI/CD pipelines to gate model deployments on code quality. - Validate dbt macros and templated SQL for consistency across teams. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Enables SQLFluff to lint and auto-fix dbt project SQL using dbt templating, integrating dbt-core and Jinja2 template processing into SQLFluff's multi-dialect SQL linting workflow. Yes, if you use dbt and want to lint your project's SQL. The plugin is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and integrates cleanly with SQLFluff's existing multi-dialect support. Install it when you need to enforce SQL quality standards on dbt-generated code. ## Install pip install sqlfluff-templater-dbt uv add sqlfluff-templater-dbt poetry add sqlfluff-templater-dbt ## Installing sqlfluff-templater-dbt Before you install: Low install friction with a pure-Python wheel. Actively maintained with a release 7 days ago and 9853 GitHub stars. Requires sqlfluff, dbt-core, and jinja2-simple-tags as runtime dependencies. License in practice: MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike. Quickstart: pip install sqlfluff-templater-dbt from sqlfluff.core import Linter linter = Linter(dialect='snowflake', templater='dbt') result = linter.lint_string('SELECT * FROM {{ ref("my_model") }}') Requires dbt-core to be installed and a valid dbt project structure with dbt_project.yml present for template resolution. Verify before relying: - Specific dbt versions or configurations required for full compatibility with this templater plugin. - Whether the templater supports all dbt features (macros, packages, custom tests) or has known limitations. - Performance characteristics when linting large dbt projects with many models and dependencies. ## Package facts - License: MIT License Copyright (c) 2018-2026 Alan Cruickshank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 3.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags dbt sql linting, sqlfluff dbt templating, lint dbt project sql, dbt template sql formatter, dbt sql quality checks, sqlfluff dbt integration, dbt sql style enforcement, dbt-integration, sql-linting, data-engineering [View on SkillFed](https://skillfed.io/packages/sqlfluff-templater-dbt) · [View on PyPI](https://pypi.org/project/sqlfluff-templater-dbt/)