[Feature] `dbt compile` list compiled code for each batch for microbatch incremental models
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this your first time submitting a feature request?
- [x] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [x] I have searched the existing issues, and I could not find an existing issue for this feature
- [x] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
### Describe the feature
Currently, running `dbt compile -s [microbatch incremental model]` returns one set of compiled code with *no* date filters and no visibility into the list of batches to be processed.
It would be very helpful if it instead returned the output of each batch that would be run (basically, if it returned the contents of each file that will be created in `/target/compiled/` if you were to run the model at the current time).
### Describe alternatives you've considered
Not sure there really is a clear alternative. It doesn't seem like there's a way to see the list of batches to be processed without just running the model? (You can infer from the settings but you can't actually list the batches explicitly without running.)
Edit 4/16/26: I guess you can [use the `--empty` flag](https://docs.getdbt.com/reference/commands/run?version=1.10#the---empty-flag) to sort of achieve this result, but it still requires actually executing `dbt run` which for our microbatch models (running against BigQuery) is significantly slower (even if no data is actually being read). It still seems to me like this should be possible with `dbt compile` for speed/consistency. The current behavior seems borderline misleading to me.
### Who will this benefit?
This would be beneficial for anyone who uses microbatch incremental models, especially people who are newly adopting them and want to validate microbatch behavior without running. It would be in the spirit of `dbt compile` generally, to be able to inspect behavior without executing it.
### Are you interested in contributing this feature?
_No response_
### Anything else?
I am a maintainer on a mature dbt project that is exploring adopting microbatch (e.g.: https://github.com/cal-itp/data-infra/pull/4863) and this would be helpful for us as we try to refine our strategy.
Contributor guide
Assessment
This issue has not been assessed yet.