Expand description
Loading a DRE project directory into a resolved, validated project.
Every YAML file in the project is parsed and classified by its shape, not its name. Report config merges by report name from anywhere, then resolves with one precedence rule: Binding > report YAML > folder config (deepest wins) > project defaults > built-in defaults.
Re-exports§
pub use crate::plugins::DEPS_DIR;
Structs§
- Binding
- A Report paired with a Set (or the report’s single default Binding): everything a run needs.
- Column
Options - One entry of a
columns:map. - Destination
- ForEach
for_each:on an output.- Load
Options - Meta
Layer - An unmerged metadata layer. Consumers own its semantics and can explain its origin.
- Output
- Plugin
Id - One plugin: its kind and name. Written
<kind>/<name>(destination/s3), in messages as well as indre.lock. - Plugin
Requirement - A declared plugin package.
- Plugin
Use - A plugin the project uses: a profile’s
type:or an output’sformat:. - Profile
At - Where a
profile:value is written: its file, line and key, as messages name it. - Project
- Query
Entry - Quoting
Def quoting:as written: an unset part inherits (table from source), else isn’t quoted.- Report
- Schedule
Entry - SetDef
- Source
Column - Source
Def - A dbt-style source: tables in one schema of one system.
- Source
Table Def - Template
- Template
Binding - Timing
- A timings.yml entry: a timing any schedule can use by name.
Enums§
- Orphan
Rows for_each.on_orphan_rows.- Plugin
Kind - A plugin’s kind; the same type the protocol uses.
- Plugin
Source - Where a plugin comes from:
dependencies.yml’sregistry:,github:orlocal:. - RowErrors
for_each.on_row_error.
Constants§
- DBT_
SOURCE_ COLUMN_ KEYS - DBT_
SOURCE_ KEYS - dbt source keys DRE accepts but doesn’t use yet.
- DBT_
SOURCE_ TABLE_ KEYS - DEFAULT_
MAX_ POPULATION_ ROWS - The default
for_each.max_population_rows. - DEFAULT_
ROW_ CONCURRENCY - The default
for_each.concurrency. - DEFAULT_
RUN_ QUERY_ MAX_ ROWS - DESTINATION_
KEYS - The keys of a destination entry core reads; every other key is the plugin’s.
- FOLDER_
CONFIG_ KEYS - LOGS_
DIR - MACROS_
DIR - MESSAGE_
FORMAT - The built-in format that renders query results into a short headline.
- OUTPUT_
SHARED_ KEYS - PLUGIN_
ENTRY_ KEYS - Keys of a
plugins:entry written as a map. - PLUGIN_
KEYS - PROJECT_
FILE - PROJECT_
KEYS - QUERY_
ENTRY_ KEYS - REPORTS_
DIR - REPORT_
KEYS - SCHEDULE_
ENTRY_ KEYS - Keys of a schedules.yml entry besides its timing (
schedule::SCHEDULE_KEYS). - SET_
ENTRY_ KEYS - SOURCES_
KEY - dbt-style source declarations, in any project YAML file.
- SOURCE_
COLUMN_ KEYS - SOURCE_
KEYS - Source keys DRE reads.
- SOURCE_
TABLE_ KEYS - TARGET_
DIR - TEMPLATE_
BINDING_ KEYS - Keys of one
output.template.bindingsentry. - TEMPLATE_
FORMATS - The formats that take
output.template. - TIMINGS_
FILE - The timings file’s name. Other YAML files of timings are recognised by their shape.
Functions§
- dotted
- find_
template - Sheet names in an xlsx template, read without modifying it.
Where a template file named in YAML (
template:, a message’sfile:) is read from: the project root, elsetemplates/. - layer_
outputs - Apply one report or Set
output:layer over the inherited outputs; returns the problems. - load
- Parse and validate the project at
root. Returns the resolved project when it could be built at all, plus every diagnostic found along the way. - mentions_
each - Whether a template reads
each.*. - merge_
output - Merge an output layer over
base. Changingformatdrops the lower layers’ format options, since they belong to a different format. - output_
label - “output
name”, or “output 2” for an unnamed one, as messages name an output. - resolve_
template - Resolve an output’s
template.file, looked up from the folder ofyaml(the report’s file) by the rule incrate::template_file. - template_
sheets