You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dbt v0.20.0, tests are now configured by default to use a schema named dbt_test__audit, which is useful for the "store failures" feature. On some databases, this is causing dbt to run an extra metadata query when --store-failures is not enabled.
On Snowflake, because of how we list objects to populate the relational cache, such a metadata query often appears in the query history as a failed statement (show terse objects in database.dbt_test__audit), leading to user confusion.
I view this as a low-priority cosmetic issue, with a simple fix: We could change the logic in _get_cache_schemas to check for relational nodes (ones that map to database objects) instead of executable nodes (ones dbt knows how to compile/execute):
This would remove Analysis, Operation, Documentation, and RPCCall from the schema-caching list, but frankly it doesn't make much sense that they were there in the first place!
The text was updated successfully, but these errors were encountered:
In dbt v0.20.0, tests are now configured by default to use a schema named
dbt_test__audit
, which is useful for the "store failures" feature. On some databases, this is causing dbt to run an extra metadata query when--store-failures
is not enabled.On Snowflake, because of how we list objects to populate the relational cache, such a metadata query often appears in the query history as a failed statement (
show terse objects in database.dbt_test__audit
), leading to user confusion.https://github.com/dbt-labs/dbt/blob/43642956a21571e4589d3f7b9a7ad69439c6d4cc/plugins/snowflake/dbt/adapters/snowflake/impl.py#L135-L141
I view this as a low-priority cosmetic issue, with a simple fix: We could change the logic in
_get_cache_schemas
to check for relational nodes (ones that map to database objects) instead of executable nodes (ones dbt knows how to compile/execute):https://github.com/dbt-labs/dbt/blob/43642956a21571e4589d3f7b9a7ad69439c6d4cc/core/dbt/adapters/base/impl.py#L304-L316
The
is_relational
method already includes logic around whether to consider tests relational:https://github.com/dbt-labs/dbt/blob/43642956a21571e4589d3f7b9a7ad69439c6d4cc/core/dbt/contracts/graph/parsed.py#L127-L133
And this is the same method we now use inside runnable tasks, to determine which schemas need creating:
https://github.com/dbt-labs/dbt/blob/43642956a21571e4589d3f7b9a7ad69439c6d4cc/core/dbt/task/runnable.py#L460-L462
This would remove
Analysis
,Operation
,Documentation
, andRPCCall
from the schema-caching list, but frankly it doesn't make much sense that they were there in the first place!The text was updated successfully, but these errors were encountered: