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/Configuration/Databases/Snowflake.mdx
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,13 @@ title: Snowflake
3
3
permalink: /config/databases/snowflake
4
4
---
5
5
6
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
7
+
8
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
9
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
10
+
11
+
</InfoBox>
12
+
6
13
## Prerequisites
7
14
8
15
-[The account ID][snowflake-docs-account-id] for [Snowflake][snowflake]
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/01-Overview.mdx
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@ subCategory: Cube Cloud
6
6
menuOrder: 2
7
7
---
8
8
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
9
16
This getting started guide will show you how to use Cube Cloud with Snowflake. You will learn how to:
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/02-Load data.mdx
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@ subCategory: Cube Cloud
6
6
menuOrder: 2.1
7
7
---
8
8
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
9
16
The following steps will guide you through setting up a Snowflake account and uploading the demo dataset, which is stored as CSV files in a public S3 bucket.
10
17
11
18
First, let’s create a warehouse, database, and schema. Paste the following SQL into the Editor of the Snowflake worksheet and click Run.
@@ -105,4 +112,4 @@ Run the following command to load data into the `products` table.
105
112
COPY INTO cube_demo.ecom.products (id, name, created_at, product_category)
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/03-Connect-to-Snowflake.mdx
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,14 @@ subCategory: Cube Cloud
6
6
menuOrder: 3
7
7
---
8
8
9
-
In this section, we’ll create a Cube Cloud deployment and connect it to Snowflake.
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
16
+
In this section, we’ll create a Cube Cloud deployment and connect it to Snowflake.
10
17
A deployment represents a data model, configuration, and managed infrastructure.
11
18
12
19
To continue with this guide, you'll need to have a Cube Cloud account. If you
@@ -40,7 +47,7 @@ Next, click <Btn>Create</Btn> to create a new project from scratch:
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/04-Create-data-model.mdx
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,23 @@ subCategory: Cube Cloud
6
6
menuOrder: 4
7
7
---
8
8
9
-
Cube follows a dataset-oriented data modeling approach, which is inspired by and expands upon dimensional modeling.
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
16
+
Cube follows a dataset-oriented data modeling approach, which is inspired by and expands upon dimensional modeling.
10
17
Cube incorporates this approach and provides a practical framework for implementing dataset-oriented data modeling.
11
18
12
-
When building a data model in Cube, you work with two dataset-centric objects: **cubes** and **views**.
13
-
**Cubes** usually represent business entities such as customers, line items, and orders.
14
-
In cubes, you define all the calculations within the measures and dimensions of these entities.
19
+
When building a data model in Cube, you work with two dataset-centric objects: **cubes** and **views**.
20
+
**Cubes** usually represent business entities such as customers, line items, and orders.
21
+
In cubes, you define all the calculations within the measures and dimensions of these entities.
15
22
Additionally, you define relationships between cubes, such as "an order has many line items" or "a user may place multiple orders."
16
23
17
-
**Views** sit on top of a data graph of cubes and create a facade of your entire data model, with which data consumers can interact.
18
-
You can think of views as the final data products for your data consumers - BI users, data apps, AI agents, etc.
24
+
**Views** sit on top of a data graph of cubes and create a facade of your entire data model, with which data consumers can interact.
25
+
You can think of views as the final data products for your data consumers - BI users, data apps, AI agents, etc.
19
26
When building views, you select measures and dimensions from different connected cubes and present them as a single dataset to BI or data apps.
20
27
21
28
<Diagram
@@ -70,10 +77,10 @@ cubes:
70
77
71
78
As you can see, we already have a `count` measure that we can use to calculate the total count of our orders.
72
79
73
-
Let's add an additional measure to the `orders` cube to calculate only **completed orders**.
74
-
The `status` dimension in the `orders` cube reflects the three possible statuses: **processing**, **shipped**, or **completed**.
75
-
We will create a new measure `completed_count` by using a filter on that dimension.
76
-
To do this, we will use a [filter parameter](/schema/reference/measures#parameters-filters) of the measure
80
+
Let's add an additional measure to the `orders` cube to calculate only **completed orders**.
81
+
The `status` dimension in the `orders` cube reflects the three possible statuses: **processing**, **shipped**, or **completed**.
82
+
We will create a new measure `completed_count` by using a filter on that dimension.
83
+
To do this, we will use a [filter parameter](/schema/reference/measures#parameters-filters) of the measure
77
84
and [refer](/data-modeling/syntax#referring-to-objects) to the existing dimension.
78
85
79
86
Add the following measure definition to your `model/cubes/orders.yml` file. It should be included within the `measures` block.
@@ -168,12 +175,12 @@ views:
168
175
169
176
- join_path: orders.users
170
177
prefix: true
171
-
includes:
178
+
includes:
172
179
- city
173
180
- age
174
181
- state
175
182
```
176
183
177
184
When building views, you can leverage the `cubes` parameter, which enables you to include measures and dimensions from other cubes in the view. You can build your view by combining multiple joined cubes and specifying the path by which they should be joined for that particular view.
178
185
179
-
After saving, you can experiment with your newly created view in the Playground. In the next section, we will learn how to query our `orders_view` using a BI tool.
186
+
After saving, you can experiment with your newly created view in the Playground. In the next section, we will learn how to query our `orders_view` using a BI tool.
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/05-Add-a-pre-aggregation.mdx
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@ subCategory: Cube Cloud
6
6
menuOrder: 6
7
7
---
8
8
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
9
16
In this step, we'll add a pre-aggregation to optimize the performance of a
10
17
specific query. Pre-aggregations are a caching technique that massively reduces
11
18
query time from seconds to milliseconds. They are extremely useful for speeding
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/05-Query-from-BI.mdx
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,15 @@ subCategory: Cube Cloud
6
6
menuOrder: 5
7
7
---
8
8
9
-
You can query Cube using a BI or visualization tool through the Cube SQL API.
10
-
To provide a good end-user experience in your BI tool, we recommend mapping the BI's data model to Cube's semantic layer.
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
16
+
You can query Cube using a BI or visualization tool through the Cube SQL API.
17
+
To provide a good end-user experience in your BI tool, we recommend mapping the BI's data model to Cube's semantic layer.
11
18
This can be done automatically with Semantic Layer Sync or manually.
12
19
13
20
## Semantic Layer Sync
@@ -17,8 +24,8 @@ that correspond to entities within the data model in Cube, such as cubes, views,
Semantic Layer Sync will synchronize all public cubes and views with connected BI tools.
21
-
We recommend making your cubes private and only exposing views. Both cubes and views are public by default.
27
+
Semantic Layer Sync will synchronize all public cubes and views with connected BI tools.
28
+
We recommend making your cubes private and only exposing views. Both cubes and views are public by default.
22
29
To make cubes private, set the [public](/schema/reference/cube#parameters-public) parameter to `false`.
23
30
24
31
```yaml
@@ -28,14 +35,14 @@ cubes:
28
35
public: false
29
36
```
30
37
31
-
Let’s create our first Semantic Layer Sync with [Apache Superset](https://superset.apache.org/)!
38
+
Let’s create our first Semantic Layer Sync with [Apache Superset](https://superset.apache.org/)!
32
39
33
-
You can create a new sync by navigating to the <Btn>Semantic Layer Sync</Btn> tab on the <Btn>BI Integrations</Btn> page and clicking <Btn>+ Create Sync</Btn>.
40
+
You can create a new sync by navigating to the <Btn>Semantic Layer Sync</Btn> tab on the <Btn>BI Integrations</Btn> page and clicking <Btn>+ Create Sync</Btn>.
34
41
Follow the steps in the wizard to create a sync.
35
42
36
43
Under the hood, Semantic Layer Sync is configured using the `semanticLayerSync` option in the `cube.js` configuration file.
37
44
38
-
Cube uses the Superset API, which requires a `user` and `password` for authentication.
45
+
Cube uses the Superset API, which requires a `user` and `password` for authentication.
39
46
You can use your own username and password or create a new service account. You can copy a `URL` from any page of your Superset workspace.
40
47
41
48
Example `cube.js` configuration file for Superset:
@@ -56,20 +63,20 @@ module.exports = {
56
63
};
57
64
```
58
65
59
-
Replace the fields for user, password, and URL with your Superset credentials, then click on <Btn>Save All</Btn>.
66
+
Replace the fields for user, password, and URL with your Superset credentials, then click on <Btn>Save All</Btn>.
60
67
You can now go to the <Btn>BI Integrations</Btn> page and trigger the synchronization of your newly created semantic layer.
61
68
62
-
After running the sync, navigate to your Superset instance. You should see the `orders_view` dataset that was created in Superset.
69
+
After running the sync, navigate to your Superset instance. You should see the `orders_view` dataset that was created in Superset.
63
70
Cube automatically maps all metrics and dimensions in Superset to measures and dimensions in the Cube data model.
64
71
65
72
## Manual Setup
66
73
67
-
Alternatively, you can connect to Cube and create all the mappings manually.
74
+
Alternatively, you can connect to Cube and create all the mappings manually.
68
75
To do this, navigate to your Apache Superset instance and connect to Cube Cloud as if it were a Postgres database.
69
76
70
77
You can find the credentials to connect to Cube on the <Btn>BI Integrations</Btn> page under the <Btn>SQL API Connection</Btn> tab.
71
78
72
-
After connecting, create a new dataset in Superset and select "orders_view" as a table.
79
+
After connecting, create a new dataset in Superset and select "orders_view" as a table.
73
80
Now you can map Superset metrics and columns to Cube's measures and dimensions.
74
81
75
82
<Diagram
@@ -84,4 +91,4 @@ As you can see, we use the `MEASURE` function in the "SQL expression" field. Thi
Copy file name to clipboardExpand all lines: docs/content/Getting-Started/Cloud/06-Learn-more.mdx
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@ subCategory: Cube Cloud
6
6
menuOrder: 7
7
7
---
8
8
9
+
<InfoBoxheading="Get Started with Cube Cloud & Snowflake">
10
+
11
+
[Join our upcoming Office Hours on July 26 at 9am PST](https://cube.dev/events/unlock-data-cube-snowflake) on Getting Started with Cube Cloud and Snowflake.
12
+
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.
13
+
14
+
</InfoBox>
15
+
9
16
Now that you've set up your first deployment, learn more about other Cube Cloud
0 commit comments