Hello everyone, I have a connection from Postgres ...
# replication-troubleshooting
b
Hello everyone, I have a connection from Postgres (AWS) to BigQuery. In this connection I am experiencing problems with some tables that have “Incremental Deduped + History” as sync configuration. Cursor Field “Updated_at” and Primary key “id”. The problem is that in the destination table the rows that are updates appear duplicated. This is not the behavior I expect for the deduped configuration. I’m using the
0.40.24
version of Airbyte, BigQuery connector
1.2.9
and Postgres connector
0.3.26
. Is anyone experiencing the same?
m
Are the dedup records in first-level/parent tables? Can you share a sample of limited view?
a
incremental + deduped for postgres does not deduplicate correctly without normalization enabled. Are you loading raw json or with normalization?
(I agree that this behavior isn't documented anywhere, btw - just what I observed when I tested this many months ago)
My solution was to run deduplication within our dbt model that is loading from the raw data
Are you using CDC syncs? That's the sync mode that we're using, and that I'd expect this to occur in. CDC can have multiple updates for the same row and they are not consolidated in the WAL by design. Airbyte itself has no logic/capability to detect and handle this.
b
• I’m not using Change Data Capture. • Running deduplication within dbt it’s an option. I think the only option. • I’m using normalization configuration. • The dedup records are in the parent tables. I attached some screenshot.
m
What field did you use for cursor field and primary key?
b
I used: Cursor Field “`updated_at`” and Primary key “`id`”.