Skip to content

Commit 112300e

Browse files
docs(getting-started): revamp Getting Started (#6013)
Co-authored-by: Igor Lukanin <[email protected]>
1 parent a8ef748 commit 112300e

22 files changed

+917
-647
lines changed

docs/content/Configuration/Downstream/Superset.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ To allow queries from Superset to match pre-aggregations in Cube, [the
135135
must be set to `true` in the pre-aggregation definition. This is because
136136
Superset uses loose date ranges when generating SQL queries.
137137

138-
[ref-cube-getting-started-docker]: https://cube.dev/docs/getting-started/docker
139138
[ref-getting-started]: /cloud/getting-started
140139
[ref-schema-ref-preagg-allownonstrict]:
141140
/schema/reference/pre-aggregations#allow-non-strict-date-range-match
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Getting started with Cube Cloud
3+
permalink: /getting-started/cloud/overview
4+
category: Getting Started
5+
subCategory: Cube Cloud
6+
menuOrder: 2
7+
---
8+
9+
First, we'll create a new deployment, connect it to a database, and generate a
10+
data model from it. Then, we'll run queries using the Developer Playground and
11+
APIs. Finally, we'll add a pre-aggregation to optimize query latency down to
12+
milliseconds.
13+
14+
This guide will walk you through the following tasks:
15+
16+
- [Create a new deployment](/getting-started/cloud/create-a-deployment)
17+
- [Generate a data model from a connected data source](/getting-started/cloud/generate-models)
18+
- [Run queries using the Developer Playground and APIs](/getting-started/cloud/query-data)
19+
- [Add a pre-aggregation to optimize query performance](/getting-started/cloud/add-a-pre-aggregation)
20+
21+
If you'd prefer to run Cube locally, then you can refer to [Getting Started
22+
using Cube Core][ref-getting-started-core-overview] instead.
23+
24+
[ref-getting-started-core-overview]: /getting-started/core/overview
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
title: Create a deployment
3+
permalink: /getting-started/cloud/create-a-deployment
4+
category: Getting Started
5+
subCategory: Cube Cloud
6+
menuOrder: 3
7+
---
8+
9+
In this step, we will create a new deployment in Cube Cloud. A deployment
10+
represents a data model, configuration, and managed infrastructure. We will use
11+
it to connect a data source and generate data models.
12+
13+
## Create an account
14+
15+
To continue with this guide, you'll need to have a Cube Cloud account. If you
16+
don't have one yet, [click here to sign up][cube-cloud-signup] for free.
17+
18+
## Create a deployment
19+
20+
First, [sign in to your Cube Cloud account][cube-cloud-signin]. Then,
21+
click&nbsp;<Btn>Create Deployment</Btn>:
22+
23+
<div style="text-align: center">
24+
<img
25+
alt="Cube Cloud Landing Screen with no configured deployments"
26+
src="https://ucarecdn.com/f3ec1ae0-1d5d-4b5b-9859-9fc145b38e43/"
27+
style="border: none"
28+
width="80%"
29+
/>
30+
</div>
31+
32+
Give the deployment a name, select the cloud provider and region of your choice,
33+
and click <Btn>Next</Btn>:
34+
35+
<div style="text-align: center">
36+
<img
37+
alt="Cube Cloud Create Deployment Screen"
38+
src="https://ucarecdn.com/2338323e-0db8-4224-8e7a-3b4daf9c60ec/"
39+
style="border: none"
40+
width="80%"
41+
/>
42+
</div>
43+
44+
## Set up a Cube project
45+
46+
Next, click <Btn>Create</Btn> to create a new project from scratch:
47+
48+
<div style="text-align: center">
49+
<img
50+
alt="Cube Cloud Upload Project Screen"
51+
src="https://ucarecdn.com/46b72b61-b650-4271-808d-55203f1c8d8b/"
52+
style="border: none"
53+
width="80%"
54+
/>
55+
</div>
56+
57+
## Connect a data source
58+
59+
The last step in creating a deployment is to connect your data source to Cube
60+
Cloud. First, select the data source from the grid:
61+
62+
<div style="text-align: center">
63+
<img
64+
alt="Cube Cloud Setup Database Screen"
65+
src="https://ucarecdn.com/1d656ba9-dd83-4ff4-a59e-8b5f97a9ddcc/"
66+
style="border: none"
67+
width="80%"
68+
/>
69+
</div>
70+
71+
<InfoBox>
72+
73+
Want to use a sample database instead? Select <Btn>PostgreSQL</Btn> and use the
74+
credentials below:
75+
76+
<br />
77+
78+
| Field | Value |
79+
| -------- | ------------------ |
80+
| Host | `demo-db.cube.dev` |
81+
| Port | `5432` |
82+
| Database | `ecom` |
83+
| Username | `cube` |
84+
| Password | `12345` |
85+
86+
</InfoBox>
87+
88+
After selecting the data source, enter valid credentials for it and
89+
click&nbsp;<Btn>Apply</Btn>. Check the [Connecting to Databases][ref-conf-db]
90+
page for more details on specific data sources.
91+
92+
<div style="text-align: center">
93+
<img
94+
alt="Cube Cloud Setup Database Screen"
95+
src="https://ucarecdn.com/1ccdb149-bcf3-4426-9103-986f092939b7/"
96+
style="border: none"
97+
width="80%"
98+
/>
99+
</div>
100+
101+
If you run into issues here, make sure to allow inbound connections from Cube
102+
Cloud IP addresses to your database. This means you need to enable these IPs in
103+
your firewall. Using the screenshot in the example above, if you are using AWS,
104+
this would mean adding new [rules][aws-docs-sec-group-rule] to your database's
105+
[security group][aws-docs-sec-group]:
106+
107+
| Source | Protocol | Port range |
108+
| --------------- | -------- | ---------- |
109+
| `3.65.255.79` | `TCP` | `5432` |
110+
| `3.69.4.168` | `TCP` | `5432` |
111+
| `3.64.153.169` | `TCP` | `5432` |
112+
| `18.185.128.84` | `TCP` | `5432` |
113+
114+
Now that the deployment is configured, we can move on to [generating data
115+
models][ref-getting-started-cloud-generate-models].
116+
117+
[aws-docs-sec-group]:
118+
https://docs.aws.amazon.com/vpc/latest/userguide/security-groups.html
119+
[aws-docs-sec-group-rule]:
120+
https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html
121+
[cube-cloud-signin]: https://cubecloud.dev/auth
122+
[cube-cloud-signup]: https://cubecloud.dev/auth/signup
123+
[ref-conf-db]: /config/databases
124+
[ref-getting-started-cloud-generate-models]:
125+
/getting-started/cloud/generate-models
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Generate data models
3+
permalink: /getting-started/cloud/generate-models
4+
category: Getting Started
5+
subCategory: Cube Cloud
6+
menuOrder: 4
7+
---
8+
9+
In this step, you will generate data models using the connected data source from
10+
the last step.
11+
12+
Cube's data models provide a declarative way to define important facts about
13+
your data and relationships between them. You can create data models from
14+
scratch or let Cube generate an initial version for you.
15+
16+
## Select tables
17+
18+
Start by selecting the database tables to generate the data schema from, then
19+
click <Btn>Measures and Dimensions</Btn>:
20+
21+
<div style="text-align: center">
22+
<img
23+
alt="Cube Cloud Generate Models Screen detected tables from data source for selection"
24+
src="https://ucarecdn.com/e0420b86-64bc-4e01-aa74-16a7e926f523/"
25+
style="border: none"
26+
width="80%"
27+
/>
28+
</div>
29+
30+
## Measures and dimensions
31+
32+
Next, you'll see all detected measures and dimensions from the data source.
33+
Click <Btn>Primary Keys</Btn> to progress to the next step:
34+
35+
<div style="text-align: center">
36+
<img
37+
alt="Cube Cloud Generate Models Screen showing detected measures and dimensions"
38+
src="https://ucarecdn.com/e0f8e8c3-9961-4360-ab9f-cfd96306c832/"
39+
style="border: none"
40+
width="80%"
41+
/>
42+
</div>
43+
44+
## Primary keys
45+
46+
Review the detected primary keys for each cube and click <Btn>Joins</Btn> to
47+
move to the next step:
48+
49+
<div style="text-align: center">
50+
<img
51+
alt="Cube Cloud Generate Models Screen showing detected primary keys"
52+
src="https://ucarecdn.com/e13e8279-e9e9-40df-b8f6-8cf5bb34ee14/"
53+
style="border: none"
54+
width="80%"
55+
/>
56+
</div>
57+
58+
## Joins
59+
60+
Once again, review the detected joins and relationships and click
61+
62+
<Btn>Review</Btn>:
63+
64+
<div style="text-align: center">
65+
<img
66+
alt="Cube Cloud Generate Models Screen showing detected joins"
67+
src="https://ucarecdn.com/8190bd70-e4e3-4e9f-9cee-e9416ddf964b/"
68+
style="border: none"
69+
width="80%"
70+
/>
71+
</div>
72+
73+
## Review
74+
75+
The last screen allows you to review all the detected cubes and their
76+
corresponding measures, dimensions, and joins. If everything looks good, pick
77+
either <Btn>YAML</Btn> (recommended) or <Btn>JavaScript</Btn> format and
78+
click&nbsp;<Btn>Confirm & Generate</Btn>:
79+
80+
<div style="text-align: center">
81+
<img
82+
alt="Cube Cloud Generate Models Screen showing review screen"
83+
src="https://ucarecdn.com/59e18ad2-b8fc-48dc-b409-d829579048f5/"
84+
style="border: none"
85+
width="80%"
86+
/>
87+
</div>
88+
89+
Cube Cloud will now generate the models and spin up your Cube deployment, and in
90+
a few moments you should see the following screen:
91+
92+
<div style="text-align: center">
93+
<img
94+
alt="Cube Cloud Deployment Overview Screen"
95+
src="https://ucarecdn.com/7fa603ae-6100-4492-91e4-564d311f701e/"
96+
style="border: none"
97+
width="80%"
98+
/>
99+
</div>
100+
101+
You're now ready for the next step, [querying the
102+
data][ref-getting-started-cloud-query-cube].
103+
104+
[ref-getting-started-cloud-query-cube]: /getting-started/cloud/query-data

0 commit comments

Comments
 (0)