Power of Three is the Elixir library that provides macros to define a cube, dimensions and measures along side with Ecto.Schema.
This defenitions are complied to cubes config files on mix compile. The yaml output only for now.
The cubes config files then can be be shared with the running Cube.
The Examples shows working features. The future plans are bellow in the order of priority:
Solution for data analytics:
- documentation: https://cube.dev/product/cube-core
- Helm Charts https://github.com/gadsme/charts
How to use cube:
- Define cubes as collections of measures aggregated along dimensions: DSL, yaml or JS.
- Decide how to refresh cube data
- Profit!
- hex.pm documentation
- support @schema_prefix
- validate on pathtrough all options for the cube, dimensions, measures and pre-aggregations
- handle
sql_tablenames colisions with keywords - validate use of already defined cube members: in definitions of other measures and dimensions
- because the
cubecan impersonatepostgresimplement Table.Reader for Explorer.DataFrame - handle dimension's
case - CI integration: what to do with generated yams: commit to tree? push to S3? when in CI?
- CI integration: validate yams by starting a cube and make sure configs are sound.
- generate default dimensions, measures for all columns of the table if
cube()macro is used without anything else declared to mimic the capability of cube dev environment - cause the
cubecan impersonatepostgres: generate an Ecto.Schema for the Cube defined (AKA _full loop): columns are measures and dimensions
Handle of cube's sql will not be done. Only sql_table. If you find yourself thinking adding support for sql, please fork and let the force be with you.
The names of tables and columns used in definitions of measures and dimensions are verifiable to be present in Ecto.Schema, hence why write/maintain another yaml or even worse json?
For crafting Cubes here is the docker: compose.yaml
Four types of containers:
- API
- Refresh Workers
- Cubestore Router
- Cubestore Workers
Two need the DB connection: API and Refresh Workers Router needs shared storage with Store Workers: S3 is recommended.
To install the Cube Core and run locally see here:
To use library
TODO HEX
If available in Hex, the package can be installed
by adding power_of_3 to your list of dependencies in mix.exs:
def deps do
[
{:power_of_3, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/power_of_3.