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

For single-table use cases, make it frictionless to update Metadata #2213

Open
npatki opened this issue Sep 9, 2024 · 0 comments · May be fixed by #2186
Open

For single-table use cases, make it frictionless to update Metadata #2213

npatki opened this issue Sep 9, 2024 · 0 comments · May be fixed by #2186
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Sep 9, 2024

Problem Description

In an upcoming version of SDV, we will be consolidating the Multi and Single table metadata objects into a streamlined Metadata object. Effectively, this object is the same as multi-table, so it includes functions that are suited for detecting multiple tables at once.

However, if you have a single table, it should still be usable without adding much friction. Currently, all the Metadata updating functions require you to input a table name, which really isn't necessary when all you have is a single table.

Expected behavior

For all of the metadata update functions (listed below), make the table_name parameter optional. If necessary, this means we should move its position to be after all the required parameters.

Then update the functionality as follows:

  • If there are multiple tables in the Metadata, a table_name should be provided. If it is not provided, throw an error.
Error: There are multiple tables in your metadata. Please specify a 'table_name' to use this function.
  • But if there is only a single table in the Metadata, then it's ok if table_name is missing. Proceed with the desired functionality.

Additional context

Make the change for the following functions:

  • get_column_names
  • update_column
  • update_columns
  • update_columns_metadata
  • add_column
  • add_column_relationship
  • set_primary_key
  • remove_primary_key
  • add_alternate_keys
@npatki npatki added the feature request Request for a new feature label Sep 9, 2024
@R-Palazzo R-Palazzo self-assigned this Sep 16, 2024
@R-Palazzo R-Palazzo added this to the 1.17.0 milestone Sep 16, 2024
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