Skip to content

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

@jmkacz

Description

@jmkacz

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 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 <MODEL>.<COLUMN>: timestamp_ntz

from this line of code: https://github.com/cube-js/cube_dbt/blob/main/src/cube_dbt/column.py#L47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions