[Bug] `dbt compile --write-catalog` panics on DuckDB: expected `table_owner` as Utf8, got `Int32`
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
### Is this a new bug in dbt Fusion?
- [x] I believe this is a new bug in dbt Fusion
- [x] I have searched the existing issues and could not find a duplicate
### Current Behavior
`dbt compile --write-catalog` against a DuckDB profile fails reproducibly while materialising `catalog.json`. Fusion successfully fetches the catalog rows from DuckDB ("Fetched full catalog.json results"), but the subsequent Arrow→JSON step panics with a `dbt9002` Internal Error: it expects `table_owner` to be an Arrow `Utf8` / `GenericStringType` column but DuckDB returns it as `Int32`.
`dbt parse` against the same project works fine and writes a valid `manifest.json`. Only catalog generation is broken.
### Expected Behavior
`dbt compile --write-catalog` against a DuckDB profile should produce a valid `catalog.json` without crashing, matching the behaviour of `dbt-core 1.11.x` + `dbt-duckdb 1.10.x` against the same project and profile.
### Steps To Reproduce
1. Install Fusion 2.0.0-preview.177:
```bash
curl --proto '=https' --tlsv1.2 -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh -s -- --version 2.0.0-preview.177 --to "$HOME/.local/bin"
```
2. Clone any dbt project with a DuckDB profile. For a public minimal repro, use
the dbt-bouncer test project:
```bash
git clone https://github.com/godatadriven/dbt-bouncer.git
cd dbt-bouncer
```
(Its `dbt_project/` directory has a `profiles.yml` pointing at a file-backed DuckDB database.)
3. Confirm `dbt parse` works — it should succeed:
```bash
~/.local/bin/dbt parse \
--profiles-dir ./dbt_project \
--project-dir ./dbt_project \
--target-path ./target_fusion
```
4. Now run `dbt compile --write-catalog` — this is where it crashes:
```bash
~/.local/bin/dbt compile --write-catalog \
--profiles-dir ./dbt_project \
--project-dir ./dbt_project \
--target-path ./target_fusion
```
### Relevant log output
```shell
[info ] Preparing to write catalog.json
[info ] Fetched full catalog.json results
[error] [Unexpected (dbt9002)]: Internal Error: expected column of type
arrow_array::array::byte_array::GenericByteArray>
not found, available are: Some(Field {
name: "table_owner",
data_type: Int32,
nullable: true,
dict_id: 0,
dict_is_ordered: false,
metadata: {}
})
```
### Environment
```markdown
- OS: Linux 6.8.0 (Ubuntu 24.04 derivative)
- CPU: x86
- dbt Fusion: `dbt-fusion 2.0.0-preview.177`
- Adapter + version: DuckDB
```
### Which database adapter are you using?
other (describe in Additional Context)
### Is this a discrepancy vs. dbt Core?
- [x] Yes — this works in dbt Core but not dbt Fusion
### Additional Context
Impact for us: we're trying to add a Fusion CI surface to [dbt-bouncer](https://github.com/godatadriven/dbt-bouncer) (https://github.com/godatadriven/dbt-bouncer/issues/779) so every PR validates manifest/catalog/run-results checks under Fusion. The catalog crash blocks the work; our branch is parked until this is resolved.
Contributor guide
Assessment
This issue has not been assessed yet.