azure-storage-blobs

Performance of Azure SDK v12 vs Storage Data Movement Library?

放肆的年华 提交于 2020-06-17 09:45:05
问题 I know that the Storage Data Movement Library is supposed to be faster when uploading and downloading files to and from blob storage, but I am not seeing the performance benefits of it when compared to Azure SDK v12. I got an average of 37.463 seconds with Azure SDK v12 and 41.863 seconds using Storage Data Movement Library (SDML). Here is the code using SDML: namespace FunctionApp { using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.Storage; using Microsoft.Azure.Storage.Blob; using

Faster Azure blob name search with python?

怎甘沉沦 提交于 2020-06-13 06:41:10
问题 I have a list of file names that I need to search on Azure. Right now as a noob I am looping over each blob names and comparing strings but I think there has to be easiest and fast way to get this done. The current solution is making my HTTP response very slow. def ifblob_exists(self, filename): try: container_name = 'xxx' AZURE_KEY = 'xxx' SAS_KEY = 'xxx' ACCOUNT_NAME = 'xxx' block_blob_service = BlockBlobService(account_name= ACCOUNT_NAME, account_key= None, sas_token = SAS_KEY, socket

Delete files older than X number of days from Azure Blob Storage using Azure function

偶尔善良 提交于 2020-06-12 04:31:21
问题 I want to create an Azure function that deletes files from azure blob storage when last modifed older than 30 days. Can anyone help or have a documentation to do that? 回答1: Assuming your storage account's type is either General Purpose v2 (GPv2) or Blob Storage , you actually don't have to do anything by yourself. Azure Storage can do this for you. You'll use Blob Lifecycle Management and define a policy there to delete blobs if they are older than 30 days and Azure Storage will take care of

Append to CloudBlockBlob stream

£可爱£侵袭症+ 提交于 2020-06-11 20:05:19
问题 We have a file system abstraction that allows us to easily switch between local and cloud (Azure) storage. For reading and writing files we have the following members: Stream OpenRead(); Stream OpenWrite(); Part of our application "bundles" documents into one file. For our local storage provider OpenWrite returns an appendable stream: public Stream OpenWrite() { return new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite, BufferSize, useAsync: true); }

Append to CloudBlockBlob stream

霸气de小男生 提交于 2020-06-11 20:01:16
问题 We have a file system abstraction that allows us to easily switch between local and cloud (Azure) storage. For reading and writing files we have the following members: Stream OpenRead(); Stream OpenWrite(); Part of our application "bundles" documents into one file. For our local storage provider OpenWrite returns an appendable stream: public Stream OpenWrite() { return new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite, BufferSize, useAsync: true); }

Azure function with blobtrigger - update metadata

不问归期 提交于 2020-06-01 07:08:50
问题 I am looking for a sample or IP for updating a blob's metadata when it is uploaded. All help is appreciated. I have following function: public static void Run([BlobTrigger("types/{name}", Connection = "StorageConnection")]Stream myBlob, string name, ILogger log) { } 回答1: You can use the trigger to get the ICloudBlob instead of the stream. Check the official documentation on blob triggers for Azure Functions. Basically, your code will look something like this: public static void Run(

SharedKeyCredential is not a constructor - Azure Blob Storage + Nodejs

六眼飞鱼酱① 提交于 2020-05-30 08:41:33
问题 I'm trying to delete an image in my aucitonImages container, but when I execute the function from postman, I get SharedKeyCredential is not a constructor I've been following the documentation and I think I have everything setup, but I don't see what's different in my code from the docs. I appreciate any help! app.delete("/api/removeauctionimages", upload, async (req, res, next) => { const { ContainerURL, ServiceURL, StorageURL, SharedKeyCredential } = require("@azure/storage-blob"); const

Azure Data Factory connecting to Blob Storage via Access Key

佐手、 提交于 2020-05-29 04:12:27
问题 I'm trying to build a very basic data flow in Azure Data Factory pulling a JSON file from blob storage, performing a transformation on some columns, and storing in a SQL database. I originally authenticated to the storage account using Managed Identity, but I get the error below when attempting to test the connection to the source: com.microsoft.dataflow.broker.MissingRequiredPropertyException: account is a required property for [myStorageAccountName]. com.microsoft.dataflow.broker

Azure Data Factory connecting to Blob Storage via Access Key

霸气de小男生 提交于 2020-05-29 04:12:13
问题 I'm trying to build a very basic data flow in Azure Data Factory pulling a JSON file from blob storage, performing a transformation on some columns, and storing in a SQL database. I originally authenticated to the storage account using Managed Identity, but I get the error below when attempting to test the connection to the source: com.microsoft.dataflow.broker.MissingRequiredPropertyException: account is a required property for [myStorageAccountName]. com.microsoft.dataflow.broker

How to upload images and files to Azure Blob Node.js

℡╲_俬逩灬. 提交于 2020-05-28 07:16:49
问题 I have node.js application with frontend in Angular I need to upload files and images to Azure blob I have created container and setup the environment according to MS documentation (https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-nodejs ) the v12 version. My functions works for creating and uploading the created file to Azure blob, I could not figure how do I upload the posted file from the client to Azure Blob, below is my code in Node.js TypeScript import * as