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
31 changes: 20 additions & 11 deletions DEPRECATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ features:
should not rely on this feature.

| Status | Feature | Deprecated | Remove |
|------------|-----------------------------------------------------------------------------------------------------------------------------------|------------|-----------|
| ---------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------- |
| Removed | [Node.js 8](#nodejs-8) | v0.22.4 | v0.26.0 |
| Deprecated | [`hearBeatInterval`](#hearbeatinterval) | v0.23.8 | June 2021 |
| Removed | [`CUBEJS_ENABLE_TLS`](#cubejs_enable_tls) | v0.23.11 | v0.26.0 |
Expand All @@ -55,6 +55,7 @@ features:
| Deprecated | [`dbType`](#dbtype) | v0.30.30 | |
| Deprecated | [Serverless Deployments](#serverless-deployments) | v0.31.64 | |
| Deprecated | [Node.js 14](#nodejs-14) | v0.32.0 | |
| Deprecated | [`running_total` measure type](#running_total-measure-type) | v0.33.39 | |

### Node.js 8

Expand Down Expand Up @@ -110,13 +111,13 @@ now provide a public API from the package directly.
Deprecated:

```javascript
const BaseDriver = require('@cubejs-backend/query-orchestrator/driver/BaseDriver');
const BaseDriver = require("@cubejs-backend/query-orchestrator/driver/BaseDriver");
```

You should use:

```javascript
const { BaseDriver } = require('@cubejs-backend/query-orchestrator');
const { BaseDriver } = require("@cubejs-backend/query-orchestrator");
```

### `contextToDataSourceId`
Expand All @@ -143,13 +144,13 @@ now provide a public API from the package directly.
Deprecated:

```javascript
const CubejsServerCore = require('@cubejs-backend/server-core');
const CubejsServerCore = require("@cubejs-backend/server-core");
```

You should use:

```javascript
const { CubejsServerCore } = require('@cubejs-backend/server-core');
const { CubejsServerCore } = require("@cubejs-backend/server-core");
```

### Absolute import for `@cubejs-backend/schema-compiler`
Expand All @@ -162,13 +163,13 @@ now provide a public API from the package directly.
Deprecated:

```javascript
const BaseQuery = require('@cubejs-backend/schema-compiler/adapter/BaseQuery');
const BaseQuery = require("@cubejs-backend/schema-compiler/adapter/BaseQuery");
```

You should use:

```javascript
const { BaseQuery } = require('@cubejs-backend/schema-compiler');
const { BaseQuery } = require("@cubejs-backend/schema-compiler");
```

### `checkAuthMiddleware`
Expand Down Expand Up @@ -206,7 +207,7 @@ Deprecated:

```js
cube(`visitors`, {
sql: `select * from visitors WHERE ${USER_CONTEXT.source.filter('source')}`,
sql: `select * from visitors WHERE ${USER_CONTEXT.source.filter("source")}`,
});
```

Expand All @@ -215,7 +216,7 @@ You should use:
```js
cube(`visitors`, {
sql: `select * from visitors WHERE ${SECURITY_CONTEXT.source.filter(
'source'
"source"
)}`,
});
```
Expand Down Expand Up @@ -347,7 +348,15 @@ instead.

**Deprecated in Release: v0.32.0**

Node.js 14 reached [End of Life on April 30, 2023][link-nodejs-eol]. This means no
more updates. Please upgrade to Node.js 16 or higher.
Node.js 14 reached [End of Life on April 30, 2023][link-nodejs-eol]. This means
no more updates. Please upgrade to Node.js 16 or higher.

[link-nodejs-eol]: https://github.com/nodejs/Release#end-of-life-releases

### `running_total` measure type

**Deprecated in Release: v0.33.39**

The `running_total` measure type is now deprecated, and we recommend using
[`rolling_window`](https://cube.dev/docs/product/data-modeling/reference/measures#rolling_window)
to calculate running totals instead.
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ formats.
cube(`orders`, {
// ...

measures: {
dimensions: {
total: {
sql: `amount`,
type: `running_total`,
type: `number`,
format: `currency`,
},
},
Expand All @@ -209,10 +209,10 @@ cubes:
- name: orders
# ...

measures:
dimensions:
- name: total
sql: amount
type: running_total
type: number
format: currency
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ cube(`orders`, {
measures: {
total: {
sql: `amount`,
type: `running_total`,
type: `sum`,
format: `currency`,
},
},
Expand All @@ -201,7 +201,7 @@ cubes:
measures:
- name: total
sql: amount
type: running_total
type: sum
format: currency
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,39 +472,6 @@ cubes:

</CodeTabs>

### running_total

Type of measure `running_total` is calculated as summation of values defined in
`sql`. Use it to calculate cumulative measures.

<CodeTabs>

```javascript
cube(`orders`, {
// ...

measures: {
total_subscriptions: {
sql: `subscription_amount`,
type: `running_total`,
},
},
});
```

```yaml
cubes:
- name: orders
# ...

measures:
- name: total_subscriptions
sql: subscription_amount
type: running_total
```

</CodeTabs>

## Measure Formats

When creating a **measure** you can explicitly define the format you’d like to
Expand Down Expand Up @@ -557,7 +524,7 @@ cube(`orders`, {
measures: {
total_amount: {
sql: `amount`,
type: `running_total`,
type: `sum`,
format: `currency`,
},
},
Expand All @@ -572,7 +539,7 @@ cubes:
measures:
- name: total_amount
sql: amount
type: running_total
type: sum
format: currency
```

Expand Down