Skip to content

Commit

Permalink
docs: Add a link to column type mapping source code for cube_dbt
Browse files Browse the repository at this point in the history
  • Loading branch information
igorlukanin committed Dec 10, 2024
1 parent 553b408 commit 47f6e69
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions docs/pages/reference/python/cube_dbt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,10 @@ print(column.type)
# For example, 'string'
```

Column types should match [dimension types][ref-dimension-types] or a few
supported aliases:

| Column types | Dimension type |
| --------------------------------------- | -------------- |
| `time`, `date`, `datetime`, `timestamp` | `time` |
| `string` | `string` |
| `number`, `numeric` | `number` |
| `boolean`, `bool` | `boolean` |
| `geo`, `geography` | `geo` |
`cube_dbt` package applies a set of heuristics to map database-specific
types to [dimension types][ref-dimension-types]. You can check the [source
code](https://github.com/cube-js/cube_dbt/blob/main/src/cube_dbt/column.py#L217-L233)
for implementation details.

If a column type is not defined in the metadata of a dbt project, `string`
is used by default.
Expand Down

0 comments on commit 47f6e69

Please sign in to comment.