dbt-labs / dbt-labs/dbt

[BUG] dbt Fusion cannot build from Redshift sources containing jsonb fields

Open
#13,574 13 comments 0 reactions 1 assignee Assigned to @dbeatty10 View on GitHub
area:static-analysis engine:v2 status:needs-repro status:triage type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

**Describe the bug**
dbt Fusion cannot source from external Postgres tables stored in Redshift if they have a `jsonb` data type field in them.

**What version of dbt Fusion is this bug in? (find out by running `dbt --version`)**
2.0.0-beta.61

**Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.**
- [X] YES
- [ ] NO

**To Reproduce**

1. Create a `source` that points to a Redshift table containing a `jsonb` field data type
2. Create a model pulling from that source, like:

```
with source as (

select * from {{ source('your_schema', 'your_table') }}

)

select * from source
```
3. Run `dbtf build --select your_model_name`

**Expected behavior**
For models in the same folder that reference tables in the same database location, but lacking `jsonb` fields, the model will build successfully. Also, in dbt Core, the model builds successfully.

**Actual behavior**
In dbt Fusion, an error returns stating either:

1. `Internal error: mismatched input '[' expecting {, '('}`
or
2. `Internal error: Type 'jsonb' unknown`

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Operating System and CPU Type (please complete the following information):**
* M3 Mac

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.