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 2019/08/13 01:47:59 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #5546: [AIRFLOW-4908] BigQuery Hooks/Operators for update_dataset, patch_dataset, get_dataset

mik-laj commented on a change in pull request #5546: [AIRFLOW-4908] BigQuery Hooks/Operators for update_dataset, patch_dataset, get_dataset
URL: https://github.com/apache/airflow/pull/5546#discussion_r313193597
 
 

 ##########
 File path: airflow/contrib/hooks/bigquery_hook.py
 ##########
 @@ -1718,6 +1718,97 @@ def get_datasets_list(self, project_id=None):
 
         return datasets_list
 
+    def patch_dataset(self, dataset_id, dataset_resource, project_id=None):
 
 Review comment:
   @potiuk introduced this decorator for three reasons:
   * to add support for reading the project id from the connection configuration
   * to add validation - project id is required parameter
   * to remove code duplication.
   
   This decorator was introduced in the AAA class, but is mainly used in classes that inherit from it.
   https://github.com/apache/airflow/blob/8dcb9763771957017a2e6fe9db6f67a068463774/airflow/contrib/hooks/gcp_spanner_hook.py
   https://github.com/apache/airflow/blob/7cdf99a437534d24b35cf81151bce49a22ef5512/airflow/contrib/hooks/gcp_tasks_hook.py
   https://github.com/apache/airflow/blob/8dcb9763771957017a2e6fe9db6f67a068463774/airflow/contrib/hooks/gcp_vision_hook.py
   https://github.com/apache/airflow/blob/1805436f3d229f5263dc1f4443da957d7e9b5487/airflow/contrib/hooks/gcp_compute_hook.py
   https://github.com/apache/airflow/blob/8dcb9763771957017a2e6fe9db6f67a068463774/airflow/contrib/hooks/gcp_bigtable_hook.py
   https://github.com/apache/airflow/blob/1805436f3d229f5263dc1f4443da957d7e9b5487/airflow/contrib/hooks/gcp_sql_hook.py
   https://github.com/apache/airflow/blob/8dcb9763771957017a2e6fe9db6f67a068463774/airflow/contrib/hooks/gcp_dlp_hook.py
   https://github.com/apache/airflow/blob/1805436f3d229f5263dc1f4443da957d7e9b5487/airflow/contrib/hooks/gcp_function_hook.py
   https://github.com/apache/airflow/blob/1805436f3d229f5263dc1f4443da957d7e9b5487/airflow/contrib/hooks/gcp_cloud_build_hook.py
   https://github.com/apache/airflow/blob/1805436f3d229f5263dc1f4443da957d7e9b5487/airflow/contrib/hooks/gcp_transfer_hook.py
   https://github.com/apache/airflow/blob/1211675651cf9831a2ab8aabbc99eb34a310a643/airflow/contrib/hooks/gcs_hook.py
   
   Recently, my team has added this decorator to official recommendations.
   https://docs.google.com/document/d/1_rTdJSLCt0eyrAylmmgYc3yZr-_h51fVlnvMmWqhCkY/edit?ts=5bb72dfd#
   The guide will be further developed. I recently was on vacation and did not fully participate in its development. I will soon be adding my comments and changes to complete it

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


With regards,
Apache Git Services