Git Product home page Git Product logo

olapscript's Introduction

OLAPScript

An OLAP engine for Google Apps Script

This module implements a relational pipeline tookit for manipulating Google Sheets using Apps Script.

The central object is a Table, which uses a column oriented storage model for holding Values. The values can be read from a sheet or provided as JavaScript data structures. Tables can be written out to target sheets when processing is complete.

To support pipelining, the Table class provides data streaming methods for relational and data cleaning operations. This lets you write SQL-like chains of operations:

Table.fromSheet(<source sheet>)
     .select(<expressions>)
     .unnest(<array column>)
     .fill(<column>, <default>)
     .where(<predicate>)
     .equiJoin(<Table>, <matching keys>)
     .groupby(<groups>, <aggregates>)
     .orderby(<ordering>)
     .limit(100)
     .toSheet(<target sheet>);

Pipelines avoid copying data wherever possible, so intermediate results can be cached without worrying about later processing.

Expressions are implemented as a simple tree of nodes, and any function can be used in a function node. Column reference expressions make no copies. Aggregates are a separate type of object, with initialize, update and finalize functions, and the arguments can be arbitraary expressions. Ordering is also expression-based.

Note that some of this functionality is not yet implemented, and the error checking is pretty much non-existent, but the architecture is based on 50 years of database theory and is hopefully easy to express data validation and sheet generation with.

olapscript's People

Contributors

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