Expand description
The parse pass: each Binding rendered without a database, as dbt’s parse finds ref() and
source(), to learn every query’s sources and the connection it runs on. Its results feed
selection (-s source:), the manifest, dre ls and dre validate, none of which connect;
a run repeats it with its own inputs and then holds rendering to what it found.
A query’s connection, by SPEC-011’s rule:
- explicit: the query’s own
profile:and theprofile:of every source it uses. These must agree (compared as rendered names), else it’s an error naming both sides; - otherwise the inherited one: the Set’s, the report’s, the folder’s
+profile, thendefault_profile(already merged into the Binding’sprofile).
A source without a profile: never conflicts: it runs wherever its query runs.
Structs§
- Inputs
- What the parse pass renders
run.*,var()andtarget.namewith: the run’s inputs. - Parsed
Binding - A Binding after the parse pass.
- Parsed
Query - One query of a Binding after the parse pass.
- Problem
- A problem found by the parse pass, at a file and line.
Constants§
- PARSE_
FAILED - The code of a template the parse pass couldn’t render.
Functions§
- binding
- Parse one Binding: render each query without a database, then resolve its connection.
varsare the Binding’s vars as the run sees them (with a schedule’s layered in). - calendar
- The run’s calendar for a report:
--timezone, else the schedule’s, else the report’s, else UTC. - resolver
- Resolves
source()for one Binding: fields rendered withlimited, once each. - run_
context - The
run.*context a Binding renders with. - run_
date run.date:DRE_RUN_DATE, elseDRE_RUN_AT’s date in the run’s timezone, else today there.