Skip to content

dbt.type_string() compiles to varchar(8000) #626

@pSpitzner

Description

@pSpitzner

I noticed that dbt.type_string() compiles to varchar(8000) and wondered if this is intended behaviour.

On other backends, like duckdb, or postgres in particular, it comiles to TEXT, which I think in sql server would be closer to varchar(max) than varchar(8000). Also, in the dbt docs it says _"This macro yields the database-specific data type for TEXT.", implying the unlimited length?

In my current use-case, this leads to a bit of inconsistent behaviour, and I am now wondering if I want to introduce a custom macro to ensure a string type of unlimited length. However, if other users would also expect strings of unlimited length, we might just make the change here?

Thanks!
Paul

ps: thanks for maintaining this awesome project!

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