elementary icon indicating copy to clipboard operation
elementary copied to clipboard

Support PostgreSQL with replicas

Open pavel93yan opened this issue 1 year ago • 2 comments

The issue happens when trying to set up elementary on PostgreSQL with replicas. We have AWS Aurora PostgreSQL. When I try itialize elementary the errors like "cannot delete from table "elementary_test_results" because it does not have a replica identity and publishes deletes" are thrown. Some elemetary models are not even created because of this issue. I'll try to create them manually and then set replica identity to full for all of them but that is not very convenient. Is there the way to set all these models for my use case?

  • dbt Version 1.6.1
  • elemetary version 0.10.0

pavel93yan avatar Dec 27 '23 07:12 pavel93yan

Hey @pavel93yan , The Elementary tables are dbt models. How do you solve this for dbt models in your projects?

Maayan-s avatar Jan 01 '24 15:01 Maayan-s

Hey @Maayan-s ! For regular dbt models that I created in our dbt project, I used custom post-hook to create primary key for the table if it doesn't exist. If a table didn't have column with unique values, I would come up with post-hook which alters replica indetity to FULL.

pavel93yan avatar Jan 03 '24 21:01 pavel93yan