def _get_table(self, connection, table_name, schema=None):
if isinstance(connection, Engine):
connection = connection.connect()
project, dataset, table_name_prepared = self._split_table_name(table_name)
if dataset is None and schema is not None:
dataset = schema
table_name_prepared = table_name
table = connection.connection._client.dataset(dataset, project=project).table(table_name_prepared)
try:
t = connection.connection._client.get_table(table)
except NotFound as e:
raise NoSuchTableError(table_name)
return t
评论列表
文章目录