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

Postgres table in which data exists can't be upsert unless "key" is specified in the config when creating #59

Open
uchennakevinm1 opened this issue Aug 27, 2022 · 1 comment

Comments

@uchennakevinm1
Copy link

Postgres table in which data exists can't be upsert unless "key" is specified in the config when creating  Postgres Destination connector (request: /v1/connectors). Even if the "key" field is present in the metadata
Steps to reproduce

  1. There is a table with data with the  primary "key" in Postgres
  2. Create a new pipeline
  3. Create Postgres destination connector with configs
    "settings": {
    "url": "postgresql://postgres:postgres@localhost:5432/postgres",
    table: "",
    "key": ""
    }
  4. Create Source connector that transfers the "key" in metadata (For example, Postgres or Snowflake Source)
  5. Run the pipeline -> the system is trying to transfer data by "key" which already exists
    Actual result: data isn't transferred to the Postgres table
    Expected result: The data should be updated by "key" from the metadata.

2022-05-12T13:56:39+00:00 ERR node stopped error="node 9873f4b8-61d7-483e-8b24-a52f12395ad0-acker stopped with error: error receiving ack: ERROR: duplicate key value violates unique constraint "table2_pkey" (SQLSTATE 23505)" component=pipeline.Service node_id=9873f4b8-61d7-483e-8b24-a52f12395ad0-acker stack=[{"file":"/Users/serhii/conduit/pkg/pipeline/lifecycle.go","func":"github.com/conduitio/conduit/pkg/pipeline.(*Service.runPipeline.func1","line":387},{"file":"/Users/serhii/conduit/pkg/connector/destination.go","func":"github.com/conduitio/conduit/pkg/connector.(*destination.Ack","line":194},{"file":"/Users/serhii/conduit/pkg/plugin/builtin/v1/destination.go","func":"github.com/conduitio/conduit/pkg/plugin/builtin/v1.(*destinationPluginAdapter.Ack","line":137}]

@uchennakevinm1
Copy link
Author

related to issues #58

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

No branches or pull requests

1 participant