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 - Connector doesn't support view #451

Open
1 task
vignesh-clustrex opened this issue Nov 26, 2024 · 5 comments
Open
1 task

DBT Trino - Connector doesn't support view #451

vignesh-clustrex opened this issue Nov 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@vignesh-clustrex
Copy link

Expected behavior

I am using dbt-trino adapter to run dbt models, When I run model as incremental it is throwing an error like

This connector doesn't support view, why is creating view ?

I need it as table

Actual behavior

create or replace view\n "postgresql"."schema"."example_model__dbt_tmp"\n security definer\n

Steps To Reproduce

I am runnig dbt model using dbt run command, with incremental config

Log output/Screenshots

No response

Operating System

windows

dbt version

1.8.8

Trino Server version

465

Python version

3.12

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@vignesh-clustrex vignesh-clustrex added the bug Something isn't working label Nov 26, 2024
@damian3031
Copy link
Member

For the incremental strategies append and merge, dbt-trino creates a view for the temporary relation to enable faster overall incremental processing.

If your connector doesn't support views, set the views_enabled property to false to create table instead. (docs)

@vignesh-clustrex
Copy link
Author

Thanks @damian3031

As per this link, it is supporting materialized view, but if I run it is throwing an error like this connector doesn't support materialized view.

Since we use postgres database it doesn't support view in Parquet format.

It will be really helpful, if you help us to solve this.

@damian3031
Copy link
Member

@vignesh-clustrex You mixed up view and materialized view, which are different object types, so I’m a bit confused. Could you please provide your exact model configuration and the error message, so we can investigate further?

@vignesh-clustrex
Copy link
Author

@damian3031 First I was running dbt model as incremental, at that time I got this error This connector doesn't support view.

As per your comment I have set views_enabled to false and it worked.

Now when I change running dbt model with config materialized view , its throwing an error like this connector doesn't support materialized view.

@damian3031
Copy link
Member

This issue is related to the underlying trino connector, not dbt-trino itself.

Please refer to the connector documentation and/or check for relevant issues, or create a new one in https://github.com/trinodb/trino repository.

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

No branches or pull requests

2 participants