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

BigQuery: Allow using TableListItem to create a Table #8738

Merged
merged 4 commits into from
Jul 26, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Update table.py
Functionality transfered to helper
  • Loading branch information
emar-kar committed Jul 23, 2019
commit 3dc1c2dc4fa592176e105f90a26eb8e17125475c
5 changes: 1 addition & 4 deletions bigquery/google/cloud/bigquery/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,7 @@ class Table(object):
}

def __init__(self, table_ref, schema=None):
if isinstance(table_ref, six.string_types):
table_ref = TableReference.from_string(table_ref)
elif isinstance(table_ref, TableListItem):
table_ref = table_ref.reference
table_ref = _table_arg_to_table_ref(table_ref)
self._properties = {"tableReference": table_ref.to_api_repr(), "labels": {}}
# Let the @property do validation.
if schema is not None:
Expand Down