azure-blob-storage

How to integrate a WebJob within an Azure Data Factory Pipeline

邮差的信 提交于 2019-11-30 21:00:48
问题 I'am trying to integrate a WebJob inside an ADF pipeline. The webjob is a very simple console application: namespace WebJob4 { class ReturnTest { static double CalculateArea(int r) { double area = r * r * Math.PI; return area; } static void Main() { int radius = 5; double result = CalculateArea(radius); Console.WriteLine("The area is {0:0.00}", result); } } } How do we call this webjob through an ADF pipeline and store the response code (HTTP 200 in case of Success) in azure blob storage? 回答1

Uploading a Azure blob directly to SFTP server without an intermediate file

左心房为你撑大大i 提交于 2019-11-30 16:11:30
I'm attempting to upload am Azure blob directly to an SFTP server. It's simple to upload a file from a local location: using (var sftp = new SftpClient(connectionInfo)){ sftp.Connect(); using (var uplfileStream = System.IO.File.OpenRead(fileName)){ sftp.UploadFile(uplfileStream, fileName, true); } sftp.Disconnect(); } Is there a way to copy blobs from blob storage directly to an SFTP server? Either combine CloudBlob.OpenRead with SftpClient.UploadFile : using (var blobReadStream = blockBlob.OpenRead()) { sftp.UploadFile(blobReadStream, remotePath, true); } Or combine SftpClient.Create with

Checking if a blob exists in Azure Storage

会有一股神秘感。 提交于 2019-11-28 15:26:14
问题 I've got a very simple question (I hope!) - I just want to find out if a blob (with a name I've defined) exists in a particular container. I'll be downloading it if it does exist, and if it doesn't then I'll do something else. I've done some searching on the intertubes and apparently there used to be a function called DoesExist or something similar... but as with so many of the Azure APIs, this no longer seems to be there (or if it is, has a very cleverly disguised name). 回答1: The new API has

Getting the latest file modified from Azure Blob

北战南征 提交于 2019-11-27 16:00:39
Say I am generating a couple of json files each day in my blob storage. What I want to do is to get the latest file modified in any of my directories. So I'd have something like this in my blob: 2016/01/02/test.json 2016/01/02/test2.json 2016/02/03/test.json I want to get 2016/02/03/test.json . So one way is getting the full path of the file and do a regex checking to find the latest directory created, but this doesn't work if I have more than one josn file in each dir. Is there anything like File.GetLastWriteTime to get the latest modified file? I am using these codes to get all the files btw

Windows Azure: How to create sub directory in a blob container

回眸只為那壹抹淺笑 提交于 2019-11-27 01:05:24
How to create a sub directory in a blob container for example, in my blob container http://veda.blob.core.windows.net/document/ If I store some files it will be http://veda.blob.core.windows.net/document/1.txt http://veda.blob.core.windows.net/document/2.txt Now, how to create a sub directory http://veda.blob.core.windows.net/document/folder/ So that I can store files http://veda.blob.core.windows.net/document/folder/1.txt To add on to what Egon said, simply create your blob called "folder/1.txt", and it will work. No need to create a directory. Egon There is actually only a single layer of

Getting the latest file modified from Azure Blob

女生的网名这么多〃 提交于 2019-11-26 17:23:16
问题 Say I am generating a couple of json files each day in my blob storage. What I want to do is to get the latest file modified in any of my directories. So I'd have something like this in my blob: 2016/01/02/test.json 2016/01/02/test2.json 2016/02/03/test.json I want to get 2016/02/03/test.json . So one way is getting the full path of the file and do a regex checking to find the latest directory created, but this doesn't work if I have more than one josn file in each dir. Is there anything like

Windows Azure: How to create sub directory in a blob container

早过忘川 提交于 2019-11-26 09:31:16
问题 How to create a sub directory in a blob container for example, in my blob container http://veda.blob.core.windows.net/document/ If I store some files it will be http://veda.blob.core.windows.net/document/1.txt http://veda.blob.core.windows.net/document/2.txt Now, how to create a sub directory http://veda.blob.core.windows.net/document/folder/ So that I can store files http://veda.blob.core.windows.net/document/folder/1.txt 回答1: To add on to what Egon said, simply create your blob called