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

drop table cascade : Syntax error at or near 'cascade' #389

Open
olivd4400 opened this issue May 30, 2024 · 0 comments
Open

drop table cascade : Syntax error at or near 'cascade' #389

olivd4400 opened this issue May 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@olivd4400
Copy link

Describe the bug

When using materialized='table' in models

{{ config(
    materialized='table',
    file_format='parquet',
    store_failures_as="table"
) }}

dbt run throws following error

== SQL ==
/* {"app": "dbt", "dbt_version": "1.7.15", "profile_name": "dbtODStest", "target_name": "dev", "node_id": "model.dbtODStest.table_test_ods"} */
drop view if exists dbt_demo.table_test_ods cascade

The generated SQL drop command seems to be incorrect since "cascade" keyword is not supported
https://docs.aws.amazon.com/athena/latest/ug/drop-table.html

With materialized='incremental', everything works fine

System information

The output of dbt --version:

Core:
  - installed: 1.7.15
  - latest:    1.8.1  - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - postgres: 1.7.15 - Update available!
  - spark:    1.7.1  - Update available!
  - glue:     1.7.2  - Up to date!
@olivd4400 olivd4400 added the bug Something isn't working label May 30, 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