Help please, I have strictly followed the dbt snapshot documentation for creating a simple snapshot, but no matter what I try, I always ended up getting the below “duplication” error.
00:59:13 Completed with 1 error and 0 warnings:
00:59:13
00:59:13 Database Error in snapshot snap_representative (snapshots/snap_representative.sql)
100090 (42P18): Duplicate row detected during DML action
Row Values: [redacted]
compiled code at target/run/snap_representative.sql
00:59:13
00:59:13 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
You may be having duplicate rows in the data, please check those rows once. Copy the queries from the dbt logs and run those queries in your data warehouse and check for duplicates.
Note: @Manikanta Divvela
originally posted this reply in Slack. It might not have transferred perfectly.
https://youtu.be/yuat80nc5Ng|https://youtu.be/yuat80nc5Ng
Note: @Jeremy Yeo
originally posted this reply in Slack. It might not have transferred perfectly.