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

Provide path for SQL target developers to "max out" varchar declarations in columnarly compressed datasets #370

Closed
MeltyBot opened this issue May 4, 2022 · 3 comments

Comments

@MeltyBot
Copy link
Contributor

MeltyBot commented May 4, 2022

Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/373

Originally created by @aaronsteers on 2022-05-04 23:09:50


~~"urgency::low"

Now that https://gitlab.com/meltano/sdk/-/issues/371+ is resolved and merged, I want to open a quick stub issue to track the work to add a recommendation for those target developers who prefer a length-unlimited or length-maxed varchar declaration.

  • Columnar databases may not have any storage or performance differences based on length, for instance between varchar(10) and varchar(max).
  • Some databases may also have a high cost of running alter column and/or have alter column disallowed.

Rough implementation

One path to implement:

  • Developer overrides to_sql_type(jsonschema_type: dict) -> sqlalchemy.types.TypeEngine, calling the base class and then converting any varchar instances with varchar(max).
  • Depending upon the target implementation, and whether it makes sense to make this a user-configurable implementation choice, the developer could optionally tie this behavior to a setting like prefer_varchar_max or similar.

The above could be a simple docs update or an addition to code samples, or it could be an built-in option or implementation flag within the SDK's python code.

@MeltyBot
Copy link
Contributor Author

@stale
Copy link

stale bot commented Jul 18, 2023

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

@stale stale bot added the stale label Jul 18, 2023
@edgarrmondragon
Copy link
Collaborator

Superseded by #1812, which can be ported from a reference implementation

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

No branches or pull requests

3 participants