Giter Site home page Giter Site logo

hvalfangst / azure-function-etl-using-pandas-with-cicd Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 7 KB

Azure Functions for ETL operations using Pandas. Uploaded CSV files trigger data processing, calculating correlations and storing results in a JSON file. Automated deployment via GitHub Actions and Terraform streamlines project setup and maintenance.

Shell 8.42% HCL 41.65% Python 49.93%
azure azure-functions azure-functions-python pandas python scikit-learn terraform

azure-function-etl-using-pandas-with-cicd's Introduction

Azure Function ETL using Pandas with CI/CD

This repository hosts a pair of Azure Functions designed for Extract, Transform, Load (ETL) operations:

1. HTTP-triggered Function:
    Handles CSV file uploads from request body to the Blob 'in/input.csv' under container 'hvalfangstcontainer'.

2. Blob-triggered Function:
    Listens for changes to aforementioned Blob 'in/input.csv' and responds by loading the CSV into a Pandas dataframe on changes.
    Conducts calculations to determine correlations between specific columns.
    Stores the resulting correlations in a dictionary and dumps said dictionary to JSON.
    It then proceeds to upload the JSON contents to the Blob 'out/statistics.json'.

A CI/CD pipeline has been implemented utilizing a GitHub Actions Workflow script, which enabled automatic deployment to Azure Function App on repository pushes. Azure resources are provisioned with Terraform via shell scripts 'up' and 'down'.

Requirements

Creating resources

The shell script 'up' allocates Azure resources with Terraform.

Deleting resources

The shell script 'down' deallocates Azure resources.

Guide

1. Provision Azure Resources

  • Run the 'up' script to provision Azure resources with Terraform.

2. Access Azure Portal

  • Open your browser and navigate to the Azure Portal.

3. Function App Publish Profile

  • Navigate to the newly created Function App 'hvalfangstlinuxfunctionapp'
  • Click on 'Get publish profile' to download a file.
  • The associated file contents will be used in the next step.

4. GitHub Repository Secrets

  • Open the 'Settings' tab of your GitHub repository.
  • Click on 'Actions' under 'Security' -> 'Secrets and variables'.
  • Create the following repository secret:
    • PUBLISH_PROFILE: Copy value from downloaded file obtained in step #3

5. Deploy Workflow

Our Azure Function will be deployed on repository pushes by utilizing a GitHub Actions workflow script.

azure-function-etl-using-pandas-with-cicd's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.