Git Product home page Git Product logo

zeutschler / tinyolap Goto Github PK

View Code? Open in Web Editor NEW
37.0 5.0 7.0 15.61 MB

TinyOlap is a light-weight, in-process, in-memory, multi-dimensional, model-first OLAP engine for planning, budgeting, reporting, analysis and many other numerical purposes, written in plain Python.

License: Other

Python 100.00%
database in-memory-database olap-cube olap-engine pandas-dataframe python rules-engine sql sqlite3

tinyolap's People

Contributors

zeutschler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tinyolap's Issues

Rules Compiler

Rules need to be written in python. This requires 'real' Python coding and quite some boilerplate code. Sample:

@rule(cube="sales", trigger="delta %") def my_rule(c: Cell): return c["delta"] / c.plan["plan"]

Why not let users focus on the core rules itself and do the wrapping for them. This should not be too hard. sample:

["delta %"] = ["delta"] / ["plan"]

This would be a good bridge for users from TM/1 and alike.
However, this will only work with simple one-line rules.

Splasher for data entry support

Implement the good old "Splasher" to aid users in planning processes. Implement natural language (kind of) planning language.

Rules registration - rewrite and rearrange order of argument

from: register_rule(self, function, trigger: list[str] = None,
feeder: list[str] = None,
scope: RuleScope = None,
injection: RuleInjectionStrategy = None,
code: str = None):

to: register_rule(self, function, trigger: str | list[str] = None,
scope: RuleScope = None,
feeder: str | list[str] = None,
injection: RuleInjectionStrategy = None,
code: str = None):

Add Member Class

The member class should represent a single member of a dimension, either context aware (bound to a cube) or stand alone. Purpose is to ease implementation of business rules e.g.

`sales, price, quantity = c.member("Measures, "Sales", "Price", "Quantity")

c[sales] = c[price] * c[quantity]`

Refactoring of class Dimension

All methods for Members, Subset, Attributes etc. should be moved to subclasses for more convenient and better structured access.

TinyPandas

Data integration back and forth between Pandas data frames and TinyOlap.

View and FlexView

Ideally one code base for both Views and FlexViews

  • Manage state of individual open Views in TinyOlap, especially lifecycle management incl. ageing /automatic clean up, persistence, refresh policies etc.

  • Drill down, rollup, drill-across along one or multiple dimensions.Support for frontends needed on what activities are available.

  • Introduce new 'ViewBuilder' class to enable custom view creation and design, e.g. custom row and column layouts with alternating dimensions or overwrites of filter members.

Measures to automatically become the last dimension.

We need to get ride of the explicit measures. Instead

  • the last dimension should automatically become the measure dimension.
    Question here: how to deal with aggregations?

or

  • there should be no measures at all.

This is a big topic and requires a dedicated branch.

Snapshot implementation

Implement and test for database snapshot generation and management.

Snapshot are required for database backup and time-travel capabilities

add some sample databases

There should be a set of sample databases to showcase tiny-lap capabilities for different purposes.

Note: Databases should be delivered as code, so users can see how they've been created.

Handling and harmonisation of Rule Errors

  • All errors raised though rule execution should raise the same build-in rules errors.
  • Users should be able to switch off error raising at database runtime to not crash the database if errors are not well handled.

Member level not adjusted properly on dim.edit() ... dim.commit()

Sample:

dim.add_member("Year", ("Q1", "Q2", "Q3", "Q4"))

dim.add_member(["Q1", "Q2", "Q3", "Q4"],
                   [("Jan", "Feb", "Mar"), ("Apr", "Mai", "Jun"),
                    ("Jul", "Aug", "Sep"), ("Oct", "Nov", "Dec")])

dim.add_member(["HY1", "HY2"], [("Jan", "Feb", "Mar", "Apr", "Mai", "Jun"),
                                    ("Jul", "Aug", "Sep", "Oct", "Nov", "Dec")])

The level of "Year" currently returns 1, but need to return 2,
as 2 is the depth of the resulting hierarchy, e.g., "Year"(2) > "Q1"(1) > "Jan"(0).

Data Integrator

'DataIntegrator' class to provide more simple capabilities to integrate data from external data sources for dimensions, attributes and cubes.

Samples Views

Create a set of 6 to 10 sample Views for the enterprise sample database. At least 2 to 3 per cube.

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.