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

Change auto_assign_transformers to handle id types #1325

Closed
amontanez24 opened this issue Mar 21, 2023 · 0 comments · Fixed by #1338
Closed

Change auto_assign_transformers to handle id types #1325

amontanez24 opened this issue Mar 21, 2023 · 0 comments · Fixed by #1338
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@amontanez24
Copy link
Contributor

Problem Description

As a user, it would be nice for my primary keys to be generated correctly even if they're numeric.

Expected behavior

  • Any column with an sdtype of 'id' should be assigned to a RegexGenerator. The default regex depends on the following cases:
    • If the regex is provided in the metadata, use
    RegexGenerator(regex_format=<from metadata>, enforce_uniqueness=is_primary_or_alternate_key)
    • If there is no regex but they dtype is an int than use
    RegexGenerator(regex_format="\d{30}", enforce_uniqueness=is_primary_or_alternate_key)
    • If there is no regex and the dtype is not an int use
    RegexGenerator(regex_format="[0-1a-z]{5}", enforce_uniqueness=is_primary_or_alternate_key)
  • Notice that we should only enforce uniqueness if the column is a primary or alternate key.
@amontanez24 amontanez24 added the feature request Request for a new feature label Mar 21, 2023
@amontanez24 amontanez24 added this to the 1.0.0 milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants