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
4 changes: 1 addition & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ client:react:

client:vue:
- changed-files:
- any-glob-to-any-file:
- packages/cubejs-client-vue/**/*
- packages/cubejs-client-vue3/**/*
- any-glob-to-any-file: packages/cubejs-client-vue3/**/*

client:ngx:
- changed-files:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/drivers-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ jobs:
(contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') ||
(!contains(env.CLOUD_DATABASES, matrix.database))
env:
DRIVERS_TESTS_CUBEJS_TRANSPILATION_WORKER_THREADS: true
DRIVERS_TESTS_CUBEJS_TRANSPILATION_NATIVE: false
DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner) || matrix.use_tesseract_sql_planner }}

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

## [1.5.10](https://github.com/cube-js/cube/compare/v1.5.9...v1.5.10) (2025-11-28)

### Bug Fixes

- **query-orchestrator:** Table used cache should not be used for unions ([#10192](https://github.com/cube-js/cube/issues/10192)) ([53d79bb](https://github.com/cube-js/cube/commit/53d79bbfd16aeefadb3bd8e0a73a5c0b5e920da4))

### Features

- **api-gateway:** Support query timezone in `/cubesql` API endpoint ([#10189](https://github.com/cube-js/cube/issues/10189)) ([499ddc6](https://github.com/cube-js/cube/commit/499ddc62fc1618b78f16a17943e1c72a670f6b48))

## [1.5.9](https://github.com/cube-js/cube/compare/v1.5.8...v1.5.9) (2025-11-26)

### Bug Fixes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `@cubejs-client/vue`
# `@cubejs-client/vue3`

`@cubejs-client/vue` provides Vue Components to easily integrate Cube within a
`@cubejs-client/vue3` provides Vue Components to easily integrate Cube within a
Vue.js app.

## QueryBuilder
Expand Down
6 changes: 2 additions & 4 deletions docs/pages/product/apis-integrations/javascript-sdk/vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ to abstract state management and API calls from your rendering code.

Here are the typical steps to query and visualize analytical data in Vue:

- **Import `@cubejs-client/core` and `@cubejs-client/vue` packages.** These
- **Import `@cubejs-client/core` and `@cubejs-client/vue3` packages.** These
packages provide all the necessary methods and convenient Vue tools.
- **Create an instance of Cube JavaScript Client.** The client is initialized
with Cube API URL. In development mode, the default URL is
Expand Down Expand Up @@ -101,10 +101,8 @@ npm install --save @cubejs-client/core @cubejs-client/vue3
yarn add @cubejs-client/core @cubejs-client/vue3
```

**Note.** If you're using Vue 2, please use `@cubejs-client/vue`.

Now you can build your application from scratch or connect to one of our
[supported data visualization tools](/product/configuration/visualization-tools).


[ref-compare-date-range]: /product/apis-integrations/queries#compare-date-range-query
[ref-compare-date-range]: /product/apis-integrations/queries#compare-date-range-query
7 changes: 5 additions & 2 deletions docs/pages/product/apis-integrations/rest-api/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ This endpoint is part of the [SQL API][ref-sql-api].

| Parameter | Description | Required |
| --- | --- | --- |
| `query` | The SQL query to run. | ✅ Yes |
| `query` | The SQL query to run | ✅ Yes |
| `timezone` | The [time zone][ref-time-zone] for this query in the [TZ Database Name][link-tzdb] format, e.g., `America/Los_Angeles` | ❌ No |
| `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
Expand Down Expand Up @@ -642,4 +643,6 @@ Keep-Alive: timeout=5
[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-cache-control]: /product/apis-integrations/rest-api#cache-control
[ref-cache-control]: /product/apis-integrations/rest-api#cache-control
[ref-time-zone]: /product/apis-integrations/queries#time-zone
[link-tzdb]: https://en.wikipedia.org/wiki/Tz_database
Original file line number Diff line number Diff line change
Expand Up @@ -1467,21 +1467,6 @@ learn more.
| --------------- | ---------------------- | --------------------- |
| A valid number | 86400 | 86400 |

## `CUBEJS_TRANSPILATION_WORKER_THREADS`

If `true`, optimizes data model compilation by running critical parts of the
code in worker threads.

| Possible Values | Default in Development | Default in Production |
| --------------- | ---------------------- | --------------------- |
| `true`, `false` | `true` | `true` |

<ReferenceBox>

See [this issue](https://github.com/cube-js/cube/issues/9285) for details.

</ReferenceBox>

## `CUBEJS_WEB_SOCKETS`

If `true`, then use WebSocket for data fetching.
Expand Down Expand Up @@ -1911,4 +1896,4 @@ The port for a Cube deployment to listen to API connections on.
[ref-mdx-api-locale]: /product/apis-integrations/mdx-api#measure-format
[ref-time-dimensions]: /product/data-modeling/reference/dimensions#time
[ref-time-zone]: /product/apis-integrations/queries#time-zone
[link-tzdb]: https://en.wikipedia.org/wiki/Tz_database
[link-tzdb]: https://en.wikipedia.org/wiki/Tz_database
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.9",
"version": "1.5.10",
"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.5.10](https://github.com/cube-js/cube/compare/v1.5.9...v1.5.10) (2025-11-28)

### Features

- **api-gateway:** Support query timezone in `/cubesql` API endpoint ([#10189](https://github.com/cube-js/cube/issues/10189)) ([499ddc6](https://github.com/cube-js/cube/commit/499ddc62fc1618b78f16a17943e1c72a670f6b48))

## [1.5.9](https://github.com/cube-js/cube/compare/v1.5.8...v1.5.9) (2025-11-26)

**Note:** Version bump only for package @cubejs-backend/api-gateway
Expand Down
2 changes: 2 additions & 0 deletions packages/cubejs-api-gateway/openspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ components:
type: "array"
items:
$ref: "#/components/schemas/V1LoadRequestJoinHint"
timezone:
type: "string"
V1LoadRequest:
type: "object"
properties:
Expand Down
10 changes: 5 additions & 5 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.5.9",
"version": "1.5.10",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
Expand All @@ -27,9 +27,9 @@
"dist/src/*"
],
"dependencies": {
"@cubejs-backend/native": "1.5.9",
"@cubejs-backend/query-orchestrator": "1.5.9",
"@cubejs-backend/shared": "1.5.9",
"@cubejs-backend/native": "1.5.10",
"@cubejs-backend/query-orchestrator": "1.5.10",
"@cubejs-backend/shared": "1.5.10",
"@ungap/structured-clone": "^0.3.4",
"assert-never": "^1.4.0",
"body-parser": "^1.19.0",
Expand All @@ -52,7 +52,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@cubejs-backend/linter": "1.5.9",
"@cubejs-backend/linter": "1.5.10",
"@types/express": "^4.17.21",
"@types/jest": "^29",
"@types/jsonwebtoken": "^9.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cubejs-api-gateway/src/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class ApiGateway {
try {
await this.assertApiScope('data', req.context?.securityContext);

await this.sqlServer.execSql(req.body.query, res, req.context?.securityContext, req.body.cache);
await this.sqlServer.execSql(req.body.query, res, req.context?.securityContext, req.body.cache, req.body.timezone);
} catch (e: any) {
this.handleError({
e,
Expand Down
4 changes: 2 additions & 2 deletions packages/cubejs-api-gateway/src/sql-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export class SQLServer {
throw new Error('Native api gateway is not enabled');
}

public async execSql(sqlQuery: string, stream: any, securityContext?: any, cacheMode?: CacheMode) {
await execSql(this.sqlInterfaceInstance!, sqlQuery, stream, securityContext, cacheMode);
public async execSql(sqlQuery: string, stream: any, securityContext?: any, cacheMode?: CacheMode, timezone?: string) {
await execSql(this.sqlInterfaceInstance!, sqlQuery, stream, securityContext, cacheMode, timezone);
}

public async sql4sql(sqlQuery: string, disablePostProcessing: boolean, securityContext?: unknown): Promise<Sql4SqlResponse> {
Expand Down
78 changes: 78 additions & 0 deletions packages/cubejs-api-gateway/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1150,4 +1150,82 @@ describe('API Gateway', () => {
expect(dataSourceStorage.$testOrchestratorConnectionsDone).toEqual(false);
});
});

describe('/v1/cubesql', () => {
test('simple query works', async () => {
const { app, apiGateway } = await createApiGateway();

// Mock the sqlServer.execSql method
const execSqlMock = jest.fn(async (query, stream, securityContext, cacheMode, timezone) => {
// Simulate writing schema and data to the stream
stream.write(`${JSON.stringify({
schema: [{ name: 'id', column_type: 'Int' }]
})}\n`);
stream.write(`${JSON.stringify({
data: [[1], [2], [3]]
})}\n`);
stream.end();
});

apiGateway.getSQLServer().execSql = execSqlMock;

await request(app)
.post('/cubejs-api/v1/cubesql')
.set('Content-type', 'application/json')
.set('Authorization', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M')
.send({
query: 'SELECT id FROM test LIMIT 3'
})
.responseType('text')
.expect(200);

// Verify the mock was called with correct parameters
expect(execSqlMock).toHaveBeenCalledWith(
'SELECT id FROM test LIMIT 3',
expect.anything(),
{},
undefined,
undefined
);
});

test('timezone can be passed', async () => {
const { app, apiGateway } = await createApiGateway();

// Mock the sqlServer.execSql method
const execSqlMock = jest.fn(async (query, stream, securityContext, cacheMode, timezone) => {
// Simulate writing schema and data to the stream
stream.write(`${JSON.stringify({
schema: [{ name: 'created_at', column_type: 'Timestamp' }]
})}\n`);
stream.write(`${JSON.stringify({
data: [['2025-12-22T16:00:00.000'], ['2025-12-24T16:00:00.000']]
})}\n`);
stream.end();
});

apiGateway.getSQLServer().execSql = execSqlMock;

await request(app)
.post('/cubejs-api/v1/cubesql')
.set('Content-type', 'application/json')
.set('Authorization', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M')
.send({
query: 'SELECT created_at FROM orders WHERE created_at > \'2025-12-22 13:00:00\'::timestamptz',
cache: 'stale-while-revalidate',
timezone: 'America/Los_Angeles'
})
.responseType('text')
.expect(200);

// Verify the mock was called with correct parameters including timezone
expect(execSqlMock).toHaveBeenCalledWith(
'SELECT created_at FROM orders WHERE created_at > \'2025-12-22 13:00:00\'::timestamptz',
expect.anything(),
{},
'stale-while-revalidate',
'America/Los_Angeles'
);
});
});
});
4 changes: 4 additions & 0 deletions packages/cubejs-athena-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.5.10](https://github.com/cube-js/cube/compare/v1.5.9...v1.5.10) (2025-11-28)

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

## [1.5.9](https://github.com/cube-js/cube/compare/v1.5.8...v1.5.9) (2025-11-26)

**Note:** Version bump only for package @cubejs-backend/athena-driver
Expand Down
10 changes: 5 additions & 5 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": "1.5.9",
"version": "1.5.10",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
Expand Down Expand Up @@ -30,13 +30,13 @@
"dependencies": {
"@aws-sdk/client-athena": "^3.22.0",
"@aws-sdk/credential-providers": "^3.22.0",
"@cubejs-backend/base-driver": "1.5.9",
"@cubejs-backend/shared": "1.5.9",
"@cubejs-backend/base-driver": "1.5.10",
"@cubejs-backend/shared": "1.5.10",
"sqlstring": "^2.3.1"
},
"devDependencies": {
"@cubejs-backend/linter": "1.5.9",
"@cubejs-backend/testing-shared": "1.5.9",
"@cubejs-backend/linter": "1.5.10",
"@cubejs-backend/testing-shared": "1.5.10",
"@types/ramda": "^0.27.40",
"typescript": "~5.2.2"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/cubejs-backend-cloud/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.5.10](https://github.com/cube-js/cube/compare/v1.5.9...v1.5.10) (2025-11-28)

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

## [1.5.9](https://github.com/cube-js/cube/compare/v1.5.8...v1.5.9) (2025-11-26)

**Note:** Version bump only for package @cubejs-backend/cloud
Expand Down
6 changes: 3 additions & 3 deletions packages/cubejs-backend-cloud/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cubejs-backend/cloud",
"version": "1.5.9",
"version": "1.5.10",
"description": "Cube Cloud package",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand All @@ -25,15 +25,15 @@
"devDependencies": {
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@cubejs-backend/linter": "1.5.9",
"@cubejs-backend/linter": "1.5.10",
"@types/fs-extra": "^9.0.8",
"@types/jest": "^29",
"jest": "^29",
"typescript": "~5.2.2"
},
"dependencies": {
"@cubejs-backend/dotenv": "^9.0.2",
"@cubejs-backend/shared": "1.5.9",
"@cubejs-backend/shared": "1.5.10",
"chokidar": "^3.5.1",
"env-var": "^6.3.0",
"form-data": "^4.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/cubejs-backend-maven/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.5.10](https://github.com/cube-js/cube/compare/v1.5.9...v1.5.10) (2025-11-28)

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

## [1.5.9](https://github.com/cube-js/cube/compare/v1.5.8...v1.5.9) (2025-11-26)

**Note:** Version bump only for package @cubejs-backend/maven
Expand Down
6 changes: 3 additions & 3 deletions packages/cubejs-backend-maven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@cubejs-backend/maven",
"description": "Cube.js Maven Wrapper for java dependencies downloading",
"author": "Cube Dev, Inc.",
"version": "1.5.9",
"version": "1.5.10",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -31,12 +31,12 @@
"dist/src/*"
],
"dependencies": {
"@cubejs-backend/shared": "1.5.9",
"@cubejs-backend/shared": "1.5.10",
"source-map-support": "^0.5.19",
"xmlbuilder2": "^2.4.0"
},
"devDependencies": {
"@cubejs-backend/linter": "1.5.9",
"@cubejs-backend/linter": "1.5.10",
"@types/jest": "^29",
"@types/node": "^20",
"jest": "^29",
Expand Down
Loading
Loading