(
        self, parsed_node: IntermediateNode, config: ContextConfig,
        context=None, patch_config_dict=None
    )
Given the ContextConfig used for parsing and the parsed node,
        generate and set the true values to use, overriding the temporary parse
        values set in _build_intermediate_parsed_node.
Given the ContextConfig used for parsing and the parsed node,
        generate and set the true values to use, overriding the temporary parse
        values set in _build_intermediate_parsed_node.
Given the ContextConfig used for parsing and the parsed node generate and set the true values to use overriding the temporary parse values set in _build_intermediate_parsed_node .
def update_parsed_node_config(
        self, parsed_node: IntermediateNode, config: ContextConfig,
        context=None, patch_config_dict=None
    ) -> None:
        """Given the ContextConfig used for parsing and the parsed node,
        generate and set the true values to use, overriding the temporary parse
        values set in _build_intermediate_parsed_node.
        """

        # build_config_dict takes the config_call_dict in the ContextConfig object
        # and calls calculate_node_config to combine dbt_project configs and
        # config calls from SQL files
        config_dict = config.build_config_dict(patch_config_dict=patch_config_dict)

        # Set tags on node provided in config blocks. Tags are additive, so even if
        # config has been built before, we don't have to reset tags in the parsed_node.
        model_tags = config_dict.get('tags', [])
        for tag in model_tags:
            if tag not in parsed_node.tags:
                parsed_node.tags.append(tag)

        # If we have meta in the config, copy to node level, for backwards
        # compatibility with earlier node-only config.
        if 'meta' in config_dict and config_dict['meta']:
            parsed_node.meta = config_dict['meta']

        # unrendered_config is used to compare the original database/schema/alias
        # values and to handle 'same_config' and 'same_contents' calls
        parsed_node.unrendered_config = config.build_config_dict(
            rendered=False
        )

        parsed_node.config_call_dict = config._config_call_dict

        # do this once before we parse the node database/schema/alias, so
        # parsed_node.config is what it would be if they did nothing
        self.update_parsed_node_config_dict(parsed_node, config_dict)
        # This updates the node database/schema/alias
        self.update_parsed_node_name(parsed_node, config_dict)

        # tests don't have hooks
        if parsed_node.resource_type == NodeType.Test:
            return

        # at this point, we've collected our hooks. Use the node context to
        # render each hook and collect refs/sources
        hooks = list(itertools.chain(parsed_node.config.pre_hook,
                                     parsed_node.config.post_hook))
        # skip context rebuilding if there aren't any hooks
        if not hooks:
            return
        if not context:
            context = self._context_for(parsed_node, config)
        for hook in hooks:
            get_rendered(hook.sql, context, parsed_node, capture_macros=True)
def update_parsed_node_config ( self , parsed_node : IntermediateNode , config : ContextConfig , context = None , patch_config_dict = None ) -> None : # build_config_dict takes the config_call_dict in the ContextConfig object # and calls calculate_node_config to combine dbt_project configs and # config calls from SQL files config_dict = config . build_config_dict ( patch_config_dict = patch_config_dict ) # Set tags on node provided in config blocks. Tags are additive, so even if # config has been built before, we don't have to reset tags in the parsed_node. model_tags = config_dict . get ( 'tags' , [ ] ) for tag in model_tags : if tag not in parsed_node . tags : parsed_node . tags . append ( tag ) # If we have meta in the config, copy to node level, for backwards # compatibility with earlier node-only config. if 'meta' in config_dict and config_dict [ 'meta' ] : parsed_node . meta = config_dict [ 'meta' ] # unrendered_config is used to compare the original database/schema/alias # values and to handle 'same_config' and 'same_contents' calls parsed_node . unrendered_config = config . build_config_dict ( rendered = False ) parsed_node . config_call_dict = config . _config_call_dict # do this once before we parse the node database/schema/alias, so # parsed_node.config is what it would be if they did nothing self . update_parsed_node_config_dict ( parsed_node , config_dict ) # This updates the node database/schema/alias self . update_parsed_node_name ( parsed_node , config_dict ) # tests don't have hooks if parsed_node . resource_type == NodeType . Test : return # at this point, we've collected our hooks. Use the node context to # render each hook and collect refs/sources hooks = list ( itertools . chain ( parsed_node . config . pre_hook , parsed_node . config . post_hook ) ) # skip context rebuilding if there aren't any hooks if not hooks : return if not context : context = self . _context_for ( parsed_node , config ) for hook in hooks : get_rendered ( hook . sql , context , parsed_node , capture_macros = True )