• Channels

  • Contact

  • Main Site

  • More

    1. Elastacloud Channels
    2. Modern Data
    3. Azure Functions for Data Enrichment
    Search
    David
    Aug 31, 2017

    Azure Functions for Data Enrichment


    A customer has a dataset that they wish to be enriched with hourly weather data, but weather depends on where you are in the world. We want to find the weather for a given time in a specific location. With a source dataset that includes geographical coordinates and an Azure Function with a Timer Trigger we can easily invoke a Weather API to find the weather at a given location for all locations we have an interest in. Given we wish to land the data in a Azure SQL Database we have a few options. We could couple this functionality in the WeatherAPI Azure function, as a coder this does not sit well. Single responsibility and decoupling functionality is key to good code. Hence we use an Azure Event Hub as a decoupling mechanism between two Azure functions and encapsulate the behavior of pushing a given WeatherAPI result in a second Azure Function, this time with an Event Hub Trigger. This gives two principal advantages, single responsibility/decoupling of functionality as described and the ability to scale said functionality independently.

    0
    • Twitter Social Icon
    • LinkedIn Social Icon
    • Facebook Social Icon

    Visit the Elastacloud website