--- id: dbt-extractor version: "0.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # dbt-extractor — A tool to analyze and extract information from Jinja used in dbt projects. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install dbt-extractor uv add dbt-extractor poetry add dbt-extractor ## Description # dbt extractor ## Understanding dbt-extractor This repository contains a tool that processes the most common jinja value templates in dbt model files. The tool depends on tree-sitter and the tree-sitter-jinja2 library. ![demo app](demo/demo.gif) ## Getting started - Read the [introduction](https://docs.getdbt.com/docs/introduction/) and [viewpoint](https://docs.getdbt.com/docs/about/viewpoint/) of dbt ## Strategy The current strategy is for this processor to be 100% certain when it can accurately extract values from a given model file. Anything less than 100% certainty returns an exception so that the model can be rendered with python Jinja instead. There are two cases we want to avoid because they would risk correctness to user's projects: 1. Confidently extracting values that would not be extracted by python jinja (false positives) 2. Confidently extracting a set of values that are missing values that python jinja would have extracted. (misses) If we instead error when we could have confidently extracted values, there is no correctness risk to the user. Only an opportunity to expand the rules to encompass this class of cases as well. Even though jinja in dbt is not... ## AI interpretation — verify before relying dbt-extractor parses and extracts Jinja template values from dbt model files with high confidence, using tree-sitter to identify refs, sources, and config values without executing Python Jinja rendering. Verdict: dbt-extractor is a production-ready, actively maintained tool for static Jinja extraction in dbt projects with no known vulnerabilities. Its conservative extraction strategy (100% confidence or error) prioritizes correctness over coverage. The Apache-2.0 license and broad platform support make it accessible, though the compiled Rust dependency adds moderate install complexity. [View on SkillFed](https://skillfed.io/packages/dbt-extractor) · [View on PyPI](https://pypi.org/project/dbt-extractor/)