Skip to content

Commit 97cc89b

Browse files
docs: merge Cube Core and Cube Cloud pages (#6370)
* docs: merge Cube Core and Cube Cloud table of contents * docs: merge Introduction pages * docs: merge AWS Athena configuration pages * docs: merge AWS Redshift configuration pages * docs: merge BigQuery configuration pages * docs: merge Snowflake configuration pages * docs: merge VPC docs * docs: remove `@cubejs-backend/*` reference documentation * docs: merge Configuration pages * docs: rename "Data Schema" section to "Data Modeling" * docs: merge Connecting to Data Sources pages * docs: move Auth0 and AWS Cognito guides to Recipes * docs: move Custom Domains to Deployment section * docs: move Deployment Types under Deployment > Cube Cloud * docs: move Pricing page to Deployment > Cube Cloud * docs: rename Deploys page to 'Continuous Deployment' and move to Deployments > Cube Cloud * docs: remove Dashboard App page * docs: promote Observability subcategory to top-level * docs: rename Developer Tools category to Workspace * docs: merge Developer Playground pages * docs: move Cube IDE page to Workspace category * docs: rename Development API to Development Mode and move to Workspace category * docs(config): move configuration reference pages under Reference > Configuration * docs(sql-api): move configuration reference pages under Reference > SQL API * docs(http-api): split REST API Reference and Overview sections * docs: wip * docs(http-api): split GraphQL API Reference and Overview sections * docs: merge Getting Started * docs: move Access Control to Workspace category * docs: move Inspecting Queries page to Workspace category * docs: merge Cloud Runtime page with Introduction * docs: move Query Format page to HTTP API category * docs: remove Cloud Release Notes page * docs: rename Observability category to Monitoring * docs: remove Cube Cloud logo from header navigation * docs: add links to Auth0 and AWS Cognito recipes * docs: move CLI Commands to Reference category * docs: remove subcategory for SQL API Joins * docs: rename Observability category to Monitoring * docs: reorder pages under Deployment Category * docs: fix broken links * docs: move Frontend reference docs to Reference > Frontend subcategory * docs: reorder pages under Deployment Category * docs: move CLI Reference to Reference > CLI subcategory * docs: rename page to Configuration Options * docs: reorder Reference docs * Edit "Getting Started" * Edit "Getting Started" (2) * Edit "Configuration" * Edit "Configuration" (2) * docs: remove HTTP API category * Edit "Data Modeling" * Edit "Caching" * Edit "SQL API" * Edit "Workspace" * Edit "Deployment" * Edit "Reference" * Misc * Misc * Add pricing tier boxes * docs: fix broken images * docs: move Express migration guide to a recipe * docs: fix ordering of pages in Configuration > Advanced * docs: add info about whitelisting Cube Cloud IPs and VPC connections * One more migration guide --------- Co-authored-by: Igor Lukanin <[email protected]>
1 parent 6a42863 commit 97cc89b

File tree

126 files changed

+1522
-2154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1522
-2154
lines changed

docs-gen/tasks/generate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const TypeDoc = require('typedoc');
22
const path = require('path');
33
const fs = require('fs-extra');
44

5-
const outputDir = '../docs/content/Frontend-Integrations';
5+
const outputDir = '../docs/content/Reference/Frontend';
66

77
const app = new TypeDoc.Application();
88

docs-gen/template/publish.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ const tagValue = (doclet, tagOriginalTitle) => {
104104
const generateModuleSection = (doclet) => `---
105105
title: '${doclet.name}'
106106
permalink: ${tagValue(doclet, 'permalink')}
107-
category: ${tagValue(doclet, 'category')}
108-
subCategory: Reference
107+
category: Reference
108+
subCategory: ${tagValue(doclet, 'subCategory')}
109109
menuOrder: ${tagValue(doclet, 'menuOrder')}
110110
---
111111

docs/content/Auth/Overview.mdx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,13 @@ can then use it to query the Cube API.
121121

122122
## Using JSON Web Key Sets (JWKS)
123123

124-
Cube has out-of-the-box support for the following identity providers:
125-
126-
- [Auth0][ref-jwt-auth0]
127-
- [AWS Cognito][ref-jwt-aws-cognito]
128-
129124
<InfoBox>
130125

131-
If you don't see your identity provider listed, please let us know with a post
132-
on our [Slack][link-slack].
126+
Looking for a guide on how to connect a specific identity provider? Check out
127+
our recipes for using [Auth0][ref-recipe-auth0] or [AWS Cognito][ref-recipe-cognito] with Cube.
133128

134129
</InfoBox>
135130

136-
[link-slack]: https://slack.cube.dev/
137-
[ref-jwt-auth0]: /security/jwt/auth0
138-
[ref-jwt-aws-cognito]: /security/jwt/aws-cognito
139-
140131
### <--{"id" : "Using JSON Web Key Sets (JWKS)"}--> Configuration
141132

142133
As mentioned previously, Cube supports verifying JWTs using industry-standard
@@ -273,4 +264,7 @@ module.exports = {
273264
[ref-config-check-auth]: /config#check-auth
274265
[ref-config-migrate-cubejs]:
275266
/configuration/overview#migration-from-express-to-docker-template
267+
[ref-recipe-auth0]: /recipes/authn-with-auth0
268+
[ref-recipe-cognito]: /recipes/authn-with-aws-cognito
276269
[ref-sec-ctx]: /security/context
270+
[link-slack]: https://slack.cube.dev/

docs/content/Caching/Getting-Started-Pre-Aggregations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Getting Started with Pre-Aggregations
2+
title: Getting started with pre-aggregations
33
permalink: /caching/pre-aggregations/getting-started
44
category: Caching
55
menuOrder: 2

docs/content/Caching/Lambda-Pre-Aggregations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Lambda Pre-Aggregations
2+
title: Lambda pre-aggregations
33
permalink: /caching/pre-aggregations/lambda-pre-aggregations
44
category: Caching
55
menuOrder: 4

docs/content/Caching/Running-in-Production.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Running in Production
2+
title: Running in production
33
permalink: /caching/running-in-production
44
category: Caching
5-
menuOrder: 4
5+
menuOrder: 5
66
---
77

88
Cube makes use of two different kinds of cache:

docs/content/Caching/Using-Pre-Aggregations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Using Pre-Aggregations
2+
title: Using pre-aggregations
33
permalink: /caching/using-pre-aggregations
44
category: Caching
55
menuOrder: 3
Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,24 @@
11
---
2-
title: Multiple Data Sources
2+
title: Multiple data sources
33
permalink: /config/multiple-data-sources
44
category: Configuration
55
subCategory: Advanced
66
menuOrder: 2
77
---
88

9-
Cube supports using multiple data sources, allowing the use of different
10-
databases for different cubes.
9+
Cube supports connecting to multiple data sources, so that different
10+
[cubes](/schema/reference/cube) reference data from different databases.
1111

12-
<InfoBox>
13-
14-
Cube expects that a `default` data source is **always** defined. Ensure that a
15-
`default` data source is defined using [`driverFactory`]
16-
[ref-conf-ref-driverfactory] in your `cube.js` file **or** that `CUBEJS_DB_*`
17-
variables exist as environment variables.
18-
19-
</InfoBox>
20-
21-
[ref-conf-ref-driverfactory]: /config#options-reference-driver-factory
22-
23-
## Schema
24-
25-
To configure multiple data sources, first explicitly declare a data source in
26-
some cubes by adding a `dataSource` property:
27-
28-
```javascript
29-
cube('Orders', {
30-
...,
12+
Usually, data sources are configured **statically** (see below). However, Cube
13+
can also lookup data sources **dynamically** which is useful in complex
14+
scenarios involving [multitenancy][ref-config-multitenancy].
3115

32-
dataSource: 'default',
33-
});
16+
## Environment variables
3417

35-
cube('OrdersFromOtherDataSource', {
36-
...,
37-
38-
dataSource: 'datasource1',
39-
});
40-
```
41-
42-
## Configuring data sources with environment variables
43-
44-
Next, Cube must be configured so that it knows which database to use for each
45-
data source; first declare the data sources using the `CUBEJS_DATASOURCES`
46-
environment variable, then use
47-
[decorated environment variables](#environment-variables-decorated-environment-variables)
48-
to configure each data source:
18+
Declare the list of data sources using the `CUBEJS_DATASOURCES` environment
19+
variable, then use
20+
[decorated environment variables](#decorated-environment-variables) to configure
21+
each data source:
4922

5023
```dotenv
5124
CUBEJS_DATASOURCES=default,datasource1
@@ -57,6 +30,15 @@ CUBEJS_DS_DATASOURCE1_DB_NAME=ecom
5730
CUBEJS_DS_DATASOURCE1_DB_HOST=remotehost
5831
```
5932

33+
<InfoBox>
34+
35+
Cube expects that the `default` data source is **always** defined. Ensure that
36+
`CUBEJS_DB_*` environment variables are set **or** that the `default` data
37+
source is defined using [`driverFactory`] [ref-config-ref-driverfactory] in your
38+
`cube.js` file.
39+
40+
</InfoBox>
41+
6042
### Decorated environment variables
6143

6244
Cube allows database-specific environment variables to be decorated with a data
@@ -74,16 +56,40 @@ CUBEJS_DS_DATASOURCE1_DB_TYPE=postgres
7456
```
7557

7658
For more information on environment variables that support decoration, check the
77-
[Environment Variables reference][ref-config-ref-env], or [a database-specific
78-
page if required][ref-config-db].
59+
[environment variables reference][ref-config-ref-env] or [database-specific
60+
pages][ref-config-db].
61+
62+
## Data model
7963

80-
## Dynamic data sources
64+
Use the [`dataSource`](/schema/reference/cube#parameters-data-source) property
65+
to set a data source for each cube:
8166

82-
For more complex scenarios involving multitenancy, Cube can also be configured
83-
to dynamically lookup data sources. For more information, see [the Multitenancy
84-
page][ref-config-multitenancy].
67+
```javascript
68+
cube('Orders', {
69+
...,
70+
71+
dataSource: 'default',
72+
});
73+
74+
cube('OrdersFromOtherDataSource', {
75+
...,
76+
77+
dataSource: 'datasource1',
78+
});
79+
```
8580

8681
[ref-config-ref-env]: /reference/environment-variables
82+
[ref-config-ref-driverfactory]: /config#options-reference-driver-factory
8783
[ref-config-db]: /config/databases
8884
[ref-config-multitenancy]:
8985
/config/multitenancy#multitenancy-multitenancy-vs-multiple-data-sources
86+
87+
## Cube Cloud
88+
89+
Follow these steps to connect to multiple data sources in Cube Cloud:
90+
91+
- Set up the `default` database connection when creating a new deployment.
92+
- Ensure you have the correct [multitenancy](/config/multitenancy) configuration
93+
in your `cube.js` file.
94+
- Configure the corresponding environment variables in&nbsp;<Btn>Settings →
95+
Environment variables</Btn>.

docs/content/Configuration/Advanced/Multitenancy.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Multitenancy
33
permalink: /config/multitenancy
44
category: Configuration
55
subCategory: Advanced
6-
menuOrder: 2
6+
menuOrder: 3
77
---
88

99
Cube supports multitenancy out of the box, both on database and data schema
@@ -40,10 +40,9 @@ instead of multitenancy. Multitenancy is designed for cases where you need to
4040
serve different datasets for multiple users, or tenants which aren't related to
4141
each other.
4242

43-
On the other hand, multitenancy can be used for scenarios where users
44-
need to access the same data but from different databases. The multitenancy and
45-
multiple data sources features aren't mutually exclusive and can be used
46-
together.
43+
On the other hand, multitenancy can be used for scenarios where users need to
44+
access the same data but from different databases. The multitenancy and multiple
45+
data sources features aren't mutually exclusive and can be used together.
4746

4847
<WarningBox>
4948

docs/content/Configuration/Connecting-to-Downstream-Tools.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Connecting to Visualization Tools
2+
title: Connecting to visualization tools
33
permalink: /config/downstream
44
category: Configuration
55
menuOrder: 3
@@ -10,8 +10,7 @@ Choose a tool to get started with below.
1010
<InfoBox>
1111
If you'd like to connect to a tool which is not yet supported or present on
1212
this page, please{' '}
13-
<a href="https://github.com/cube-js/cube/issues">file an issue</a> on
14-
GitHub.
13+
<a href="https://github.com/cube-js/cube/issues">file an issue</a> on GitHub.
1514
</InfoBox>
1615

1716
## BI & data exploration tools

0 commit comments

Comments
 (0)