Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt-trino can't handle mixed case schema in profiles.yaml #131

Closed
1 task done
mdesmet opened this issue Sep 18, 2022 · 0 comments · Fixed by #132
Closed
1 task done

dbt-trino can't handle mixed case schema in profiles.yaml #131

mdesmet opened this issue Sep 18, 2022 · 0 comments · Fixed by #132
Labels
bug Something isn't working

Comments

@mdesmet
Copy link
Member

mdesmet commented Sep 18, 2022

Expected behavior

When using a schema with mixed case, I expect dbt-trino to be able to overwrite my existing tables.

Actual behavior

The first dbt run succeeds, however subsequent runs fail with

Compilation Error in model base_orders (models/base/base_orders.sql)
20:23:53    When searching for a relation, dbt found an approximate match. Instead of guessing 
20:23:53    which relation to use, dbt will move on. Please delete "datalake"."analyticstest"."base_orders", or rename it to be less ambiguous.

Steps To Reproduce

use a mixed case profile eg

my_dbt_trino_project:
  outputs:

    dev:
      type: trino
      method: none  # optional, one of {none | ldap | kerberos}
      user: admin
      database: datalake
      host: localhost
      port: 8080
      schema: analyticsTEST
      threads: 1

  target: dev

Run dbt run multiple times.

Log output/Screenshots

❯ dbt run
20:23:44 Running with dbt=1.2.1
20:23:44 Unable to do partial parsing because profile has changed
20:23:45 [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:

  • models.my_dbt_trino_project.example

20:23:45 Found 4 models, 0 tests, 1 snapshot, 0 analyses, 272 macros, 0 operations, 0 seed files, 3 sources, 0 exposures, 0 metrics
20:23:45
20:23:46 Concurrency: 1 threads (target='dev')
20:23:46
20:23:46 1 of 4 START view model analyticsTEST.base_customers ........................... [RUN]
20:23:47 1 of 4 OK created view model analyticsTEST.base_customers ...................... [SUCCESS in 0.30s]
20:23:47 2 of 4 START view model analyticsTEST.base_orders .............................. [RUN]
20:23:47 2 of 4 OK created view model analyticsTEST.base_orders ......................... [SUCCESS in 0.09s]
20:23:47 3 of 4 START view model analyticsTEST.base_payments ............................ [RUN]
20:23:47 3 of 4 OK created view model analyticsTEST.base_payments ....................... [SUCCESS in 0.11s]
20:23:47 4 of 4 START table model analyticsTEST.orders .................................. [RUN]
20:23:49 4 of 4 OK created table model analyticsTEST.orders ............................. [SUCCESS in 2.03s]
20:23:49
20:23:49 Finished running 3 view models, 1 table model in 0 hours 0 minutes and 4.24 seconds (4.24s).
20:23:49
20:23:49 Completed successfully
20:23:49
20:23:49 Done. PASS=4 WARN=0 ERROR=0 SKIP=0 TOTAL=4
❯ dbt run
20:23:53 Running with dbt=1.2.1
20:23:53 [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:

  • models.my_dbt_trino_project.example

20:23:53 Found 4 models, 0 tests, 1 snapshot, 0 analyses, 272 macros, 0 operations, 0 seed files, 3 sources, 0 exposures, 0 metrics
20:23:53
20:23:53 Concurrency: 1 threads (target='dev')
20:23:53
20:23:53 1 of 4 START view model analyticsTEST.base_customers ........................... [RUN]
20:23:53 1 of 4 ERROR creating view model analyticsTEST.base_customers .................. [ERROR in 0.01s]
20:23:53 2 of 4 START view model analyticsTEST.base_orders .............................. [RUN]
20:23:53 2 of 4 ERROR creating view model analyticsTEST.base_orders ..................... [ERROR in 0.00s]
20:23:53 3 of 4 START view model analyticsTEST.base_payments ............................ [RUN]
20:23:53 3 of 4 ERROR creating view model analyticsTEST.base_payments ................... [ERROR in 0.00s]
20:23:53 4 of 4 SKIP relation analyticsTEST.orders ...................................... [SKIP]
20:23:53
20:23:53 Finished running 3 view models, 1 table model in 0 hours 0 minutes and 0.25 seconds (0.25s).
20:23:53
20:23:53 Completed with 3 errors and 0 warnings:
20:23:53
20:23:53 Compilation Error in model base_customers (models/base/base_customers.sql)
20:23:53 When searching for a relation, dbt found an approximate match. Instead of guessing
20:23:53 which relation to use, dbt will move on. Please delete "datalake"."analyticstest"."base_customers", or rename it to be less ambiguous.
20:23:53 Searched for: "datalake"."analyticsTEST"."base_customers"
20:23:53 Found: "datalake"."analyticstest"."base_customers"
20:23:53
20:23:53 > in macro create_or_replace_view (macros/materializations/models/view/create_or_replace_view.sql)
20:23:53 > called by macro materialization_view_trino (macros/materializations/view.sql)
20:23:53 > called by model base_customers (models/base/base_customers.sql)
20:23:53
20:23:53 Compilation Error in model base_orders (models/base/base_orders.sql)
20:23:53 When searching for a relation, dbt found an approximate match. Instead of guessing
20:23:53 which relation to use, dbt will move on. Please delete "datalake"."analyticstest"."base_orders", or rename it to be less ambiguous.
20:23:53 Searched for: "datalake"."analyticsTEST"."base_orders"
20:23:53 Found: "datalake"."analyticstest"."base_orders"
20:23:53
20:23:53 > in macro create_or_replace_view (macros/materializations/models/view/create_or_replace_view.sql)
20:23:53 > called by macro materialization_view_trino (macros/materializations/view.sql)
20:23:53 > called by model base_orders (models/base/base_orders.sql)
20:23:53
20:23:53 Compilation Error in model base_payments (models/base/base_payments.sql)
20:23:53 When searching for a relation, dbt found an approximate match. Instead of guessing
20:23:53 which relation to use, dbt will move on. Please delete "datalake"."analyticstest"."base_payments", or rename it to be less ambiguous.
20:23:53 Searched for: "datalake"."analyticsTEST"."base_payments"
20:23:53 Found: "datalake"."analyticstest"."base_payments"
20:23:53
20:23:53 > in macro create_or_replace_view (macros/materializations/models/view/create_or_replace_view.sql)
20:23:53 > called by macro materialization_view_trino (macros/materializations/view.sql)
20:23:53 > called by model base_payments (models/base/base_payments.sql)
20:23:53
20:23:53 Done. PASS=0 WARN=0 ERROR=3 SKIP=1 TOTAL=4

Operating System

macos

dbt version

1.2.2

Trino Server version

396

Python version

3.9.10

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@mdesmet mdesmet added the bug Something isn't working label Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant