Skip to main content

Module render

Module render 

Source
Expand description

Runtime Jinja rendering: one environment per connection a Binding uses (its queries’ SQL) plus one for output paths and template values. Provides run.*, var(), env_var(), run_query(), columns(), ref(), source(), target.name, connection.*, destination.*, profile(), the calendar functions in crate::dates and every macro in macros/.

Mode::Parse renders without a database, as dbt’s parse does, to find every source() a query calls: run_query() returns no rows, columns() none, connection.* nothing, and raise_error() doesn’t fire. Limited renders the values that choose a connection or a source (every profile:, a source’s database/schema/identifier), where only var(), env_var(), run.* and target.name exist.

Structs§

Column
One column of a relation, as columns() returns it.
Connection
One profile target as templates see it: connection.*, destination.* and profile('name').*.
Limited
Renders the values that choose a connection or a source: every profile: value and a source’s profile, database, schema and identifier. Only var(), env_var(), run.*, target.name and the calendar functions exist, because these are rendered before any connection is chosen: the parse pass, dre ls and the manifest need no database.
QueryRows
Rows returned to templates by run_query().
Quoting
Which parts of a source’s name to quote.
RenderError
Renderer
RendererConfig
ResolvedSource
A declared source table with its fields rendered for one Binding: what source() returns.
RunContext
Ambient run.* context.

Enums§

Mode
How a Renderer treats the database.

Traits§

Connections
Where connection, destination and profile() get their values. role is connection or destination; None finds the profile in whichever section has it.
QueryRunner
Executes run_query() SQL on the Binding’s sessions: on profile’s connection, else on the renderer’s own.

Functions§

cli_var_value
var() (--var first, then the Binding’s vars, then the default) and env_var(). A --var value as YAML 1.2’s core rules read it: true/false, null/~, integers (no leading zeros), floats, and flow lists and maps ([a, b], {k: v}) are typed; anything else stays a string (yes, NO, 2026-01-31, 010, 1.0.0). Quoting forces a string ('"false"'), and an empty value is the empty string.

Type Aliases§

SourceResolver
Resolves source('name', 'table') for one Binding.