Skip to content

Commit

Permalink
docs: add banners for Cube + Snowflake event (#6929)
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Jul 20, 2023
1 parent 9b14fd3 commit 68ce827
Show file tree
Hide file tree
Showing 15 changed files with 133 additions and 29 deletions.
7 changes: 7 additions & 0 deletions docs/content/Configuration/Databases/Snowflake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ title: Snowflake
permalink: /config/databases/snowflake
---

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

## Prerequisites

- [The account ID][snowflake-docs-account-id] for [Snowflake][snowflake]
Expand Down
7 changes: 7 additions & 0 deletions docs/content/Getting-Started/Cloud/01-Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ subCategory: Cube Cloud
menuOrder: 2
---

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

This getting started guide will show you how to use Cube Cloud with Snowflake. You will learn how to:

- Load sample data into your Snowflake account
Expand Down
9 changes: 8 additions & 1 deletion docs/content/Getting-Started/Cloud/02-Load data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ subCategory: Cube Cloud
menuOrder: 2.1
---

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

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.

First, let’s create a warehouse, database, and schema. Paste the following SQL into the Editor of the Snowflake worksheet and click Run.
Expand Down Expand Up @@ -105,4 +112,4 @@ Run the following command to load data into the `products` table.
COPY INTO cube_demo.ecom.products (id, name, created_at, product_category)
FROM 's3://cube-tutorial/products.csv'
FILE_FORMAT = (TYPE = 'CSV' FIELD_DELIMITER = ',' SKIP_HEADER = 1);
```
```
11 changes: 9 additions & 2 deletions docs/content/Getting-Started/Cloud/03-Connect-to-Snowflake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ subCategory: Cube Cloud
menuOrder: 3
---

In this section, we’ll create a Cube Cloud deployment and connect it to Snowflake.
<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

In this section, we’ll create a Cube Cloud deployment and connect it to Snowflake.
A deployment represents a data model, configuration, and managed infrastructure.

To continue with this guide, you'll need to have a Cube Cloud account. If you
Expand Down Expand Up @@ -40,7 +47,7 @@ Next, click <Btn>Create</Btn> to create a new project from scratch:
src="https://ucarecdn.com/46b72b61-b650-4271-808d-55203f1c8d8b/"
/>

## Connect to your Snowflake
## Connect to your Snowflake

The last step is to connect Cube Cloud to Snowflake. First, select it from the grid:

Expand Down
31 changes: 19 additions & 12 deletions docs/content/Getting-Started/Cloud/04-Create-data-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@ subCategory: Cube Cloud
menuOrder: 4
---

Cube follows a dataset-oriented data modeling approach, which is inspired by and expands upon dimensional modeling.
<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

Cube follows a dataset-oriented data modeling approach, which is inspired by and expands upon dimensional modeling.
Cube incorporates this approach and provides a practical framework for implementing dataset-oriented data modeling.

When building a data model in Cube, you work with two dataset-centric objects: **cubes** and **views**.
**Cubes** usually represent business entities such as customers, line items, and orders.
In cubes, you define all the calculations within the measures and dimensions of these entities.
When building a data model in Cube, you work with two dataset-centric objects: **cubes** and **views**.
**Cubes** usually represent business entities such as customers, line items, and orders.
In cubes, you define all the calculations within the measures and dimensions of these entities.
Additionally, you define relationships between cubes, such as "an order has many line items" or "a user may place multiple orders."

**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.
You can think of views as the final data products for your data consumers - BI users, data apps, AI agents, etc.
**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.
You can think of views as the final data products for your data consumers - BI users, data apps, AI agents, etc.
When building views, you select measures and dimensions from different connected cubes and present them as a single dataset to BI or data apps.

<Diagram
Expand Down Expand Up @@ -70,10 +77,10 @@ cubes:
As you can see, we already have a `count` measure that we can use to calculate the total count of our orders.

Let's add an additional measure to the `orders` cube to calculate only **completed orders**.
The `status` dimension in the `orders` cube reflects the three possible statuses: **processing**, **shipped**, or **completed**.
We will create a new measure `completed_count` by using a filter on that dimension.
To do this, we will use a [filter parameter](/schema/reference/measures#parameters-filters) of the measure
Let's add an additional measure to the `orders` cube to calculate only **completed orders**.
The `status` dimension in the `orders` cube reflects the three possible statuses: **processing**, **shipped**, or **completed**.
We will create a new measure `completed_count` by using a filter on that dimension.
To do this, we will use a [filter parameter](/schema/reference/measures#parameters-filters) of the measure
and [refer](/data-modeling/syntax#referring-to-objects) to the existing dimension.

Add the following measure definition to your `model/cubes/orders.yml` file. It should be included within the `measures` block.
Expand Down Expand Up @@ -168,12 +175,12 @@ views:
- join_path: orders.users
prefix: true
includes:
includes:
- city
- age
- state
```

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.

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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ subCategory: Cube Cloud
menuOrder: 6
---

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

In this step, we'll add a pre-aggregation to optimize the performance of a
specific query. Pre-aggregations are a caching technique that massively reduces
query time from seconds to milliseconds. They are extremely useful for speeding
Expand Down
31 changes: 19 additions & 12 deletions docs/content/Getting-Started/Cloud/05-Query-from-BI.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ subCategory: Cube Cloud
menuOrder: 5
---

You can query Cube using a BI or visualization tool through the Cube SQL API.
To provide a good end-user experience in your BI tool, we recommend mapping the BI's data model to Cube's semantic layer.
<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

You can query Cube using a BI or visualization tool through the Cube SQL API.
To provide a good end-user experience in your BI tool, we recommend mapping the BI's data model to Cube's semantic layer.
This can be done automatically with Semantic Layer Sync or manually.

## Semantic Layer Sync
Expand All @@ -17,8 +24,8 @@ that correspond to entities within the data model in Cube, such as cubes, views,

<Diagram src="https://ucarecdn.com/c270ae45-d14c-4896-b41f-1ab4973f00f0/" />

Semantic Layer Sync will synchronize all public cubes and views with connected BI tools.
We recommend making your cubes private and only exposing views. Both cubes and views are public by default.
Semantic Layer Sync will synchronize all public cubes and views with connected BI tools.
We recommend making your cubes private and only exposing views. Both cubes and views are public by default.
To make cubes private, set the [public](/schema/reference/cube#parameters-public) parameter to `false`.

```yaml
Expand All @@ -28,14 +35,14 @@ cubes:
public: false
```
Let’s create our first Semantic Layer Sync with [Apache Superset](https://superset.apache.org/)!
Let’s create our first Semantic Layer Sync with [Apache Superset](https://superset.apache.org/)!
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>.
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>.
Follow the steps in the wizard to create a sync.
Under the hood, Semantic Layer Sync is configured using the `semanticLayerSync` option in the `cube.js` configuration file.

Cube uses the Superset API, which requires a `user` and `password` for authentication.
Cube uses the Superset API, which requires a `user` and `password` for authentication.
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.

Example `cube.js` configuration file for Superset:
Expand All @@ -56,20 +63,20 @@ module.exports = {
};
```

Replace the fields for user, password, and URL with your Superset credentials, then click on <Btn>Save All</Btn>.
Replace the fields for user, password, and URL with your Superset credentials, then click on <Btn>Save All</Btn>.
You can now go to the <Btn>BI Integrations</Btn> page and trigger the synchronization of your newly created semantic layer.

After running the sync, navigate to your Superset instance. You should see the `orders_view` dataset that was created in Superset.
After running the sync, navigate to your Superset instance. You should see the `orders_view` dataset that was created in Superset.
Cube automatically maps all metrics and dimensions in Superset to measures and dimensions in the Cube data model.

## Manual Setup

Alternatively, you can connect to Cube and create all the mappings manually.
Alternatively, you can connect to Cube and create all the mappings manually.
To do this, navigate to your Apache Superset instance and connect to Cube Cloud as if it were a Postgres database.

You can find the credentials to connect to Cube on the <Btn>BI Integrations</Btn> page under the <Btn>SQL API Connection</Btn> tab.

After connecting, create a new dataset in Superset and select "orders_view" as a table.
After connecting, create a new dataset in Superset and select "orders_view" as a table.
Now you can map Superset metrics and columns to Cube's measures and dimensions.

<Diagram
Expand All @@ -84,4 +91,4 @@ As you can see, we use the `MEASURE` function in the "SQL expression" field. Thi
src="https://ucarecdn.com/fd8e69e6-0a01-4ed9-8deb-848efb8a7e7f/"
/>

In the next section, we will learn how to use Cube's REST API to query our view from a React app.
In the next section, we will learn how to use Cube's REST API to query our view from a React app.
7 changes: 7 additions & 0 deletions docs/content/Getting-Started/Cloud/06-Learn-more.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ subCategory: Cube Cloud
menuOrder: 7
---

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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.
Learn how to easily connect Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

Now that you've set up your first deployment, learn more about other Cube Cloud
feaures.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ redirect_from:

# Snowflake

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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. Learn how to easily connect
Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

## Prerequisites

- [The account ID][snowflake-docs-account-id] for [Snowflake][snowflake]
Expand Down
4 changes: 2 additions & 2 deletions docs/docs-new/pages/product/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Alternatively, you can run Cube on your own infrastructure with Docker.

<Grid cols={2} imageSize={[undefined, 50]}>
<GridItem
url="getting-started/cloud"
url="getting-started/cloud/overview"
imageUrl="https://static.cube.dev/icons/cube.svg"
title="Cube Cloud"
/>
<GridItem
url="getting-started/core"
url="getting-started/core/overview"
imageUrl="https://static.cube.dev/icons/docker.svg"
title="Cube Core"
/>
Expand Down
8 changes: 8 additions & 0 deletions docs/docs-new/pages/product/getting-started/cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ redirect_from:

# Getting started with Cube Cloud

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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. Learn how to easily connect
Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

This getting started guide will show you how to use Cube Cloud with Snowflake.
You will learn how to:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ redirect_from:

# Connect to Snowflake

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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. Learn how to easily connect
Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

In this section, we’ll create a Cube Cloud deployment and connect it to
Snowflake. A deployment represents a data model, configuration, and managed
infrastructure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ redirect_from:

# Create your first data model

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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. Learn how to easily connect
Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

Cube follows a dataset-oriented data modeling approach, which is inspired by and
expands upon dimensional modeling. Cube incorporates this approach and provides
a practical framework for implementing dataset-oriented data modeling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ redirect_from:

# Load data

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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. Learn how to easily connect
Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ redirect_from:

# Query from a BI tool

<InfoBox heading="Get Started with Cube Cloud & Snowflake">

[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. Learn how to easily connect
Cube Cloud and Snowflake, load your data, and integrate your BI tools.

</InfoBox>

You can query Cube using a BI or visualization tool through the Cube SQL API. To
provide a good end-user experience in your BI tool, we recommend mapping the
BI's data model to Cube's semantic layer. This can be done automatically with
Expand Down

0 comments on commit 68ce827

Please sign in to comment.