azure-storage-blobs

Install Azure Python api on linux: importError: No module named storage.blob

南楼画角 提交于 2019-12-12 18:03:43
问题 I'm trying to use the Azure Python API. I followed these installation instructions https://azure.microsoft.com/en-us/documentation/articles/python-how-to-install/ using pip install azure It had no issues. (I ran it again below just to show the message stating that it is installed. ) I want to upload to Storage as described here: https://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-blob-storage/ $ pip install azure Requirement already satisfied (use --upgrade to

Does CloudBlockBlob.StartCopyAsync return when the copy is completed?

爱⌒轻易说出口 提交于 2019-12-12 12:05:35
问题 There are several ways to copy azure blob storage blocks around. There's a synchronous and asynchronous version of StartCopy . There is also a BeginStartCopy which also has the completion callback. The BeginStartCopy approach explicitly states that the callback is executed when the copy has completed. The StartCopy approaches both state that they return a string, which is a copy process id - they don't state that they return when the copy has completed. Do those StartCopy methods return after

How to check wether a CloudBlobDirectory exists or not?

放肆的年华 提交于 2019-12-12 11:26:23
问题 In the software that I am programming, I am attempting to create a virtual file system over the blobs structure of Azure. Many times in the process, I get a path from the system and I need to tell whether the path is of a Blob or just a virtual BlobDirectory that azure provides. I did this by casting it from one form to another and handling the error. But now, if I know that a path points to a virtual directory, how can I check whether this virtual directory exists or not? I can get the

Azure storage non Classic (V2) - How to configure custom domain

时光总嘲笑我的痴心妄想 提交于 2019-12-12 11:01:21
问题 In new Azure portal there are 2 storage account: non classic and classic account. as I think the classic is old version then I choose the non classic. The problem is, I cannot configure the custom domain on the new portal, it redirected me to the old azure portal (manage.windowszuare.com) . and the problem continue.. the old azure portal not recognizing the new/nonClassic Azure storage. Kindly advise, how can I configure the custom domain for storage blob V2 (non classic). Thank you. 回答1: It

SSIS steps to load CSV from Azure blob to Azure SQL

拜拜、爱过 提交于 2019-12-12 10:43:05
问题 I need to connect to a CSV file in an Azure blob (source), then load the data into an Azure SQL Server table, then move the CSV file to a different (archive) Azure blob. Without Azure, I would create a flat file connection to a local file, then a Data Flow task using Source Assistant & Destination Assistant to load the data into a SQL Server table, then a File System task in Control Flow to move the file to the Archive directory. I'd like to do something similar, with a direct connection to

Azure Queue Storage: Send files in messages

牧云@^-^@ 提交于 2019-12-12 10:39:34
问题 I am assessing Azure Queue Storage to communicate between two decoupled applications. My requirement is to send a file (flat file, size: small to large) in the queue message. As per my reading an individual message in a queue cannot exceed beyond 64KB, so sending a file of variable size in the message is out of question. Another solution I can think of is using a combination of Queue Storage and blob storage, i.e. in the queue message add a reference to the file (on blob storage) and then

Create a blob storage container programmatically

余生长醉 提交于 2019-12-12 08:24:28
问题 I have a requirement whereby on creation of a company an associated blob storage container is created in my storageaccount with the container name set to the string variable passed in. I have tried the following: public void AddCompanyStorage(string subDomain) { //get the storage account. CloudStorageAccount storageAccount = CloudStorageAccount.Parse( System.Configuration.ConfigurationManager.AppSettings["StorageConnectionString"].ToString()); //blob client now CloudBlobClient blobClient =

Download blob storage and return Json object

大憨熊 提交于 2019-12-12 08:10:48
问题 I am trying to download a .json blob that I have stored in a container in the Azure Storage using Newtonsoft.Json to write it to an object. I am doing this by calling: (CloudBlockBlob) blob.DownloadToStream(stream); However, instead of writing the stream to a file in the local app directory, I want to return the json object doing Json(result) This is what I have tried: using (var stream = new MemoryStream()) { blob.DownloadToStream(stream); var serializer = new JsonSerializer(); using (var sr

Azure Storage blob using custom domain is not resolving while subdomain worked - how to set up host records?

早过忘川 提交于 2019-12-12 05:45:40
问题 Yesterday I had successfully setup a custom subdomain in Azure storage. I had set up assets.iprobesolutions.com to point to iprobesolutions.blob.core.windows.net. This is a screenshot of my host records CNAME set up: https://www.dropbox.com/s/ndfmn5dd7m48aqg/Screenshot%202016-05-30%2019.36.11.png?dl=0. As I said, this was working fine. Today I decided instead to have iprobesolutions.com point to iprobesolutions.blob.core.windows.net and got as far as Azure accepting the domain using the

download from blob when given its uri fails in c#

旧时模样 提交于 2019-12-12 05:29:33
问题 I'm trying to download a file from Azure blob and save it locally, but it seems to fail. Here's the relevant code: var blobClientCode = client.CreateCloudBlobClient(); string codeUri = "https://???.blob.core.windows.net/...../mycode.exe"; using (var codeContent = File.OpenWrite("C:\\code.exe")) { blobClientCode.GetBlockBlobReference(codeUri).DownloadToStream(codeContent); } I get an error in which the container doens't exist. What am I doing wrong? 回答1: Try getting a reference to the