0
votes

I want to create a blob storage trigger that takes any files put into blob storage (a fast process) and transfers them to Data Lake storage (NOT to another Blob Storage location).

Can this be done?

Can it be done using JavaScript, or does it require C#?

Does sample code exist showing how to do this? If so, would you be so kind as to point me to it?

Note: we've created a pipeline that will go from Blob Storage to Data lake storage. That's not what I'm asking about here.

2

2 Answers

1
votes

You could potentially use an Azure Function or Azure Logic App to detect new files on Blob Storage and either call your webhook to trigger the pipeline or do the move itself.

0
votes

Can this be done?

As jamesbascle mentioned that we could use Azure function to do that.

Can it be done using JavaScript, or does it require C#?

It can be done with javascript or C#.

Does sample code exist showing how to do this? If so, would you be so kind as to point me to it?

How to create a Blob storage triggered function, please refer to this document. We also could get the C#/javascript demo code from this document.

JavaScript code

module.exports = function(context) {
    context.log('Node.js Blob trigger function processed', context.bindings.myBlob);
    context.done();
};

C# code

[FunctionName("BlobTriggerCSharp")]        
public static void Run([BlobTrigger("samples-workitems/{name}")] Stream myBlob, string name, TraceWriter log)
{
    log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}