Coder Social home page Coder Social logo

pyprogrammerblog / tiny-blocks Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 72.54 MB

Tiny Blocks to build large and complex data pipelines!

Home Page: https://tiny-blocks.readthedocs.io/en/latest/

License: MIT License

Dockerfile 0.76% Python 78.02% Jupyter Notebook 21.22%
data etl-automation etl-framework pipelines python3 data-engineering data-engineering-pipeline etl generator pandas

tiny-blocks's Introduction

tiny-blocks

Documentation Status License-MIT GitHub Actions PyPI version

Tiny Blocks to build large and complex ETL data pipelines!

Tiny-Blocks is a library for data engineering operations. Each pipeline is made out of tiny-blocks glued with the >> operator. This library relies on a fundamental streaming abstraction consisting of three parts: extract, transform, and load. You can view a pipeline as an extraction, followed by zero or more transformations, followed by a sink. Visually, this looks like:

extract -> transform1 -> transform2 -> ... -> transformN -> load

You can also fan-in, fan-out for more complex operations.

extract1 -> transform1 -> |-> transform2 -> ... -> | -> transformN -> load1
extract2 ---------------> |                        | -> load2

Tiny-Blocks use generators to stream data. Each chunk is a Pandas DataFrame. The chunksize or buffer size is adjustable per pipeline.

Installation

Install it using pip

pip install tiny-blocks

Basic usage

from tiny_blocks.extract import FromCSV
from tiny_blocks.transform import Fillna
from tiny_blocks.load import ToSQL

# ETL Blocks
from_csv = FromCSV(path='/path/to/source.csv')
fill_na = Fillna(value="Hola Mundo")
to_sql = ToSQL(dsn_conn='psycopg2+postgres://...', table_name="sink")

# Pipeline
from_csv >> fill_na >> to_sql

Examples

For more complex examples please visit the notebooks' folder.

Documentation

Please visit this link for documentation.

tiny-blocks's People

Contributors

pyprogrammerblog avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.