Code Monkey home page Code Monkey logo

beam-dynamic-pipeline's Introduction

Sample project of dynamic pipeline

  • Apache Beam

Concepts

A column is composed of a name and a type there are 3 types of columns (this is defined by the schema)

  • dimension
    • string
  • temporal
    • time
  • scalar
    • double

Rules

Scalars can only be combined with other scalars scalar * scala = scalar

Transformations

Aggregations

window: 5 records
trans:  sum(col1)
output: 1 record | 1 column | col1

Transform a column

window: 5 records
trans:  divide(col1, 1000)
output: 5 records | 1 column | (col1/1000)

Combine columns into one

window: 5 records
trans:  sumColumns([col1, col2, col3], 'col4')
output: 5 records | 1 column | col1

Derive columns from other columns

window: 5 records
trans:  sumColumnsKeep([col1, col2], 'col3')
output: 5 records | 3 columns | col1, col2 col3

Example:

Column
name: abc
value 1

The stream is broken into windows where the transformations are applied

Key         ElasticRow
            col_a(dimension), col_b(scalar), col_c(scalar)]
100         row{'col_a'=>s1, 'col_b'=>2, 'col_c'=3}
101         row{'col_a'=>s1, 'col_b'=>2, 'col_c'=3}
102         row{'col_a'=>s1, 'col_b'=>2, 'col_c'=3}
window 1
103         row{'col_a'=>s1, 'col_b'=>2, 'col_c'=3}
104         row{'col_a'=>s1, 'col_b'=>2, 'col_c'=3}
105         row{'col_a'=>s1, 'col_b'=>2, 'col_c'=3}
window 2
...

beam-dynamic-pipeline's People

Contributors

donhk avatar

Watchers

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