(self)
return result
Run dbt for the query, based on the graph.
Run dbt for the query, based on the graph.
Run dbt for the query based on the graph .
def run(self):
        """
        Run dbt for the query, based on the graph.
        """
        self._runtime_initialize()

        if self._flattened_nodes is None:
            raise InternalException(
                'after _runtime_initialize, _flattened_nodes was still None'
            )

        if len(self._flattened_nodes) == 0:
            with TextOnly():
                fire_event(EmptyLine())
            msg = "Nothing to do. Try checking your model " \
                  "configs and model specification args"
            warn_or_error(msg, log_fmt=warning_tag('{}'))
            result = self.get_result(
                results=[],
                generated_at=datetime.utcnow(),
                elapsed_time=0.0,
            )
        else:
            with TextOnly():
                fire_event(EmptyLine())
            selected_uids = frozenset(n.unique_id for n in self._flattened_nodes)
            result = self.execute_with_hooks(selected_uids)

        if flags.WRITE_JSON:
            self.write_manifest()
            self.write_result(result)

        self.task_end_messages(result.results)
        return result
def run ( self ) : self . _runtime_initialize ( ) if self . _flattened_nodes is None : raise InternalException ( 'after _runtime_initialize, _flattened_nodes was still None' ) if len ( self . _flattened_nodes ) == 0 : with TextOnly ( ) : fire_event ( EmptyLine ( ) ) msg = "Nothing to do. Try checking your model " "configs and model specification args" warn_or_error ( msg , log_fmt = warning_tag ( '{}' ) ) result = self . get_result ( results = [ ] , generated_at = datetime . utcnow ( ) , elapsed_time = 0.0 , ) else : with TextOnly ( ) : fire_event ( EmptyLine ( ) ) selected_uids = frozenset ( n . unique_id for n in self . _flattened_nodes ) result = self . execute_with_hooks ( selected_uids ) if flags . WRITE_JSON : self . write_manifest ( ) self . write_result ( result ) self . task_end_messages ( result . results ) return result