You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/Cube.js-Introduction.md
+36-12Lines changed: 36 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,28 +6,48 @@ redirect_from:
6
6
- /cubejs-introduction
7
7
---
8
8
9
-
**Cube is the headless business intelligence platform.** It helps data engineers and application developers access data from modern data stores, organize it into consistent definitions, and deliver it to every application.
9
+
**Cube is the Semantic Layer for building data apps.** It helps data engineers
10
+
and application developers access data from modern data stores, organize it into
11
+
consistent definitions, and deliver it to every application.
Cube was designed to work with all SQL-enabled data sources, including cloud data warehouses like Snowflake or Google BigQuery, query engines like Presto or Amazon Athena, and application databases like Postgres. Cube has a built-in caching engine to provide sub-second latency and high concurrency for API requests.
19
+
Cube was designed to work with all SQL-enabled data sources, including cloud
20
+
data warehouses like Snowflake or Google BigQuery, query engines like Presto or
21
+
Amazon Athena, and application databases like Postgres. Cube has a built-in
22
+
caching engine to provide sub-second latency and high concurrency for API
23
+
requests.
18
24
19
-
With Cube, you can build a data model, manage access control and caching, and expose your data to every application via REST, GraphQL, and SQL APIs.
20
-
Cube is headless, API-first, and decoupled from visualizations. You can use any charting library to build custom UI, or connect existing dashboarding and reporting tools to Cube.
25
+
With Cube, you can build a data model, manage access control and caching, and
26
+
expose your data to every application via REST, GraphQL, and SQL APIs. Cube is
27
+
headless, API-first, and decoupled from visualizations. You can use any charting
28
+
library to build custom UI, or connect existing dashboarding and reporting tools
29
+
to Cube.
21
30
22
31
## Why Cube?
23
32
24
-
If you are building a data application—such as a business intelligence tool or a customer-facing analytics feature—you’ll probably face the following problems:
33
+
If you are building a data application—such as a business intelligence tool or a
34
+
customer-facing analytics feature—you’ll probably face the following problems:
25
35
26
-
1.__SQL code organization.__ Sooner or later, modeling even a dozen metrics with a dozen dimensions using pure SQL queries becomes a maintenance nightmare, which leads to building a modeling framework.
27
-
2.__Performance.__ Most of the time and effort in modern analytics software development is spent providing adequate time to insight. In a world where every company’s data is big data, writing just SQL queries to get insight isn’t enough anymore.
28
-
3.__Access Control.__ It is important to secure and govern access to data for all downstream data consuming applications.
36
+
1.**SQL code organization.** Sooner or later, modeling even a dozen metrics
37
+
with a dozen dimensions using pure SQL queries becomes a maintenance
38
+
nightmare, which leads to building a modeling framework.
39
+
2.**Performance.** Most of the time and effort in modern analytics software
40
+
development is spent providing adequate time to insight. In a world where
41
+
every company’s data is big data, writing just SQL queries to get insight
42
+
isn’t enough anymore.
43
+
3.**Access Control.** It is important to secure and govern access to data for
44
+
all downstream data consuming applications.
29
45
30
-
Cube has the necessary infrastructure and features to implement efficient data modeling, access control, and performance optimizations so that every application can access consistent data via REST, SQL, and GraphQL APIs. Achieve insights from raw data within minutes, and get an API with sub-second response times on up to a trillion data points.
46
+
Cube has the necessary infrastructure and features to implement efficient data
47
+
modeling, access control, and performance optimizations so that every
48
+
application can access consistent data via REST, SQL, and GraphQL APIs. Achieve
49
+
insights from raw data within minutes, and get an API with sub-second response
50
+
times on up to a trillion data points.
31
51
32
52
<div
33
53
style="text-align: center"
@@ -41,10 +61,14 @@ Cube has the necessary infrastructure and features to implement efficient data m
41
61
42
62
## Architecture
43
63
44
-
**Cube acts as a data access layer**, translating API requests into SQL, managing caching, queuing, and database connection.
64
+
**Cube acts as a data access layer**, translating API requests into SQL,
65
+
managing caching, queuing, and database connection.
45
66
46
-
The Cube accepts queries via REST, GraphQL or SQL interfaces. Based on the data model and an incoming query, Cube generates
47
-
a SQL query and executes it in your database. Cube fully manages query orchestration, database connections, as well as caching and access control layers. The result is then sent back to the client.
67
+
Cube accepts queries via REST, GraphQL or SQL interfaces. Based on the data
68
+
model and an incoming query, Cube generates a SQL query and executes it in your
69
+
database. Cube fully manages query orchestration, database connections, as well
70
+
as caching and access control layers. The result is then sent back to the
Cube.js is headless business intelligence for building data applications. Cube.js is visualization-agnostic, so you can build any user interface for your application.
9
+
Cube is visualization-agnostic, so you can build any user interface for your
10
+
application.
10
11
11
-
You can directly query Cube.js Backend using JSON [Query Format](https://cube.dev/docs/query-format) via [HTTP API](https://cube.dev/docs/rest-api) or [WebSockets](https://cube.dev/docs/real-time-data-fetch#web-sockets) and visualize analytical data with tools of your choice. However, it’s much easier to use the Cube.js JavaScript client and bindings for popular frameworks such as React, Angular, and Vue.
12
+
You can directly query Cube Backend using
13
+
JSON [Query Format](https://cube.dev/docs/query-format) via [HTTP API](https://cube.dev/docs/rest-api)
14
+
or [WebSockets](https://cube.dev/docs/real-time-data-fetch#web-sockets) and
15
+
visualize analytical data with tools of your choice. However, it’s much easier
16
+
to use the Cube JavaScript client and bindings for popular frameworks such as
17
+
React, Angular, and Vue.
12
18
13
-
The client has methods to communicate with the Cube.js API Gateway, and retrieve and process data. It is designed to work with existing charting libraries including Chart.js, D3.js, and more.
19
+
The client has methods to communicate with the Cube API Gateway, and retrieve
20
+
and process data. It is designed to work with existing charting libraries
21
+
including Chart.js, D3.js, and more.
14
22
15
-
## Cube.js JavaScript Client
23
+
## Cube JavaScript Client
16
24
17
25
The client provides methods to solve common tasks:
18
26
19
-
**Abstract from the transport and query data.** You can [fetch data](https://cube.dev/docs/@cubejs-client-core#load) from Cube.js Backend or subscribe to [real-time updates](https://cube.dev/docs/real-time-data-fetch) regardless of the protocol, be it HTTP or WebSockets.
27
+
**Abstract from the transport and query data.** You can
28
+
[fetch data](https://cube.dev/docs/@cubejs-client-core#load) from Cube Backend
29
+
or subscribe to [real-time updates](https://cube.dev/docs/real-time-data-fetch)
30
+
regardless of the protocol, be it HTTP or WebSockets.
20
31
21
-
**Transform data for visualization.** You can [pivot](https://cube.dev/docs/@cubejs-client-core#pivot) the result set to display as a [chart](https://cube.dev/docs/@cubejs-client-core#chart-pivot) or as a [table](https://cube.dev/docs/@cubejs-client-core#table-pivot), split into [series](https://cube.dev/docs/@cubejs-client-core#series) or [table columns](https://cube.dev/docs/@cubejs-client-core#table-columns).
32
+
**Transform data for visualization.** You can
33
+
[pivot](https://cube.dev/docs/@cubejs-client-core#pivot) the result set to
34
+
display as a [chart](https://cube.dev/docs/@cubejs-client-core#chart-pivot) or
35
+
as a [table](https://cube.dev/docs/@cubejs-client-core#table-pivot), split into
36
+
[series](https://cube.dev/docs/@cubejs-client-core#series) or
**Simplify work with complex query types.** You can build [Drill Down](https://cube.dev/docs/@cubejs-client-core#drill-down) queries and [decompose](https://cube.dev/docs/@cubejs-client-core#decompose) the results of [compareDateRange](https://cube.dev/docs/query-format#time-dimensions-format) or [Data Blending](https://cube.dev/docs/recipes/data-blending) queries.
39
+
**Simplify work with complex query types.** You can build
40
+
[Drill Down](https://cube.dev/docs/@cubejs-client-core#drill-down) queries and
41
+
[decompose](https://cube.dev/docs/@cubejs-client-core#decompose) the results of
42
+
[compareDateRange](https://cube.dev/docs/query-format#time-dimensions-format) or
[Learn more](https://cube.dev/docs/@cubejs-client-core) in the documentation for the `@cubejs-client/core` package.
45
+
[Learn more](https://cube.dev/docs/@cubejs-client-core) in the documentation for
46
+
the `@cubejs-client/core` package.
26
47
27
-
## Cube.js Angular Package
48
+
## Cube Angular Package
28
49
29
-
The package provides convenient tools to work with Cube.js in Angular:
50
+
The package provides convenient tools to work with Cube in Angular:
30
51
31
-
**Modules.** Inject [CubejsClientModule](https://cube.dev/docs/@cubejs-client-vue#query-builder) and [CubejsClient](https://cube.dev/docs/@cubejs-client-vue#query-renderer) into your components and services to get access to `@cubejs-client/core` API.
52
+
**Modules.** Inject
53
+
[CubejsClientModule](https://cube.dev/docs/@cubejs-client-vue#query-builder) and
54
+
[CubejsClient](https://cube.dev/docs/@cubejs-client-vue#query-renderer) into
55
+
your components and services to get access to `@cubejs-client/core` API.
32
56
33
-
**Subjects.** Use [RxJS Subject](https://cube.dev/docs/@cubejs-client-ngx#api) and query to watch changes.
57
+
**Subjects.** Use [RxJS Subject](https://cube.dev/docs/@cubejs-client-ngx#api)
58
+
and query to watch changes.
34
59
35
60
## Example Usage
36
61
37
62
Here are the typical steps to query and visualize analytical data in Angular:
38
63
39
-
-**Import `@cubejs-client/core` and `@cubejs-client/ngx` packages.** These packages provide all the necessary methods and convenient Angular tools.
40
-
-**Create an instance of Cube.js JavaScript Client.** The client is initialized with Cube.js API URL. In development mode, the default URL is [http://localhost:4000/cubejs-api/v1](http://localhost:4000/cubejs-api/v1). The client is also initialized with an [API token](https://cube.dev/docs/security), but it takes effect only in [production](https://cube.dev/docs/deployment/production-checklist).
41
-
-**Query data from Cube.js Backend and Transform data for visualization.** Use [CubejsClient](https://cube.dev/docs/@cubejs-client-ngx#api) to load data. The client accepts a query, which is a plain JavaScript object. See [Query Format](https://cube.dev/docs/query-format) for details.
42
-
-**Visualize the data.** Use tools of your choice to draw charts and create visualizations.
43
-
44
-
See an example of using Cube.js with Angular and Chart.js library. Note that you can always use a different charting library that suits your needs:
64
+
-**Import `@cubejs-client/core` and `@cubejs-client/ngx` packages.** These
65
+
packages provide all the necessary methods and convenient Angular tools.
66
+
-**Create an instance of Cube JavaScript Client.** The client is initialized
67
+
with Cube API URL. In development mode, the default URL is
Now you can build your application from scratch or generate the code with [Cube.js Playground](https://cube.dev/docs/dashboard-app). You can also [explore example applications](https://cube.dev/docs/examples) built with Cube.js.
96
+
Now you can build your application from scratch or generate the code with
97
+
[Cube Playground](https://cube.dev/docs/dashboard-app). You can also
98
+
[explore example applications](https://cube.dev/docs/examples) built with Cube.
0 commit comments