[ 
https://issues.apache.org/jira/browse/BEAM-6892?focusedWorklogId=218376&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-218376
 ]

ASF GitHub Bot logged work on BEAM-6892:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/19 00:16
            Start Date: 26/Mar/19 00:16
    Worklog Time Spent: 10m 
      Work Description: udim commented on pull request #8135: [BEAM-6892] 
Adding support for auto-creating buckets for BigQuery file loads
URL: https://github.com/apache/beam/pull/8135#discussion_r268901248
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/gcsio.py
 ##########
 @@ -152,6 +152,37 @@ def _set_rewrite_response_callback(self, callback):
     """
     self._rewrite_cb = callback
 
+  def get_bucket(self, bucket_name):
+    """Returns an object bucket from its name, or None if it does not exist."""
+    try:
+      request = storage.StorageBucketsGetRequest(bucket=bucket_name)
+      return self.client.buckets.Get(request)
+    except HttpError:
+      return None
+
+  def insert_bucket(self,
+                    bucket_name,
+                    project,
+                    kms_key=None,
+                    location=None):
+    """Create and return a GCS bucket in a specific project."""
 
 Review comment:
   Please document return types and what None means. (or better yet don't 
return None on failure; just pass the exception)
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 218376)
    Time Spent: 1.5h  (was: 1h 20m)

> Use temp_location for BQ FILE_LOADS on DirectRunner, and autocreate it in GCS 
> if not specified by user.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-6892
>                 URL: https://issues.apache.org/jira/browse/BEAM-6892
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Pablo Estrada
>            Priority: Blocker
>             Fix For: 2.12.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to