Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/drivers-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ jobs:
use_tesseract_sql_planner: true
- database: databricks-jdbc
use_tesseract_sql_planner: true
- database: mysql
use_tesseract_sql_planner: true
fail-fast: false

steps:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.83](https://github.com/cube-js/cube/compare/v1.3.82...v1.3.83) (2025-10-24)

### Bug Fixes

- **client-react:** isLoading is set to false early ([#10075](https://github.com/cube-js/cube/issues/10075)) ([06afa28](https://github.com/cube-js/cube/commit/06afa28f8c1a06a4e05ba54d9931512749cc42b0))
- **tesseract:** Fix member name case conversion ([#10064](https://github.com/cube-js/cube/issues/10064)) ([6523074](https://github.com/cube-js/cube/commit/6523074f3e5d1c3537efb3fd1002eb5d79772d85))

### Features

- **api-gateway:** Introduce cache mode option for `/cubesql` API ([#9972](https://github.com/cube-js/cube/issues/9972)) ([7d4ecdc](https://github.com/cube-js/cube/commit/7d4ecdccdf75dbe8c764cf54ad48a25fa4de9443))
- **cubesql:** Push down `CAST(... AS DATE)` to CubeScan filters ([#10081](https://github.com/cube-js/cube/issues/10081)) ([61a94ef](https://github.com/cube-js/cube/commit/61a94ef9086d79bfcb5a370d2684f9b20b100022))
- **schema-compiler:** Support time series queries in MySQL dialect in Tesseract ([#10078](https://github.com/cube-js/cube/issues/10078)) ([765cd77](https://github.com/cube-js/cube/commit/765cd7787e2b62abebd1bbdd81bb85567cbff799))

## [1.3.82](https://github.com/cube-js/cube/compare/v1.3.81...v1.3.82) (2025-10-21)

### Bug Fixes
Expand Down
8 changes: 7 additions & 1 deletion DEPRECATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ features:
| Removed | [`initApp` hook](#initapp-hook) | v0.35.0 | v0.35.0 |
| Removed | [`/v1/run-scheduled-refresh` REST API endpoint](#v1run-scheduled-refresh-rest-api-endpoint) | v0.35.0 | v0.36.0 |
| Removed | [Node.js 18](#nodejs-18) | v0.36.0 | v1.3.0 |
| Deprecated | [`CUBEJS_SCHEDULED_REFRESH_CONCURRENCY`](#cubejs_scheduled_refresh_concurrency) | v1.2.7 | |
| Deprecated | [`CUBEJS_SCHEDULED_REFRESH_CONCURRENCY`](#cubejs_scheduled_refresh_concurrency) | v1.2.7 | |
| Deprecated | [Node.js 20](#nodejs-20) | v1.3.0 | |
| Deprecated | [`renewQuery` parameter of the `/v1/load` endpoint](#renewquery-parameter-of-the-v1load-endpoint) | v1.3.73 | |

### Node.js 8

Expand Down Expand Up @@ -412,3 +413,8 @@ This environment variable was renamed to [`CUBEJS_SCHEDULED_REFRESH_QUERIES_PER_

Node.js 20 is in maintenance mode from [November 22, 2024][link-nodejs-eol]. This means
no more new features, only security updates. Please upgrade to Node.js 22 or higher.

### `renewQuery` parameter of the `/v1/load` endpoint

This parameter is deprecated and will be removed in future releases. See [cache control](https://cube.dev/docs/product/apis-integrations/rest-api#cache-control)
options and use the new `cache` parameter of the `/v1/load` endpoint instead.
21 changes: 17 additions & 4 deletions docs/pages/product/apis-integrations/rest-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ accessible for everyone.
| API scope | REST API endpoints | Accessible by default? |
| --- | --- | --- |
| `meta` | [`/v1/meta`][ref-ref-meta] | ✅ Yes |
| `data` | [`/v1/load`][ref-ref-load] | ✅ Yes |
| `data` | [`/v1/load`][ref-ref-load], [`/v1/cubesql`][ref-ref-cubesql] | ✅ Yes |
| `graphql` | `/graphql` | ✅ Yes |
| `sql` | [`/v1/sql`][ref-ref-sql] | ✅ Yes |
| `jobs` | [`/v1/pre-aggregations/jobs`][ref-ref-paj] | ❌ No |
Expand Down Expand Up @@ -248,9 +248,20 @@ should be unique for each separate request. `spanId` should define user
interaction span such us `Continue wait` retry cycle and it's value shouldn't
change during one single interaction.

## Troubleshooting
## Cache control

### `Continue wait`
[`/v1/load`][ref-ref-load] and [`/v1/cubesql`][ref-ref-cubesql] endpoints of the REST API
allow to control the cache behavior. The following querying strategies with regards to
the cache are supported:

| Strategy | Description |
| --- | --- |
| `stale-if-slow` | If [refresh keys][ref-refresh-keys] are up-to-date, returns cached value. If expired, tries to return fresh value from the data source. If the data source query is slow (hits [`Continue wait`](#continue-wait)), returns stale value from cache. |
| `stale-while-revalidate`| If [refresh keys][ref-refresh-keys] are up-to-date, returns cached value. If expired, returns stale data from cache and updates cache in background. |
| `must-revalidate` | If [refresh keys][ref-refresh-keys] are up-to-date, returns cached value. If expired, always waits for fresh value from the data source, even if slow (hits one or more [`Continue wait`](#continue-wait) intervals). |
| `no-cache` | Skips [refresh key][ref-refresh-keys] checks. Always returns fresh data from the data source, regardless of cache or query performance. |

## `Continue wait`

If the request takes too long to be processed, the REST API responds with
`{ "error": "Continue wait" }` and the status code 200.
Expand Down Expand Up @@ -295,6 +306,7 @@ warehouse][ref-data-warehouses].
[ref-ref-load]: /product/apis-integrations/rest-api/reference#base_pathv1load
[ref-ref-meta]: /product/apis-integrations/rest-api/reference#base_pathv1meta
[ref-ref-sql]: /product/apis-integrations/rest-api/reference#base_pathv1sql
[ref-ref-cubesql]: /product/apis-integrations/rest-api/reference#base_pathv1cubesql
[ref-ref-paj]: /product/apis-integrations/rest-api/reference#base_pathv1pre-aggregationsjobs
[ref-security-context]: /product/auth/context
[ref-graphql-api]: /product/apis-integrations/graphql-api
Expand All @@ -313,4 +325,5 @@ warehouse][ref-data-warehouses].
[ref-traditional-databases]: /product/configuration/data-sources#transactional-databases
[ref-pre-aggregations]: /product/caching/using-pre-aggregations
[ref-javascript-sdk]: /product/apis-integrations/javascript-sdk
[ref-recipe-real-time-data-fetch]: /product/apis-integrations/recipes/real-time-data-fetch
[ref-recipe-real-time-data-fetch]: /product/apis-integrations/recipes/real-time-data-fetch
[ref-refresh-keys]: /product/data-modeling/reference/cube#refresh_key
11 changes: 0 additions & 11 deletions docs/pages/product/apis-integrations/rest-api/query-format.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ The default value is `false`.
- `timezone`: A [time zone][ref-time-zone] for your query. You can set the
desired time zone in the [TZ Database Name](https://en.wikipedia.org/wiki/Tz_database)
format, e.g., `America/Los_Angeles`.
- `renewQuery`: If `renewQuery` is set to `true`, Cube will renew all
[`refreshKey`][ref-schema-ref-preaggs-refreshkey] for queries and query
results in the foreground. However, if the
[`refreshKey`][ref-schema-ref-preaggs-refreshkey] (or
[`refreshKey.every`][ref-schema-ref-preaggs-refreshkey-every]) doesn't
indicate that there's a need for an update this setting has no effect. The
default value is `false`.
> **NOTE**: Cube provides only eventual consistency guarantee. Using a small
> [`refreshKey.every`][ref-schema-ref-preaggs-refreshkey-every] value together
> with `renewQuery` to achieve immediate consistency can lead to endless
> refresh loops and overall system instability.
- `ungrouped`: If set to `true`, Cube will run an [ungrouped
query][ref-ungrouped-query].
- `joinHints`: Query-time [join hints][ref-join-hints], provided as an array of
Expand Down
19 changes: 11 additions & 8 deletions docs/pages/product/apis-integrations/rest-api/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ By default, it's `/cubejs-api`.

Run the query to the REST API and get the results.

| Parameter | Description |
| ----------- | --------------------------------------------------------------------------------------------------------------------- |
| `query` | Either a single URL encoded Cube [Query](/product/apis-integrations/rest-api/query-format), or an array of queries |
| `queryType` | If multiple queries are passed in `query` for [data blending][ref-recipes-data-blending], this must be set to `multi` |
| Parameter | Description | Required |
| ----------- | --------------------------------------------------------------------------------------------------------------------- | --- |
| `query` | Either a single URL encoded Cube [Query](/product/apis-integrations/rest-api/query-format), or an array of queries | ✅ Yes |
| `queryType` | If multiple queries are passed in `query` for [data blending][ref-recipes-data-blending], this must be set to `multi` | ❌ No |
| `cache` | See [cache control][ref-cache-control]. `stale-if-slow` by default | ❌ No |

Response

Expand Down Expand Up @@ -319,9 +320,10 @@ This endpoint is part of the [SQL API][ref-sql-api].

</InfoBox>

| Parameter | Description |
| --- | --- |
| `query` | The SQL query to run. |
| Parameter | Description | Required |
| --- | --- | --- |
| `query` | The SQL query to run. | ✅ Yes |
| `cache` | See [cache control][ref-cache-control]. `stale-if-slow` by default | ❌ No |

Response: a stream of newline-delimited JSON objects. The first object contains
the `schema` property with column names and types. The following objects contain
Expand Down Expand Up @@ -639,4 +641,5 @@ Keep-Alive: timeout=5
[ref-query-wpd]: /product/apis-integrations/queries#query-with-pushdown
[ref-sql-api]: /product/apis-integrations/sql-api
[ref-orchestration-api]: /product/apis-integrations/orchestration-api
[ref-folders]: /product/data-modeling/reference/view#folders
[ref-folders]: /product/data-modeling/reference/view#folders
[ref-cache-control]: /product/apis-integrations/rest-api#cache-control
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.82",
"version": "1.3.83",
"npmClient": "yarn",
"command": {
"bootstrap": {
Expand Down
6 changes: 6 additions & 0 deletions packages/cubejs-api-gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.83](https://github.com/cube-js/cube/compare/v1.3.82...v1.3.83) (2025-10-24)

### Features

- **api-gateway:** Introduce cache mode option for `/cubesql` API ([#9972](https://github.com/cube-js/cube/issues/9972)) ([7d4ecdc](https://github.com/cube-js/cube/commit/7d4ecdccdf75dbe8c764cf54ad48a25fa4de9443))

## [1.3.82](https://github.com/cube-js/cube/compare/v1.3.81...v1.3.82) (2025-10-21)

**Note:** Version bump only for package @cubejs-backend/api-gateway
Expand Down
7 changes: 7 additions & 0 deletions packages/cubejs-api-gateway/openspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ components:
properties:
queryType:
type: "string"
cache:
type: "string"
enum:
- stale-if-slow
- stale-while-revalidate
- must-revalidate
- no-cache
query:
type: "object"
$ref: "#/components/schemas/V1LoadRequestQuery"
9 changes: 5 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": "1.3.82",
"version": "1.3.83",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
Expand All @@ -27,8 +27,9 @@
"dist/src/*"
],
"dependencies": {
"@cubejs-backend/native": "1.3.82",
"@cubejs-backend/shared": "1.3.82",
"@cubejs-backend/native": "1.3.83",
"@cubejs-backend/query-orchestrator": "1.3.83",
"@cubejs-backend/shared": "1.3.83",
"@ungap/structured-clone": "^0.3.4",
"assert-never": "^1.4.0",
"body-parser": "^1.19.0",
Expand All @@ -51,7 +52,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@cubejs-backend/linter": "1.3.82",
"@cubejs-backend/linter": "1.3.83",
"@types/express": "^4.17.21",
"@types/jest": "^29",
"@types/jsonwebtoken": "^9.0.2",
Expand Down
Loading
Loading