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 snapshot is not working when following the documentation in README.md #356

Closed
selmanmoon opened this issue Jul 22, 2023 · 1 comment · Fixed by #365
Closed

dbt snapshot is not working when following the documentation in README.md #356

selmanmoon opened this issue Jul 22, 2023 · 1 comment · Fixed by #365

Comments

@selmanmoon
Copy link

I'm following the part https://github.com/dbt-athena/dbt-athena#snapshots, which includes a working example. However, when I run this part step by step I'm getting following error;

19:43:37  Running with dbt=1.5.2
19:43:37  Registered adapter: athena=1.5.0
19:43:37  Encountered an error:
Parsing Error
  at path []: Snapshots must be configured with a 'strategy', 'unique_key', and 'target_schema'.

model_snapshot_1 file that I used (based on README.md part);


{{
    config(
      strategy='timestamp',
      updated_at='refresh_timestamp',
      unique_key='id',
      target_schema = 'default'
    )
}}

select *
from {{ ref('model') }}

{% endsnapshot %}

To fix this error, I added the following config parameter target_schema = 'default', with this now I'm receiving another error;

19:44:10  Running with dbt=1.5.2
19:44:10  Registered adapter: athena=1.5.0
19:44:20  1 of 1 START snapshot default.model_snapshot_1 ................................. [RUN]
19:44:26  1 of 1 ERROR snapshotting default.model_snapshot_1 ............................. [ERROR in 5.52s]
19:44:26  
19:44:26  Finished running 1 snapshot in 0 hours 0 minutes and 15.54 seconds (15.54s).
19:44:26  
19:44:26  Completed with 1 error and 0 warnings:
19:44:26  
19:44:26  Compilation Error in snapshot model_snapshot_1 (snapshots/model_snapshot_1.sql)
19:44:26    macro 'dbt_macro__create_schema' takes not more than 1 argument(s)

Could you please let me know if this is a problem from my end or if there is a need to update the documentation along with snapshot functionality in athena plugin?

Thanks a lot!

@C123R
Copy link
Contributor

C123R commented Aug 3, 2023

Looks like something related to dbt-core fix: dbt-labs/dbt-core#4993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants