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

invalidate_hard_deletes=True directive does not work #37

Closed
1 task done
gbonazzoli opened this issue Jul 21, 2022 · 4 comments
Closed
1 task done

invalidate_hard_deletes=True directive does not work #37

gbonazzoli opened this issue Jul 21, 2022 · 4 comments
Assignees
Labels
bug Something isn't working fixed testing

Comments

@gbonazzoli
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If we have the following snapshot's confg:

{{
    config(
      target_database='psbi',
      target_schema='dwh',
      unique_key='ID',

      strategy='check',
      check_cols='all',
      invalidate_hard_deletes=True
    )
}}

and run

dbt snapshot

we obtain the following error:

04:46:44  Database Error in snapshot fct_piano_car (snapshots/fct_piano_car.sql)
04:46:44    ORA-00905: missing keyword

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output using --debug flag enabled

No response

Environment

- OS: Ubuntu 20.04
- Python:  3.8.10
- dbt: 1.1.1
- dbt-oracle: 1.1.1

What Oracle database version are you using dbt with?

19c

Additional Context

none

@gbonazzoli gbonazzoli added the bug Something isn't working label Jul 21, 2022
@aosingh aosingh self-assigned this Jul 21, 2022
aosingh added a commit that referenced this issue Jul 27, 2022
- Fixed macro in snapshot.sql
- Added a test case to test invalidation of hard deletes in snapshots
@aosingh aosingh added testing work-in-progress Planned in the upcoming release and removed investigating labels Jul 27, 2022
@aosingh
Copy link
Member

aosingh commented Jul 27, 2022

@gbonazzoli

The fix is identified and currently the PR is in-review. I will let you know once we release this.

Thank you,
Abhishek Singh

@aosingh
Copy link
Member

aosingh commented Aug 3, 2022

Hi @gbonazzoli

This is fixed in dbt-oracle==1.1.2. We have also added a test case in our suite to test invalidation of hard deletes during dbt snapshots.

You can install this version using

pip install dbt-oracle==1.1.2

Please test this and let me know if you have any questions.

@aosingh aosingh removed the work-in-progress Planned in the upcoming release label Aug 3, 2022
@aosingh aosingh added wontfix This will not be worked on fixed and removed wontfix This will not be worked on labels Aug 16, 2022
@aosingh
Copy link
Member

aosingh commented Oct 6, 2022

Closing this issue. This was fixed in dbt-oracle==1.1.2. We have also added a test case in our suite to test invalidation of hard deletes during dbt snapshots.

@aosingh aosingh closed this as completed Oct 6, 2022
@gbonazzoli
Copy link
Author

@aosingh, well done !

I confirm you that every things is now OK!

Tested and used in production with the following software versions:

root@new-airflow-dbt:~ # dbt --version
02:30:07  oracle adapter: Running in cx mode
Core:
  - installed: 1.3.0
  - latest:    1.3.0 - Up to date!

Plugins:
  - oracle:   1.3.0 - Up to date!
  - postgres: 1.3.0 - Up to date!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed testing
Projects
None yet
Development

No branches or pull requests

2 participants