cube-js / cube-js/cube_dbt

cube_dbt does not handle all dbt model contract data types from Snowflake

Open
#9 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Looking at https://github.com/cube-js/cube_dbt/blob/main/src/cube_dbt/column.py#L29-L45, cube_dbt only maps a handful of types to cube.dev's five (5) supported dimension types (https://cube.dev/docs/reference/data-model/types-and-formats#dimension-types).

The documentation on cube.dev's site states that there are only a few supported types, but not why only those.
> Column types should match [dimension types](https://cube.dev/docs/reference/data-model/types-and-formats#dimension-types) or a few supported aliases:
> -- https://cube.dev/docs/reference/python/cube_dbt

We are using Snowflake, dbt, cube.dev, and cube_dbt.

The following contract snippet builds successfully in dbt IDE, but our developers want to be more specific (ex. `data_type: timestamp_ntz`) and :
```
- name: last_modified_at_utc
description: >
{{ doc("last_modified_at_utc") }}
data_type: timestamp
```

We then get the following error:
```
Unknown column type of .: timestamp_ntz
```
from this line of code: https://github.com/cube-js/cube_dbt/blob/main/src/cube_dbt/column.py#L47

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.