Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 578
Add support for 'overwrite' option in register_table#3290
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -70,12 +70,13 @@ def load_table(self, identifier: str | Identifier) -> Table: | ||
| def table_exists(self, identifier: str | Identifier) -> bool: | ||
| raise NotImplementedError | ||
| def register_table(self, identifier: str | Identifier, metadata_location: str) -> Table: | ||
| def register_table(self, identifier: str | Identifier, metadata_location: str, overwrite: bool = False) -> Table: | ||
| """Register a new table using existing metadata. | ||
| Args: | ||
| identifier (Union[str, Identifier]): Table identifier for the table | ||
| metadata_location (str): The location to the metadata | ||
| overwrite (bool): Whether to overwrite the existing table, default False | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: raise NotImplementedError here too? | ||
| Returns: | ||
| Table: The newly registered table | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add NotImplementedError here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method in dynamodb and noop always raises
NotImplementedError. Do we still need a separate logc for theoverwriteargument?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see
NotImplementedErrorin other implementations but not for dynamodb/noopis that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is intentional because those two catalogs don't support registering tables and always raise
NotImplementedError.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh thanks for the explanation!