Giter VIP home page Giter VIP logo

csv-pipe-playground's Introduction

csv-pipe-playground

what`s the purpose ?

playground project to get an understanding how processing csv files in an event driven manner using docker-compose and specific frameworks without the use of cloud components.

csv pipe playground

steps

  1. Insert csv to root directory of solution

  2. Filewatcher event will be triggered

  3. Worker will be created via Rabbit MQ / Celery

    • Read CSV via Pandas
    • Store content in database

requirements

  • docker
  • docker-compose
  • linux (pyinotify)

install

git clone https://github.com/pharindoko/csv-pipe-playground.git
cd csv-pipe-playground
make build

start

make run

try out

add a csv file

you have 2 options to start the process

using linux

  • Add a csv file into the root directory or a nested directory of the source folder (works recursively).
  • This is limited to linux as I`m using Pyinotify which supports IN_CLOSE_WRITE (relies on linux kernel)

using macos, windows or linux

  1. Open vue application (http://localhost:3000/)
  2. Drag and drop csv file(s) or select file(s) via file dialog
  3. Click on button "Upload"

data will be written into postgre db

graphql

Open Graphql Playground
http://localhost:5433/graphiql

new endpoints will be automagically added by postgraphile when a new csv has been added)

database

Open a DB Connection postgres://postgres:postgres@postgres:5432/postgres

recommendation is to use a db client like dbeaver

sidenotes

It might be a discussion point if celery and rabbitmq are a bit too much for this solution.

But I really enjoyed how easy it is to implement rabbitmq and celery and how stable this works.

Having IO operations and database connections I guess it`s not that bad to split it up into other processes and keep the event handler process lean.

csv-pipe-playground's People

Contributors

pharindoko avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.