An open API service indexing awesome lists of open source software.

https://github.com/hawkfish/olapscript

An OLAP engine for Google App Script
https://github.com/hawkfish/olapscript

appscript google-apps-script olap

Last synced: 1 day ago
JSON representation

An OLAP engine for Google App Script

Awesome Lists containing this project

README

          

# 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:

```js
Table.fromSheet()
.select()
.unnest()
.fill(, )
.where()
.equiJoin(, )
.groupby(, )
.orderby()
.limit(100)
.toSheet();
```

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.