Skip to main content

Posts

Example of Azure Event Trigger Function implemented in Java

There are so few examples of Azure Functions implemented in Java and even official documentation is a little confusing, so I decided to write my own post explaining some of the points. So here is my function class: public class EventHubTriggerFunction { /** * This function will be invoked when an event is received from Event Hub. */ @FunctionName ( "EventHubTrigger-Java" ) public void run ( @EventHubTrigger (name = "message" , eventHubName = "my-event-hubs" , connection = "EventHubConnectionString" , consumerGroup = "$Default" ) String message, final ExecutionContext context ) { context.getLogger().info( "Java Event Hub trigger function executed." ); context.getLogger().info( "Message:" + message); } } The noteworthy thing in this snippet are the annotation attributes. name : Any name that can be given to the...

How I converted a table in an email to a graph on a website? Hint: Azure Functions and Logic App

This mini-project started as a necessity.  I get an email like this everyday, which gives daily numbers for different metrics. The problem with such an email is that it is difficult to keep track of or gauge the rate of growth of these metrics. If you want to know how what the previous day's numbers were you need to go to the previous day's email.  The better option any day is to have a graph that shows the values of the metrics every day. Something like this: With this goal I set out to make this system but with as less coding and expenses as possible.  First obvious step in the process was to get hold of the email and extract its text. The easiest way to do this is to use Azure Logic App.  Here is what my logic app looks like: When any new email arrives in my Outlook 365 account, with a subject that contains "System usage Stats as on", it passes the body of the email to an Azure function named 'EmailTextCleanerFunction' (code below), whose job is to clean an...

See and compare Microsoft's new Default Font candidates

If like me you wanted to see Microsoft's five new default font candidates, one of which is supposed to replace Calibri , but don't have access to Microsoft 365 (which is the only place these fonts are currently available), you have come to the right place. Browse through the following screenshots and you will have a decent idea of what each font will look and feel like in real-life conditions. How do these fonts look in Powerpoint slides? Now that you have seen everything, what do you think? It's ok if you are unable to decide at once. Take your time and once you are done and have selected a winner, head over to this Twitter post and tell Microsoft which one you like. And tell me also in the comments.

Azure Data Lake Analytics: In short

Azure is a great cloud platform but its services have mostly terrible names and confusing, often heavily overlapping features between them. And so another one in this series of confusing services is Azure Data Lake. I have tried to make sense of this service and what it does! Azure Data Lake   Azure Data Lake has two components, which are very tightly integrated: a.       Azure Data Lake Analytics (ADLA) b.       Azure Data Lake Storage (ADLS)   ADLA gives us the ability to run analytical jobs (query, extract, aggregate, transform output etc.) on data, which is stored in ADLS, in form of files.   Below ‘temp’ is the name of ADLA account. As we can see ‘tempdl’ is the name of associated ADLS account, which acts as the data source for this ADLA account.   As we can see below, the ‘tempdl’ has got following data stored in form of files. ADLA lets us query, transform and do other operations on this data using USQL (prope...