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

Error using dbt snapshot command on Hive target table #457

Open
1 task
boxysean opened this issue Dec 10, 2024 · 0 comments
Open
1 task

Error using dbt snapshot command on Hive target table #457

boxysean opened this issue Dec 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@boxysean
Copy link

Expected behavior

A team I'm working with would like dbt snapshot would work as-intended with dbt-trino and Hive target tables.

Actual behavior

With Trino using a catalog in Hive as a target, on the first run for a specific model a snapshot runs successfully, but on the second run it throws the error

TrinoUserError(type=USER_ERROR, name=NOT_SUPPORTED, message="Modifying Hive table rows is only supported for transactional tables", query_id=20241203_213508_00292_xjxt3

After deleting and manually creating the target table ‘current_data_snapshot’ with below query, the issue is fixed.

create table dbt_etl_wbdm_t34.current_data_snapshot
    STORED AS ORC
    TBLPROPERTIES ('transactional'='true')
    as
select, id, name, amount, updated_at, dbt_scd_id, dbt_updated_at, dbt_valid_from, dbt_valid_to
from dbt_etl_wbdm_t34.current_data_snapshot__dbt_tmp

Steps To Reproduce

Run dbt snapshot twice with a dbt snapshot, configured on Trino with a Hive target table. The second time it runs, it will return an error as shown above.

Log output/Screenshots

No response

Operating System

Windows

dbt version

1.8

Trino Server version

TBC

Python version

TBC

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@boxysean boxysean added the bug Something isn't working label Dec 10, 2024
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

1 participant