Skip to content

Understanding the code that produces the number of built objects in the log #11172

Answered by QMalcolm
sadeka4 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sadeka4 so the log in question is an instance of the LogModelResult event. There are additional similar events in dbt-core: LogFreshnessResult, LogNodeNoOpResult, LogSnapshotResult, LogSeedResult, and LogTestResult. Something similar about all of these is that they all have a total attribute. This total is the number of nodes selected for execution in the given run, which is calculated in _runtime_initialize of GraphRunnableTask. We can see in this function that the total num_nodes is the "selected for execution" nodes that are one of

  • Exposure
  • UnitTest
  • SavedQuery
  • Source
  • "nodes" (Can be any "ManifestNode")
    • Analysis
    • SignularTestNode
    • HookNode
    • ModelNode
    • SqlNode
    • GenericTestNode
    • SnapshotNode

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sadeka4
Comment options

Answer selected by sadeka4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants