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

Feature: PostgreSQL table name differentiation #165

Open
justmisosoup opened this issue Jun 6, 2024 · 0 comments
Open

Feature: PostgreSQL table name differentiation #165

justmisosoup opened this issue Jun 6, 2024 · 0 comments
Labels
feature New feature or request

Comments

@justmisosoup
Copy link

justmisosoup commented Jun 6, 2024

Bug description

Attempted to replicate data records from a table named orders to another table in the same database and schema. I assumed that I could accomplish this by setting the destination configuration table value to orders_moved (which did not yet exist).

I expected the destination connector to check for orders_moved and if it did not exist, to create it, and begin replicating data records into the new table created orders_moved. Instead, I saw no results. The destination connector flipped to degraded. I looked up the logs on our platform to find the following error:

error while nacking message: failed to write message to DLQ: DLQ nack threshold exceeded (0/1), original error: failed to execute query for record 0: ERROR: relation "orders_moved" does not exist (SQLSTATE 42P01)

I had to create the table orders_moved in the database in order for records to replicate successfully.

This was just a simple example.

Which begs the question: How would this work with multiple tables? Could there be a _prefix tag in the destination config? I would expect some way to be able to differentiate the table in the event the table might already exist in the destination.

Steps to reproduce

  1. Create an application in the test tenant.
  2. Configure a PostgreSQL source connector with a table that contains data records.
  3. Configure a PostgreSQL destination connector, set table value to a table of choice that does not exist.
  4. Deploy the application.
  5. Check the Datadog logs for the test tenant.

Version

v0.7.3

@justmisosoup justmisosoup added bug Something isn't working triage Needs to be triaged feature New feature or request labels Jun 6, 2024
@justmisosoup justmisosoup changed the title Bug/Feature: PostgreSQL table name differentiation when syncing Bug/Feature: PostgreSQL table name differentiation Jun 6, 2024
@lovromazgon lovromazgon removed the triage Needs to be triaged label Jun 10, 2024
@lovromazgon lovromazgon changed the title Bug/Feature: PostgreSQL table name differentiation Feature: PostgreSQL table name differentiation Jun 10, 2024
@lovromazgon lovromazgon removed the bug Something isn't working label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants