Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into new-chart-prototyping
Browse files Browse the repository at this point in the history
  • Loading branch information
tenphi committed Sep 12, 2024
2 parents 9549e76 + db2256d commit 3ca55d2
Show file tree
Hide file tree
Showing 137 changed files with 2,188 additions and 515 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.35.80](https://github.com/cube-js/cube/compare/v0.35.79...v0.35.80) (2024-09-09)


### Bug Fixes

* **schema-compiler:** propagate FILTER_PARAMS from view to inner cube's SELECT ([#8466](https://github.com/cube-js/cube/issues/8466)) ([c0466fd](https://github.com/cube-js/cube/commit/c0466fde9b7a3834159d7ec592362edcab6d9795))


### Features

* **cubesql:** Fill pg_description table with cube and members descriptions ([#8618](https://github.com/cube-js/cube/issues/8618)) ([2288c18](https://github.com/cube-js/cube/commit/2288c18bf30d1f3a3299b235fe9b4405d2cb7463))
* **cubesql:** Support join with type coercion ([#8608](https://github.com/cube-js/cube/issues/8608)) ([46b3a36](https://github.com/cube-js/cube/commit/46b3a36936f0f00805144714f0dd87a3c50a5e0a))





## [0.35.79](https://github.com/cube-js/cube/compare/v0.35.78...v0.35.79) (2024-09-04)


Expand Down
12 changes: 11 additions & 1 deletion DEPRECATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ features:
| Deprecated | [Node.js 16](#nodejs-16) | v0.35.0 | |
| Removed | [MySQL-based SQL API](#mysql-based-sql-api) | v0.35.0 | v0.35.0 |
| Removed | [`initApp` hook](#initapp-hook) | v0.35.0 | v0.35.0 |
| Deprecated | [`/v1/run-scheduled-refresh` REST API endpoint](#v1run-scheduled-refresh-rest-api-endpoint) | v0.35.0 | |

### Node.js 8

Expand Down Expand Up @@ -392,4 +393,13 @@ Early prototype of the MySQL-based SQL API is removed in favor of the Postgres-c
**Removed in release: v0.35.0**
The `initApp` hook is removed as it's not relevant anymore for Docker-based architecture.
The `initApp` hook is removed as it's not relevant anymore for Docker-based architecture.
### `/v1/run-scheduled-refresh` REST API endpoint
**Deprecated in release: v0.35.0**
The `/v1/run-scheduled-refresh` REST API endpoint is deprecated as it's not
relevant anymore for Docker-based architecture. Use the [Orchestration
API](https://cube.dev/docs/product/apis-integrations/orchestration-api) and
`/v1/pre-aggregations/jobs` endpoint instead.
3 changes: 2 additions & 1 deletion docs/pages/guides/dbt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ cubes:
- name: "{{ column.name }}"
sql: "{{ column.sql }}"
type: "{{ column.type }}"
description: "{{ column.description }}"
meta:
source: dbt
{% endfor %}
Expand Down Expand Up @@ -361,4 +362,4 @@ of the REST API.
[link-dbt-docs-columns]: https://docs.getdbt.com/reference/resource-properties/columns
[link-dbt-materializations]: https://docs.getdbt.com/docs/build/materializations
[link-smart-open]: https://pypi.org/project/smart-open/
[link-boto3]: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-examples.html
[link-boto3]: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-examples.html
65 changes: 64 additions & 1 deletion docs/pages/product/apis-integrations/mdx-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,72 @@ views:
- city
```
### Dimension keys
You can define a member that will be used as a key for a dimension in the cube's model file.
```yaml
cubes:
- name: users
sql_table: USERS
public: false

dimensions:
- name: id
sql: "{CUBE}.ID"
type: number
primary_key: true

- name: first_name
sql: FIRST_NAME
type: string
meta:
key_member: users_id
```
### Dimension labels
You can define a member that will be used as a label for a dimension in the cube's model file.
```yaml
cubes:
- name: users
sql_table: USERS
public: false

dimensions:
- name: id
sql: "{CUBE}.ID"
type: number
meta:
label_member: users_first_name
```
### Custom properties
You can define custom properties for dimensions in the cube's model file.
```yaml
cubes:
- name: users
sql_table: USERS
public: false

dimensions:
- name: id
sql: "{CUBE}.ID"
type: number
meta:
properties:
- name: "Property A"
column: users_first_name
- name: "Property B"
value: users_city
```
### Measure groups
MDX API supports organizing measures into groups (folders). You can define measure groups in the view's schema file.
MDX API supports organizing measures into groups (folders). You can define measure groups in the view's model file.
```yaml
views:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,20 @@ which is located in a parent directory.
├── README.md
├── cube.js
├── package.json
└── model
├── utils.js
└── sales
└── model/
├── shared_utils/
│ └── utils.js
└── sales/
└── orders.js
```

```javascript
// in model/sales/orders.js
import { capitalize } from "./schema_utils";
import { capitalize } from "./shared_utils/utils";
```

```javascript
// in model/utils.js
// in model/shared_utils/utils.js
export const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
```

Expand All @@ -124,4 +125,4 @@ export const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export
[mdn-js-es6-import]:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
[ref-schema-string-time-dims]: /guides/recipes/data-modeling/string-time-dimensions
[ref-schema-string-time-dims]: /guides/recipes/data-modeling/string-time-dimensions
10 changes: 7 additions & 3 deletions docs/pages/product/workspace/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
An environment provides access to your data model. Cube Cloud provides the following environments:
- production (default)
- staging - providing access to the data model on a specific branch.
Each branch in the repository corresponds to a separate staging environment.
Each branch in the repository corresponds to a separate staging environment.
Changes must be committed to a branch to be viewable in this environment.
- development - providing access to the data model that you are currently working on.
The development environment is automatically created when you enter [development mode][ref-dev-mode].
It tracks the branch you're on and is updated automatically when you make changes to the data model.
One development environment is allocated per user.
It tracks the branch you're currently on and is updated automatically when you save changes to the data model.
You cannot query the development enviornment unless your user is in dev mode on the branch you are trying to access.

Each environment provides its own set of API and SQL API endpoints.
You can access them on the [Data Model][ref-data-model]'s Overview page and <Btn>BI Integrations</Btn> SQL API Connection tab.
You can reference them on the [Data Model][ref-data-model]'s Overview page and <Btn>BI Integrations</Btn> SQL API Connection tab.
To query a development environment's API endpoints, your user must be in dev mode and on the branch that has the saved changes.

<Screenshot
src="https://ucarecdn.com/e1cddf72-3044-4d72-a0b9-023bf3285786/"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.35.79",
"version": "0.35.80",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
Expand Down
8 changes: 8 additions & 0 deletions packages/cubejs-api-gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.35.80](https://github.com/cube-js/cube/compare/v0.35.79...v0.35.80) (2024-09-09)

**Note:** Version bump only for package @cubejs-backend/api-gateway





## [0.35.79](https://github.com/cube-js/cube/compare/v0.35.78...v0.35.79) (2024-09-04)


Expand Down
8 changes: 4 additions & 4 deletions packages/cubejs-api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@cubejs-backend/api-gateway",
"description": "Cube.js API Gateway",
"author": "Cube Dev, Inc.",
"version": "0.35.79",
"version": "0.35.80",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
Expand All @@ -27,7 +27,7 @@
"dist/src/*"
],
"dependencies": {
"@cubejs-backend/native": "^0.35.79",
"@cubejs-backend/native": "^0.35.80",
"@cubejs-backend/shared": "^0.35.67",
"@ungap/structured-clone": "^0.3.4",
"body-parser": "^1.19.0",
Expand All @@ -39,7 +39,7 @@
"http-proxy-middleware": "^3.0.0",
"inflection": "^1.12.0",
"joi": "^17.8.3",
"jsonwebtoken": "^8.3.0",
"jsonwebtoken": "^9.0.2",
"jwk-to-pem": "^2.0.4",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
Expand All @@ -52,7 +52,7 @@
"@cubejs-backend/linter": "^0.35.0",
"@types/express": "^4.17.9",
"@types/jest": "^27",
"@types/jsonwebtoken": "^8.5.0",
"@types/jsonwebtoken": "^9.0.2",
"@types/jwk-to-pem": "^2.0.0",
"@types/mysql": "^2.15.19",
"@types/node-fetch": "^2.5.8",
Expand Down
4 changes: 4 additions & 0 deletions packages/cubejs-api-gateway/src/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1552,9 +1552,13 @@ class ApiGateway {
if (normalizedQuery.total) {
const normalizedTotal = structuredClone(normalizedQuery);
normalizedTotal.totalQuery = true;

delete normalizedTotal.order;

normalizedTotal.limit = null;
normalizedTotal.rowLimit = null;
normalizedTotal.offset = null;

const [totalQuery] = await this.getSqlQueriesInternal(
context,
[normalizedTotal],
Expand Down
8 changes: 8 additions & 0 deletions packages/cubejs-athena-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.35.80](https://github.com/cube-js/cube/compare/v0.35.79...v0.35.80) (2024-09-09)

**Note:** Version bump only for package @cubejs-backend/athena-driver





## [0.35.79](https://github.com/cube-js/cube/compare/v0.35.78...v0.35.79) (2024-09-04)

**Note:** Version bump only for package @cubejs-backend/athena-driver
Expand Down
4 changes: 2 additions & 2 deletions packages/cubejs-athena-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@cubejs-backend/athena-driver",
"description": "Cube.js Athena database driver",
"author": "Cube Dev, Inc.",
"version": "0.35.79",
"version": "0.35.80",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"devDependencies": {
"@cubejs-backend/linter": "^0.35.0",
"@cubejs-backend/testing-shared": "^0.35.79",
"@cubejs-backend/testing-shared": "^0.35.80",
"@types/ramda": "^0.27.40",
"typescript": "~5.2.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cubejs-backend-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"chokidar": "^3.5.1",
"env-var": "^6.3.0",
"fs-extra": "^9.1.0",
"jsonwebtoken": "^8.5.1",
"jsonwebtoken": "^9.0.2",
"request": "^2.88.2",
"request-promise": "^4.2.5"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/cubejs-backend-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.35.80](https://github.com/cube-js/cube/compare/v0.35.79...v0.35.80) (2024-09-09)


### Features

* **cubesql:** Support join with type coercion ([#8608](https://github.com/cube-js/cube/issues/8608)) ([46b3a36](https://github.com/cube-js/cube/commit/46b3a36936f0f00805144714f0dd87a3c50a5e0a))





## [0.35.79](https://github.com/cube-js/cube/compare/v0.35.78...v0.35.79) (2024-09-04)


Expand Down
13 changes: 6 additions & 7 deletions packages/cubejs-backend-native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ca55d2

Please sign in to comment.