(
        self,
        block: ConfiguredBlockType,
        path: str,
        config: ContextConfig,
        fqn: List[str],
        name=None,
        **kwargs,
    )
Create the node that will be passed in to the parser context for
        "rendering". Some information may be partial, as it'll be updated by
        config() and any ref()/source() calls discovered during rendering.
Create the node that will be passed in to the parser context for
        "rendering". Some information may be partial, as it'll be updated by
        config() and any ref()/source() calls discovered during rendering.
Create the node that will be passed in to the parser context for rendering . Some information may be partial as it ll be updated by config () and any ref () / source () calls discovered during rendering .
def _create_parsetime_node(
        self,
        block: ConfiguredBlockType,
        path: str,
        config: ContextConfig,
        fqn: List[str],
        name=None,
        **kwargs,
    ) -> IntermediateNode:
        """Create the node that will be passed in to the parser context for
        "rendering". Some information may be partial, as it'll be updated by
        config() and any ref()/source() calls discovered during rendering.
        """
        if name is None:
            name = block.name
        dct = {
            'alias': name,
            'schema': self.default_schema,
            'database': self.default_database,
            'fqn': fqn,
            'name': name,
            'root_path': self.project.project_root,
            'resource_type': self.resource_type,
            'path': path,
            'original_file_path': block.path.original_file_path,
            'package_name': self.project.project_name,
            'raw_sql': block.contents,
            'unique_id': self.generate_unique_id(name),
            'config': self.config_dict(config),
            'checksum': block.file.checksum.to_dict(omit_none=True),
        }
        dct.update(kwargs)
        try:
            return self.parse_from_dict(dct, validate=True)
        except ValidationError as exc:
            msg = validator_error_message(exc)
            # this is a bit silly, but build an UnparsedNode just for error
            # message reasons
            node = self._create_error_node(
                name=block.name,
                path=path,
                original_file_path=block.path.original_file_path,
                raw_sql=block.contents,
            )
            raise ParsingException(msg, node=node)
def _create_parsetime_node ( self , block : ConfiguredBlockType , path : str , config : ContextConfig , fqn : List [ str ] , name = None , * * kwargs , ) -> IntermediateNode : if name is None : name = block . name dct = { 'alias' : name , 'schema' : self . default_schema , 'database' : self . default_database , 'fqn' : fqn , 'name' : name , 'root_path' : self . project . project_root , 'resource_type' : self . resource_type , 'path' : path , 'original_file_path' : block . path . original_file_path , 'package_name' : self . project . project_name , 'raw_sql' : block . contents , 'unique_id' : self . generate_unique_id ( name ) , 'config' : self . config_dict ( config ) , 'checksum' : block . file . checksum . to_dict ( omit_none = True ) , } dct . update ( kwargs ) try : return self . parse_from_dict ( dct , validate = True ) except ValidationError as exc : msg = validator_error_message ( exc ) # this is a bit silly, but build an UnparsedNode just for error # message reasons node = self . _create_error_node ( name = block . name , path = path , original_file_path = block . path . original_file_path , raw_sql = block . contents , ) raise ParsingException ( msg , node = node )