Git Product home page Git Product logo

aws-etl-pipeline's Introduction

csv_lambda_func

This project is intended as part of a series of microservices intended to be deployed to AWS Lambda. It includes a microservice for manipulating and appending a CSV file, and a controller for calling all three microservices.

To Use CSV microservice:

  1. Upload the included main.zip file to lambda (and skip step 2) OR Compile the main go file: go build -o main
  2. zip and upload the main executable to your lambda function
  3. Test the function using this JSON as a configured test event. This same json format is also the expected input.
{
  "bucketname": "tcss562.project.tsb",
  "filename": "1000SalesRecords.csv"
}

Or use callservice.sh with the bucket name as param 1 and filename as param 2.

./callservice.sh tcss562.project.tsb 1000SalesRecords.csv
  • bucketname -> The S3 bucket name that the input files are stored in.
  • filename -> The CSV file to process.

Sample Output:

{
  "success": true,
  "bucketname": "tcss562.project.tsb",
  "input_filename": "1000SalesRecords.csv",
  "exported_filename": "/transformed/1000SalesRecords.csv",
  "error": "No Errors",
  "deleted_duplicates": 0,
  "transactionid": "9f72637b-fd68-11e8-9f2c-a7be6afb8474"
}

To Use Controller microservice:

  1. Modify the api endpoints in the controller.go file
  2. zip and upload the main executable to your lambda function
  3. Test the function using this JSON as a configured test event. This same json format is also the expected input.

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.