Guilherme Henrique Campos Botelho
06/18/2026, 8:21 PMMarvin
06/18/2026, 8:21 PMMarvin
06/18/2026, 8:23 PMPrefectDbtRunner has a way to suppress those callback-driven per-node logs/events:
python
from prefect_dbt import PrefectDbtRunner
runner = PrefectDbtRunner(_disable_callbacks=True)
result = runner.invoke(["ls"])
# You still get the dbt result object
print(result.result)
A few important notes:
- _disable_callbacks=True prevents PrefectDbtRunner from registering the Prefect/dbt event callbacks that emit the per-node logs.
- You still get the invocation result, including result.result.
- This is an internal/private constructor argument, not a documented public setting, so treat it as version-sensitive.
I verified this from the source:
- `_disable_callbacks` in `PrefectDbtRunner` constructor
- callback creation logic in `invoke()`
So the short answer is:
- Supported public setting/config? No, I couldn’t find a documented public callback/logging config for this.
- Practical way while still using PrefectDbtRunner? Yes: PrefectDbtRunner(_disable_callbacks=True).
Example:
python
from prefect_dbt import PrefectDbtRunner
runner = PrefectDbtRunner(
_disable_callbacks=True,
)
result = runner.invoke(["ls", "--select", "my_selector"])
# Consume dbt output as usual
print(result.result)
If you want, I can also help you:
- check whether your installed prefect-dbt version includes this flag, or
- suggest a safe fallback pattern if you’re on an older release where _disable_callbacks is not available.