

So, this is the currently intended behavior, though I agree it's quite confusing because these are virtually opposite behaviors: (The docs generate task is a sub-task of compile, so it inherits much of the same behavior.) Both dbt compile and dbt docs generate compile all selected resources, with lots of concurrency, and that compilation doesn't happen in any deterministic order. The issue is that the query is being called when dbt compiles the hook. If we don't use do run_query() and instead return the query string like so:

Do a docs generate (you can repeat this a handful of times Sorry this caused such confusion! I'm not going to remove the triage label, as I'd still like someone from Execution to have a chance to internalize what's going on here.Ġ3:40:57 1 of 1 OK created table model dbt_jyeo.my_item. Ġ3:40:53 Concurrency: 1 threads (target='dev')Ġ3:40:53 1 of 1 START table model dbt_jyeo.my_item. 03:40:45 Found 1 model, 0 tests, 0 snapshots, 0 analyses, 181 macros, 2 operations, 0 seed files, 0 sources, 0 exposures, 0 metricsĠ3:40:53 1 of 1 START hook: snowflake.on-run-start.0.
