moiseenkov commented on code in PR #34880:
URL: https://github.com/apache/airflow/pull/34880#discussion_r1356900996


##########
airflow/providers/google/cloud/hooks/dataprep.py:
##########
@@ -205,3 +219,74 @@ def _raise_for_status(self, response: 
requests.models.Response) -> None:
         except HTTPError:
             self.log.error(response.json().get("exception"))
             raise
+
+    @retry(stop=stop_after_attempt(5), wait=wait_exponential(multiplier=1, 
max=10))
+    def create_imported_dataset(self, *, body_request: dict) -> dict:
+        """
+        Creates imported dataset.
+
+        :param body_request: Body of the POST request to be sent.
+            For more details check 
https://clouddataprep.com/documentation/api#operation/createImportedDataset
+        """
+        endpoint = "/v4/importedDatasets"

Review Comment:
   Good point, thanks! I added a parameter to the hook `api_version: str = 
"v4"`, so it's defined in a single place now.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to