MeltanoLabs / MeltanoLabs/target-postgres

bug: Error saying 'enum already exists' when trying to load pre-existing table using stream-maps

Open
#419 4 comments 0 reactions 1 assignee View on GitHub

@edgarrmondragon is already working on this.

Since Aug 27, 2024.

bug
Dominant language
Python
Stars
13
Forks
23
Avg merge
4h 45m
Merged PRs (30d)
4

Description

Target Version

0.0.14

Python Version

3.12

PostgreSQL Version

Do not know

Operating System

NA

Description

hello team! I'm using stream_maps (tap-postgres) to drop a column and sync the data into target-postgres. Config:

- name: tap-postgress
  config:
    stream_maps:
      public-table:
        column1_text: column1
        column1: __NULL__
  metadata:
    public-*:
      replication-method: FULL_TABLE
  select:
    - public-table.*

On the target side the table has been created manually (not from meltano) and has all the columns (column1 and column1_text)
When I run the sync meltano run tap-postgres target-postgres it fails with the error that enum already exist (column1 is type ENUM). If I drop the column1 (on target side) the sync works correctly and in the Inserting with SQL logs I can see that the data doesn't have any info regarding column1. column1_text has the data of column1 as it's setup on stream_maps tap side. Is there any configuration I'm missing in order to have column1 column on target side as well or no?

Link to Slack/Linen

https://meltano.slack.com/archives/C069CQNHDNF/p1724772642004549

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.