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

mind the character limit when generating table names #60

Closed
rudolfix opened this issue Sep 2, 2022 · 3 comments
Closed

mind the character limit when generating table names #60

rudolfix opened this issue Sep 2, 2022 · 3 comments

Comments

@rudolfix
Copy link
Collaborator

rudolfix commented Sep 2, 2022

when table names are composed of several components (which correspond to the elements in nested json) we can easily cross the 255 chat limit of ext filesystem or table name length limit of a particular db.

  1. prevent creating component table names longer than x characters: ie. 20 chars max and then 6 chars of hash
  2. prevent creating full table names longer than 200 chars. if this is exceeded then: root_table__depth_hash__parent_table__child_table where depth replaces all the inner tables (depth: number of replaces tables, hash: some hash on replaced content)
@rudolfix
Copy link
Collaborator Author

example limits

  • postgres, mysql: 63 chars
  • redshift: 127 chars
  • bigquery: 320 chars

@rudolfix
Copy link
Collaborator Author

ad 2. the length would be configurable so the trim function can be used to create file names and and database names

in case of both the original file name may be retrieved by reverse lookup in the table list in the schema: each name is trimmed to desired length and then compared to the name we look for

@rudolfix
Copy link
Collaborator Author

closed by #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant