mik-laj commented on a change in pull request #12188:
URL: https://github.com/apache/airflow/pull/12188#discussion_r528200000



##########
File path: airflow/providers/microsoft/azure/hooks/wasb.py
##########
@@ -163,11 +213,100 @@ def read_file(self, container_name: str, blob_name: str, 
**kwargs):
         :type container_name: str
         :param blob_name: Name of the blob.
         :type blob_name: str
-        :param kwargs: Optional keyword arguments that
-            `BlockBlobService.create_blob_from_path()` takes.
+        :param kwargs: Optional keyword arguments that 
`BlobClient.download_blob` takes.
         :type kwargs: object
         """
-        return self.connection.get_blob_to_text(container_name, blob_name, 
**kwargs).content
+        return self.download(container_name, blob_name, **kwargs).readall()
+
+    def upload(
+        self,
+        container_name,
+        blob_name,
+        data,
+        blob_type: str = 'BlockBlob',
+        length: Optional[int] = None,
+        **kwargs,
+    ) -> Dict[str, Any]:
+        """
+        Creates a new blob from a data source with automatic chunking.
+
+        :param container_name: The name of the container to upload data
+        :type container_name: str
+        :param blob_name: The name of the blob to upload. This need not exist 
in the container
+        :type blob_name: str
+        :param data: The blob data to upload
+        :param blob_type: The type of the blob. This can be either BlockBlob,
+            PageBlob or AppendBlob. The default value is BlockBlob.

Review comment:
       ```suggestion
           :param blob_type: The type of the blob. This can be either 
``BlockBlob``,
               ``PageBlob`` or ``AppendBlob``. The default value is 
``BlockBlob``.
   ```




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