Giter Site home page Giter Site logo

Support Apache Arrow about arcon HOT 1 CLOSED

cda-group avatar cda-group commented on June 8, 2024
Support Apache Arrow

from arcon.

Comments (1)

Max-Meldrum avatar Max-Meldrum commented on June 8, 2024

Just some notes on adding arrow support in arcon...

Elements in Arcon look like this:

pub struct ArconElement<A: ArconType> {
    #[prost(message, tag = "1")]
    pub data: Option<A>,
    #[prost(message, tag = "2")]
    pub timestamp: Option<u64>,
}

Let's say our data is the following:

#[arcon]
pub struct ArconStruct {
  #[prost(uint32, tag = "1")]
  pub id: u32,
  #[prost(string, tag = "2")]
  pub name: String,
}

We would like to be able to convert our ArconElement's into the following Arrow columnar data.

id: UInt32 name: Utf8 timestamp: UInt64
10 test 11535324290
15 test2 11535324299
.... .... ...

This conversion would happen through a function like the one below.

fn to_arrow(elems: Vec<ArconElement>) -> arrow::RecordBatch {
   ...
}

Potential Use Cases

Serve a materialised view of "up to date" data where users may:

  1. Submit SQL queries to run within Arcon
  2. Efficiently retrieve Arrow data through Arrow Flight (gRPC) to other applications (e.g., Pandas, Spark).

Cons: Hard to avoid data duplication as our default storage data format is row-based and Arrow is columnar and not meant for long-term storage. However, as long as conversion is done in batches, it should be okay.

from arcon.

Related Issues (20)

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.