Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ def table_type(self):
"""Union[str, None]: The type of the table (:data:`None` until set from
the server).

Possible values are ``'TABLE'``, ``'VIEW'``, ``'MATERIALIZED_VIEW'`` or
``'EXTERNAL'``.
Possible values are ``'TABLE'``, ``'VIEW'``, ``'MATERIALIZED_VIEW'``,
``'SNAPSHOT'`` or ``'EXTERNAL'``.
Comment on lines +737 to +738
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The list of possible table types is incomplete. According to the BigQuery API documentation, 'CLONE' is also a valid value for the table type. Additionally, using an Oxford comma (a comma before the 'or') is generally preferred for clarity in lists of three or more items and improves consistency across the library.

Suggested change
Possible values are ``'TABLE'``, ``'VIEW'``, ``'MATERIALIZED_VIEW'``,
``'SNAPSHOT'`` or ``'EXTERNAL'``.
Possible values are 'TABLE', 'VIEW', 'MATERIALIZED_VIEW',
'SNAPSHOT', 'CLONE', or 'EXTERNAL'.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what BigQuery API documentation AI reviewer references, but when I run the following snippet for the CLONE type table I get the TABLE type:

>> table = client.get_table("dataset.clone")
>> table.table_type
'TABLE'

while in the INFORMATION_SCHEMA.TABLES it says CLONE in table_type column

"""
return self._properties.get(self._PROPERTY_TO_API_FIELD["type"])

Expand Down Expand Up @@ -1488,7 +1488,8 @@ def table_type(self):
"""Union[str, None]: The type of the table (:data:`None` until set from
the server).

Possible values are ``'TABLE'``, ``'VIEW'``, or ``'EXTERNAL'``.
Possible values are ``'TABLE'``, ``'VIEW'``, ``'MATERIALIZED_VIEW'``,
``'SNAPSHOT'`` or ``'EXTERNAL'``.
"""
return self._properties.get("type")

Expand Down
Loading