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 2018/09/12 22:15:21 UTC

[GitHub] kaxil commented on a change in pull request #3876: [AIRFLOW-2887] Add to BigQueryBaseCursor methods for insert (create empty) dataset

kaxil commented on a change in pull request #3876: [AIRFLOW-2887] Add to BigQueryBaseCursor methods for insert (create empty) dataset
URL: https://github.com/apache/incubator-airflow/pull/3876#discussion_r217205897
 
 

 ##########
 File path: airflow/contrib/hooks/bigquery_hook.py
 ##########
 @@ -1354,6 +1354,68 @@ def run_grant_dataset_view_access(self,
                 view_project, view_dataset, view_table, source_project, source_dataset)
             return source_dataset_resource
 
+    def create_empty_dataset(self, dataset_id="", project_id="", dataset_resource=None):
+        """
+        Create a new empty dataset:
+        https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/insert
+
+        :param project_id: The name of the project where we want to create
+               an empty a dataset. Not need to provide, if projectId in dataset_resource.
 
 Review comment:
   Just need one tab in docstring, see following for example:
   
   https://github.com/apache/incubator-airflow/blob/b04158792e82ab799c6cd648ffd2d34dbf069e1e/airflow/contrib/operators/bigquery_operator.py#L32-L37
   
   ```
           :param project_id: The name of the project where we want to create
              an empty a dataset. Not need to provide, if projectId in dataset_resource.
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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