Skip to main content

Module jinja

Module jinja 

Source

Structs§

JinjaExtraction
All extracted information from rendering a dbt Jinja SQL template

Functions§

build_macro_prefix
Build a macro prefix string from individual macro sources, skipping any that fail to parse as valid minijinja templates. This ensures one bad macro file doesn’t disable jinja-based extraction for all models.
extract_via_jinja
Try to extract refs, sources, and config from SQL content using minijinja. Renders twice (with is_incremental() returning both false and true) and merges results to capture refs/sources from all conditional branches. Returns None if the template fails to render (caller should fall back to regex).
extract_via_jinja_with_vars
Like extract_via_jinja but resolves var() calls using the given project-level variables (parsed from dbt_project.yml).