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

Mongodb to Postgres produces weird column names #2068

Closed
briankariuki opened this issue Nov 15, 2024 · 1 comment
Closed

Mongodb to Postgres produces weird column names #2068

briankariuki opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@briankariuki
Copy link

briankariuki commented Nov 15, 2024

dlt version

1.3.0

Describe the problem

As you can see in the image below the column should be named __is_new_cased_reported_from_initial_area

image

Another example. Note both investigation forms share the same schema in mongodb but there's an issue when mapped to postgres
image

Expected behavior

Proper column names should be in the destination table in postgres

Steps to reproduce

This uses the mongodb to postgres tutorial. My mongodb collection has alot nested entries most of which go two levels deep. Happy to share a dump for someone to reproduce this

Operating system

macOS

Runtime environment

Local

Python version

3.11

dlt data source

Mongodb

dlt destination

Postgres

Other deployment details

I'm using dagster to trigger the runs

Additional information

No response

@rudolfix
Copy link
Collaborator

@briankariuki unfortunately postgres has 64 characters identifier table limit. we are inserting a short tag when we shorten the name to fit into that limit. I'm afraid it cannot be avoided (without recompiling postgres with higher limit)

you could also condifer adding max table nesting level option to limit number of unnested tables. then maybe you do not generate such long names

@rudolfix rudolfix self-assigned this Nov 18, 2024
@rudolfix rudolfix added the question Further information is requested label Nov 18, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in dlt core library Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

2 participants