Skip to content

Case Sensitivity in Schemas  #32

Closed
@JoelJuntunen

Description

@JoelJuntunen

Teradata ANSI mode which the adapter uses is case sensitive. This causes compilation errors if the schemas are defined in BTET mode and have different capitalisations since the adapter uses "where" conditions and won't find unambiguous results.

Steps To Reproduce:

  1. Make a schema and tables with a Teradata SQL tool with capitalisations in the naming.
  2. Create dbt model with lowercase schemas and identifier
  3. Run the dbt model

Code:

  1. CREATE MULTISET TABLE Schema_Name.IDENTIFIER_NAME ,FALLBACK ,
    NO BEFORE JOURNAL,
    NO AFTER JOURNAL,
    CHECKSUM = DEFAULT,
    DEFAULT MERGEBLOCKRATIO,
    MAP = TD_MAP1
    (
    field_name CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL
    )
    PRIMARY INDEX ( field_name );

{{
config(
materialized = 'table'
)
}}

with src as (
select *
from schema_name.identifier_name
)

dbt run -s {name of model}

Expected behavior

A clear and concise description of what you expected to happen.
Run clears without errors and the schemas are identified in a case insensitive way.

Screenshots and log output

If applicable, add screenshots or log output to help explain your problem.
image

The output of dbt --version:

installed version: 1.0.1
   latest version: 1.0.3
Plugins:
  - teradata: 1.0.1.1

The operating system you're using:
Windows 10
The output of python --version:
Python 3.9.9

Possible considerations:
Should the adapter support databases where there might be schemas with only differences being the capitalisation? If yes, this issue should be ignored and a workaround documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions