mik-laj commented on a change in pull request #8477:
URL: https://github.com/apache/airflow/pull/8477#discussion_r415815147
##########
File path: airflow/providers/google/cloud/hooks/bigquery.py
##########
@@ -349,56 +358,49 @@ def get_dataset_tables(self, dataset_id: str, project_id:
Optional[str] = None,
:param page_token: (Optional) page token, returned from a previous
call,
identifying the result set.
:type page_token: str
-
- :return: map containing the list of tables + metadata.
+ :param retry: How to retry the RPC.
+ :type retry: google.api_core.retry.Retry
+ :return: List of tables associated with the dataset.
"""
- service = self.get_service()
-
- optional_params = {} # type: Dict[str, Union[str, int]]
- if max_results:
- optional_params['maxResults'] = max_results
- if page_token:
- optional_params['pageToken'] = page_token
-
- dataset_project_id = project_id or self.project_id
+ project_id = project_id or self.project_id
- return (service.tables().list( # pylint: disable=no-member
- projectId=dataset_project_id,
- datasetId=dataset_id,
- **optional_params).execute(num_retries=self.num_retries))
+ tables = Client(client_info=self.client_info).list_tables(
+ dataset=DatasetReference(project=project_id,
dataset_id=dataset_id),
+ max_results=max_results,
+ page_token=page_token,
+ retry=retry,
+ )
+ return list(tables)
- def delete_dataset(self, project_id: str, dataset_id: str,
delete_contents: bool = False) -> None:
Review comment:
Should we add note in UPDATIND.md? It looks like breaking change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]