Skip to content

Do not convert model and column names to lowercase by default #263

@JiriMerunka

Description

@JiriMerunka

Describe the bug

Converting model and column names to lowercase by default generates incorrect name for models/columns with any uppercase character. It leads to

08:29:26 [WARNING]: Did not find matching node for patch with name 'model_name_with_uppercase_character' in the 'models' section of file 'models/raw/_schema.yml'

Steps to reproduce

Create model with name:
Model_name_with_uppercase_character

and its content

select cast(1 as int64) as UPPERCASE_COL

Expected results

version: 2
models:
  - name: Model_name_with_uppercase_character
    description: ""
    columns:
      - name: UPPERCASE_COL
        data_type: int64
        description: ""

Actual results

version: 2
models:
  - name: model_name_with_uppercase_character
    description: ""
    columns:
      - name: uppercase_col
        data_type: int64
        description: ""

Screenshots and log output

System information

The contents of your packages.yml file:
packages:

  - package: dbt-labs/dbt_utils
    version: 1.3.0
  - package: dbt-labs/audit_helper
    version: 0.12.1
  - package: elementary-data/elementary
    version: 0.19.4
  - package: dbt-labs/dbt_external_tables
    version: 0.11.1
  - package: dbt-labs/codegen
    version: 0.13.1

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

Core:
  - installed: 1.10.11
  - latest:    1.10.15 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - bigquery: 1.10.1 - Update available!

  At least one plugin is out of date with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

The operating system you're using:
MacOS
The output of python --version:
Python 3.12.11

Additional context

Caused by
models
lower for models

colums
lower for columns

Are you interested in contributing the fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions