Skip to content

Feature: PostgreSQL table name differentiation #165

@justmisosoup

Description

@justmisosoup

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions