Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## dbt-teradata 1.0.0a

### Features

Applies LOWER() to schemas in list_schemas and list_schemas_without_caching
### Fixes

### Docs
Expand Down
6 changes: 3 additions & 3 deletions dbt/include/teradata/macros/adapters.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{% macro teradata__list_schemas(database) %}
{% call statement('list_schemas', fetch_result=True, auto_begin=False) -%}
SELECT DatabaseName AS schema_name
SELECT LOWER(DatabaseName) AS schema_name
FROM {{ information_schema_name(database) }}.DatabasesV
{%- endcall %}

Expand Down Expand Up @@ -176,8 +176,8 @@ CURRENT_TIMESTAMP(6)
{% call statement('list_relations_without_caching', fetch_result=True) -%}
SELECT
NULL AS "database",
TableName AS name,
DatabaseName AS "schema",
LOWER(TableName) AS name,
LOWER(DatabaseName) AS "schema",
CASE WHEN TableKind = 'T' THEN 'table'
WHEN TableKind = 'V' THEN 'view'
ELSE TableKind
Expand Down