Skip to main content

Module project

Module project 

Source
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.
ColumnOptions
One entry of a columns: map.
Destination
ForEach
for_each: on an output.
LoadOptions
MetaLayer
An unmerged metadata layer. Consumers own its semantics and can explain its origin.
Output
PluginId
One plugin: its kind and name. Written <kind>/<name> (destination/s3), in messages as well as in dre.lock.
PluginRequirement
A declared plugin package.
PluginUse
A plugin the project uses: a profile’s type: or an output’s format:.
ProfileAt
Where a profile: value is written: its file, line and key, as messages name it.
Project
QueryEntry
QuotingDef
quoting: as written: an unset part inherits (table from source), else isn’t quoted.
Report
ScheduleEntry
SetDef
SourceColumn
SourceDef
A dbt-style source: tables in one schema of one system.
SourceTableDef
Template
TemplateBinding
Timing
A timings.yml entry: a timing any schedule can use by name.

Enums§

OrphanRows
for_each.on_orphan_rows.
PluginKind
A plugin’s kind; the same type the protocol uses.
PluginSource
Where a plugin comes from: dependencies.yml’s registry:, github: or local:.
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.bindings entry.
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’s file:) is read from: the project root, else templates/.
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. Changing format drops 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 of yaml (the report’s file) by the rule in crate::template_file.
template_sheets