[Regression] Metadata query lacking dbt tracker comment
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this a regression in a recent version of dbt-core?
- [x] I believe this is a regression in dbt-core functionality
- [x] I have searched the existing issues, and I could not find an existing issue for this regression
### Which versions does this regression span?
dbt 1.x → dbt v2.x (worked in 1.x, broke after upgrading to v2.x)
### Current Behavior
in dbt-core 2.0.0a4 it is observed that initial metadata queries (`SHOW OBJECTS IN SCHEMA ...`) do not contain a sql comment with dbt context on snowflake
### Expected/Previous Behavior
dbt-core 1.11.11 emits a dbt context comment with all queries including initial metadata queries, expecting that dbt-core 2.x would carry forward this behavior for tracking purposes
### Steps To Reproduce
Start a dbt-core 1.11.11 run to snowflake (python client local)
observe query history in snowflake pertaining to run
initial queries observed:
```sql
show terse schemas in database DEVELOPER
limit 10000
/* {"app": "dbt", "dbt_version": "1.11.11", "profile_name": "dbt_sandbox", "target_name": "default", "connection_name": "list_DEVELOPER"} */
```
```sql
show objects in DEVELOPER.ALEX_H_SCHEMA
limit 10000
/* {"app": "dbt", "dbt_version": "1.11.11", "profile_name": "dbt_sandbox", "target_name": "default", "connection_name": "list_DEVELOPER_ALEX_H_SCHEMA"} */;
```
Start a dbt-core 2.0.0a4 run to snowflake (rust client local)
observe query history in snowflake pertaining to run
initial queries observed:
```sql
SHOW OBJECTS IN SCHEMA "DEVELOPER"."ALEX_H_SCHEMA" LIMIT 10000
```
### Relevant log output
```shell
```
### Environment
```markdown
- OS: Fedora 44 kver 7.1.3-200.fc44
- Python: 3.14.6 (uv managed version)
- dbt (working version): 1.11.11
- dbt (regression version): 2.0.0a4
```
### Which database adapter are you using with dbt?
snowflake
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.