HOME

TheInfoList



OR:

Cubes is a light-weight
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
multidimensional modelling and
OLAP Online analytical processing, or OLAP (), is an approach to answer multi-dimensional analytical (MDA) queries swiftly in computing. OLAP is part of the broader category of business intelligence, which also encompasses relational databases, repo ...
toolkit for development reporting applications and browsing of aggregated data written in
Python programming language Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically-typed and garbage-collected. It supports multiple programming par ...
released under the
MIT License The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license co ...
. Cubes provides to an analyst or any application end-user "understandable and natural way of reporting using concept of data Cubes – multidimensional data objects". Cubes was first publicly released in March 2011. The project was originally developed for Public Procurements of
Slovakia Slovakia (; sk, Slovensko ), officially the Slovak Republic ( sk, Slovenská republika, links=no ), is a landlocked country in Central Europe. It is bordered by Poland to the north, Ukraine to the east, Hungary to the south, Austria to the ...
. Cubes 1.0 was released in September 2014 and presented on the PyData Conference in New York


Features

*
OLAP Online analytical processing, or OLAP (), is an approach to answer multi-dimensional analytical (MDA) queries swiftly in computing. OLAP is part of the broader category of business intelligence, which also encompasses relational databases, repo ...
and aggregated browsing (default is ROLAP) * logical model of
OLAP cube An OLAP cube is a multi-dimensional array of data. Online analytical processing (OLAP) is a computer-based technique of analyzing data to look for insights. The term ''cube'' here refers to a multi-dimensional dataset, which is also sometimes ca ...
s in
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
or provided from external sources * hierarchical dimensions (attributes that have hierarchical dependencies, such as category-subcategory or country-region) * multiple hierarchies in a dimension * arithmetic expressions for computing derived
measures Measure may refer to: * Measurement, the assignment of a number to a characteristic of an object or event Law * Ballot measure, proposed legislation in the United States * Church of England Measure, legislation of the Church of England * Mea ...
and aggregates * localizable metadata and data


Model

The logical conceptual model in Cubes is described using
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
and can be provided either in a form of a file, directory bundle or from an external model provider (for example a database). The basic model objects are:
cubes In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex. Viewed from a corner it is a hexagon and its net is usually depicted as a cross. The cube is the only ...
and their measures and aggregates, dimensions and their attributes, hierarchies. Logical model also contains mapping from logical attributes to their physical location in a database (or other data source). Example model:


Operations

Cubes provides basic set of operations such as
Data drilling Data drilling (also drilldown) refers to any of various operations and transformations on tabular, relational, and multidimensional data. The term has widespread use in various contexts, but is primarily associated with specialized software desig ...
and filtering ( slicing and dicing). The operations can be accessed either through Python interface or through a light
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initi ...
called Slicer. Example of the python interface: import cubes workspace = Workspace("slicer.ini") browser = workspace.browser("sales") result = browser.aggregate() print(result.summary)


Server

The Cubes provides a non-traditional OLAP server with
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
queries and
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
response
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
. Example query to get "total amount of all contracts between January 2012 and June 2016 by month": The response looks like: The simple HTTP/JSON interface makes it very easy to integrate OLAP reports in web applications written in pure
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
and
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
. The Slicer server contains endpoints describing the
cube In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex. Viewed from a corner it is a hexagon and its net is usually depicted as a cross. The cube is the on ...
metadata which helps to create generic reporting applicationsCubes Viewer
/ref> that don't have to know the database model structure and conceptual hierarchies up-in-front. The Slicer server is written using the
Flask (web framework) Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing t ...
.


ROLAP and SQL

The built-in SQL backend of the framework provides
ROLAP Online analytical processing, or OLAP (), is an approach to answer multi-dimensional analytical (MDA) queries swiftly in computing. OLAP is part of the broader category of business intelligence, which also encompasses relational databases, repor ...
functionality on top a relational database. Cubes contains a SQL query generator that translates the reporting queries into SQL statements. The query generator takes into account
topology In mathematics, topology (from the Greek words , and ) is concerned with the properties of a geometric object that are preserved under continuous deformations, such as stretching, twisting, crumpling, and bending; that is, without closing ho ...
of the
star A star is an astronomical object comprising a luminous spheroid of plasma held together by its gravity. The nearest star to Earth is the Sun. Many other stars are visible to the naked eye at night, but their immense distances from Earth make ...
or
snowflake schema In computing, a snowflake schema is a logical arrangement of tables in a multidimensional database such that the entity relationship diagram resembles a snowflake shape. The snowflake schema is represented by centralized fact tables which a ...
and executes only joins that are necessary to retrieve attributes required by the data analyst. The SQL backend uses
SQLAlchemy SQLAlchemy is an open-source SQL toolkit and object-relational mapper (ORM) for the Python programming language released under the MIT License. Description SQLAlchemy's philosophy is that relational databases behave less like object collectio ...
Python toolkit to construct the queries.


See also

*
SQLAlchemy SQLAlchemy is an open-source SQL toolkit and object-relational mapper (ORM) for the Python programming language released under the MIT License. Description SQLAlchemy's philosophy is that relational databases behave less like object collectio ...


References


External links

* {{Official website, cubes.databrewery.org Data analysis software Data warehousing Python (programming language) libraries Python (programming language) scientific libraries Python (programming language) software SQL Articles with example Python (programming language) code