During dbt execution, the @requires.project
decorator creates the final selector objects used in the graph. The SelectorConfig
class loads selectors from the project configuration, while the selector_config_from_data
function parses these selectors.
In @requires.preflight
, dbt reads CLI flags, environment variables, and the parameter's default value. It resolves these inputs based on their precedence order and stores the resolved value in global flags. When loading selectors, the selection_criteria_from_dict
function resolves the indirect selection value to the global flags value if not set. This ensures correct resolution of the indirect selection value.