dbt-labs / dbt-labs/dbt

[BUG] Unsupported Databricks types `GEOMETRY` and `GEOGRAPHY`

Open
#14,601 3 comments 0 reactions 0 assignees View on GitHub
adapter:databricks 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**
The Databricks types `GEOMETRY` and `GEOGRAPHY` introduced in dbt-labs/dbt-core#13817 are not supported by the materialization macro `dbt_databricks.materialization_table_databricks`. Hence, these types cannot be defined in the model definition, nor can the model contract be enforced.

```
error: dbt1450: Error executing materialization macro 'dbt_databricks.materialization_table_databricks' for model model.dbt_xxx.xxxx: Serde JSON Error: unknown variant `geometry(25832)`, expected one of `tinyint`, `smallint`, `int`, `bigint`, `float`, `double`, `decimal`, `string`, `varchar`, `char`, `binary`, `boolean`, `date`, `timestamp_ltz`, `timestamp_ntz`, `interval`, `array`, `map`, `struct`, `variant`, `void` at line 1 column 2337
```

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

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

**To Reproduce**
```
models:
- name: geopgrahy
columns:
- name: coordinate
data_type: geometry
```

**Expected behavior**
`geometry` and `geography` should be accepted along existing data types.

**Operating System and CPU Type (please complete the following information):**
* Mac/Windows/Linux? Windows
* X86 or ARM? X86

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.