dbt-labs / dbt-labs/dbt-adapters

[Feature] Update Column and related macros to be collation aware

Open
#1,532 0 comments 1 reaction 0 assignees View on GitHub
triage:product type:enhancement
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

### Is this your first time submitting a feature request?

- [x] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [x] I have searched the existing issues, and I could not find an existing issue for this feature
- [x] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

### Describe the feature

In https://github.com/dbt-labs/dbt-adapters/pull/1527 we found a couple things:
1. We don't really have a way for adapters to reason about collation today
2. Handling situations where we want to update the datatype while preserving collation is somewhat tricky

At present both databricks and snowflake adapters handle collation in their own way and most other adapters don't include _any_ handling at all.

At a minimum we should update the base `Column` class to include an optional `collation` property and relevant macros.

Beyond this we should think about whether we want to support:
1. collation as a model level configuration:
2. Syncing collation updates between tables i.e. if an upstream table's collation changes for a column should we cascade that downstream

### Describe alternatives you've considered

_No response_

### Who will this benefit?

_No response_

### Are you interested in contributing this feature?

_No response_

### Anything else?

_No response_

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.