I have Just created an Azure Function which I want to be triggered By Azure Blob storage (whenever a new blob is created), I want to have my function code so that it parses the contents of the Json file (filename.json) which is in JSON format, and uses the contents of the file to update the contents of a database, the contents of the files look like this:
{
"ID": "58",
"Symbol": "J500",
"Content":
[
{"Date": "2017-05-15", "Value": "100000"},
{"Date": "2017-05-16", "Value": "200"},
{"Date": "2017-05-17", "Value": "90000"},
{"Date": "2017-05-18", "Value": "80000"},
{"Date": "2017-05-19", "Value": "70000}
]
}
I have barely ever written code in C# before and thought I would be able to use python for this, but it turns out I am restricted to C#, any help with an elaborate description and explanation would be greatly appreciated.
I am also fairly new to Azure, so if anyone has a better suggestion on how to achieve what I am trying to do (that is maybe using a different trigger or different binders or even using a different service rather than functions), I'm open to suggestions and would gladly appreciate it. I currently have just the default code:
public static void Run(Stream myBlob, string name, TraceWriter log)
{
log.Info($"C# Blob trigger function Processed blob\n Name:{name}" \n Size: {myBlob.Length} Bytes");
}
Also as a side note, I cannot see my logs unless I go to the monitor screen, any help with this would also be very much appreciated.
Thanks!