-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[destination-postgres] Intelligently handle truncation of long column names #35268
Comments
What destination are you using? Are you still using normalization or Dv2 destination? |
@marcosmarxm -- we're using destination-postgres, Dv2. |
Thanks @alvinwanyeki it looks the problem should be solved by the destination and not by the source. I'll update the ticket. |
@gisripa can you take a look in this issue. Is this expected? |
We think other destinations will also have this problem and will look into a broader solution |
@marcosmarxm Yeah the default behavior in postgres is to truncate. we plan to handle this as part of certification later. |
Looked into this more today - we would like to give users more control over the name result and don't want to make assumptions in the destination. As a bandaid, we created https://github.com/airbytehq/airbyte-internal-issues/issues/6645 to at least detect when this happens and throw an error. If you are running your own postgres instance, there is a workaround but its not great, from the docs
So you can change this value, but you have to recompile postgres - which is likely not possible for managed postgres offerings. |
@alvinwanyeki can you give destination-postgres v2.0.8 a try? It includes #36805, which adds somewhat better handling for long column names. Specifically, it keeps the start and end of the long name, and cuts out the middle section. It's not perfect (the collision checker does a dumb truncation for the first colliding name), so e.g. if your destination has a 16-char limit, and your stream has two columns
but that's just to keep backwards-compatibility with previous logic (not married to it, but it's a bigger + breaking change to do a consistent transform over all columns. tracking in https://github.com/airbytehq/airbyte-internal-issues/issues/6989 for improving the overall logic) |
@edgao, sorry for the delayed response here -- thanks for the update, i can confirm that the name collisions no longer break a sync on >v2.0.8. |
Connector Name
source-airtable
Connector Version
4.1.6
What step the error happened?
During the sync
Relevant information
Issue
Illustration
foo
from Airtable with the following columns (note that the last word is different across both columns):this_is_a_column_with_an_overly_exceedingly_long_name
this_is_a_column_with_an_overly_exceedingly_long_title
this_is_a_column_with_an_overly_exceedingly_long_
this_is_a_column_with_an_overly_exceedingly_long_
Suggested Solution
this_is_a_column_with_an_overly_exceedingly_long1
this_is_a_column_with_an_overly_exceedingly_long2
Relevant log output
No response
Contribute
The text was updated successfully, but these errors were encountered: