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



##########
File path: airflow/providers/google/cloud/hooks/bigquery.py
##########
@@ -789,49 +791,62 @@ def insert_all(self, project_id: str, dataset_id: str, 
table_id: str,
                 )
             self.log.error(error_msg)
 
-    def update_dataset(self, dataset_id: str,
-                       dataset_resource: Dict, project_id: Optional[str] = 
None) -> Dict:
-        """
-        Updates information in an existing dataset. The update method replaces 
the entire
-        dataset resource, whereas the patch method only replaces fields that 
are provided
-        in the submitted dataset resource.
-        More info:
-        
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/update
+    @GoogleBaseHook.fallback_to_default_project_id
+    def update_dataset(
+        self,
+        fields: Sequence[str],
+        dataset_resource: Dict,
+        dataset_id: Optional[str] = None,
+        project_id: Optional[str] = None,
+        retry: Retry = DEFAULT_RETRY,
+    ) -> Dataset:
+        """
+        Change some fields of a dataset.
+
+        Use ``fields`` to specify which fields to update. At least one field
+        must be provided. If a field is listed in ``fields`` and is ``None`` in
+        ``dataset``, it will be deleted.
+
+        If ``dataset.etag`` is not ``None``, the update will only
+        succeed if the dataset on the server has the same ETag. Thus
+        reading a dataset with ``get_dataset``, changing its fields,
+        and then passing it to ``update_dataset`` will ensure that the changes
+        will only be saved if no modifications to the dataset occurred
+        since the read.
 
-        :param dataset_id: The BigQuery Dataset ID
-        :type dataset_id: str
         :param dataset_resource: Dataset resource that will be provided
             in request body.
             
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#resource
         :type dataset_resource: dict
+        :param dataset_id: The id of the dataset

Review comment:
       ```suggestion
           :param dataset_id: The id of the dataset.
   ```




----------------------------------------------------------------
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]


Reply via email to