You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/27 14:00:58 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #8477: Refactor BigQueryHook dataset operations

turbaszek commented on a change in pull request #8477:
URL: https://github.com/apache/airflow/pull/8477#discussion_r415837736



##########
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(

Review comment:
       So, are we ok with this as it is or should we explicitly pass user-agent?
   




----------------------------------------------------------------
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:
users@infra.apache.org