Description
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:
- Make a schema and tables with a Teradata SQL tool with capitalisations in the naming.
- Create dbt model with lowercase schemas and identifier
- Run the dbt model
Code:
-
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.
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.