|
| 1 | +--- |
| 2 | +title: v0.32 |
| 3 | +permalink: /releases/v0-32 |
| 4 | +category: Release Notes |
| 5 | +releaseDate: 2023-03-02 |
| 6 | +releaseLink: https://github.com/cube-js/cube.js/releases/tag/v0.32.0 |
| 7 | +--- |
| 8 | + |
| 9 | +Hello Cube Community, we're really excited to announce Cube v0.32 🎉 |
| 10 | + |
| 11 | +This new release brings the GraphQL API into general availability, adds a number |
| 12 | +of quality-of-life improvements to Cube SQL and adds significant performance |
| 13 | +boosts to Cube Store. |
| 14 | + |
| 15 | +## Breaking Changes and Deprecations |
| 16 | + |
| 17 | +This release, we have **2** deprecations and **5** breaking changes: |
| 18 | + |
| 19 | +> Be sure to check the |
| 20 | +> [Deprecation document](https://github.com/cube-js/cube.js/blob/master/DEPRECATION.md) |
| 21 | +> for more details. |
| 22 | +
|
| 23 | +### <--{"id" : "Breaking Changes and Deprecations"}--> Breaking Changes |
| 24 | + |
| 25 | +- Support for Node.js v12 and v15 has been dropped due to [them reaching |
| 26 | + end-of-life][nodejs-eol]. We **strongly** recommend upgrading to Node.js v16. |
| 27 | + |
| 28 | +- Absolute imports for the following packages have been removed. We now provide |
| 29 | + a public API from the package directly: |
| 30 | + |
| 31 | + - `@cubejs-backend/query-orchestrator` |
| 32 | + - `@cubejs-backend/schema-compiler` |
| 33 | + - `@cubejs-backend/server-core` |
| 34 | + |
| 35 | +- Cube Store is now the default cache and queue engine, replacing Redis. We've |
| 36 | + talked previously about how [Cube Store will be replacing |
| 37 | + Redis][cube-blog-redis-deprecation], and this release makes it official 🎉 |
| 38 | + |
| 39 | +### <--{"id" : "Breaking Changes and Deprecations"}--> Deprecations |
| 40 | + |
| 41 | +- Support for Node.js v14 has been marked as deprecated due to [it reaching |
| 42 | + end-of-life][nodejs-eol] in April 2023. We **strongly** recommend upgrading to |
| 43 | + Node.js v16. |
| 44 | + |
| 45 | +- Using Cube with the Serverless Framework and the `@cubejs-backend/serverless` |
| 46 | + packages is now deprecated, we **strongly** recommend using [Docker-based |
| 47 | + deployments][cube-docs-deploy-docker] or [Cube Cloud][cube-docs-deploy-cloud] |
| 48 | + instead. |
| 49 | + |
| 50 | +[nodejs-eol]: https://github.com/nodejs/Release#end-of-life-releases |
| 51 | + |
| 52 | +## Pre-aggregations |
| 53 | + |
| 54 | +Following on from the [Lambda pre-aggregation][cube-docs-caching-lambda] support |
| 55 | +introduced in our [last release][cube-docs-0-31], Cube now supports multiple |
| 56 | +rollups from the same cube in a `rollupLambda` definition. |
| 57 | + |
| 58 | +## CLI |
| 59 | + |
| 60 | +The Cube CLI now lets you validate your models on your local machine - simply |
| 61 | +run `npx cubejs-cli validate` to check the models in your project for errors: |
| 62 | + |
| 63 | +```bash |
| 64 | +$ npx cubejs-cli validate |
| 65 | +❌ Cube Schema validation failed |
| 66 | + |
| 67 | +Cube Error --------------------------------------- |
| 68 | + |
| 69 | +Orders cube: "dimensions.id" does not match any of the allowed types |
| 70 | +Possible reasons (one of): |
| 71 | + * (dimensions.id.case) is required |
| 72 | + * (dimensions.id.latitude) is required |
| 73 | + * (dimensions.id.sql) is required |
| 74 | +LineItems cube: Cube Orders doesn't exist |
| 75 | +
|
| 76 | +Need some help? ------------------------------------- |
| 77 | +
|
| 78 | + Ask this question in Cube Slack: https://slack.cube.dev |
| 79 | + Post an issue: https://github.com/cube-js/cube.js/issues |
| 80 | +``` |
| 81 | +
|
| 82 | +## Drivers |
| 83 | +
|
| 84 | +We've enabled `readOnly: true` as the default for the |
| 85 | +[Clickhouse][cube-docs-conf-clickhouse], [MSSQL][cube-docs-conf-mssql] and |
| 86 | +[Oracle][cube-docs-conf-oracle] drivers which lets Cube build pre-aggregations |
| 87 | +without creating temporary tables in those databases. |
| 88 | + |
| 89 | +## GraphQL API |
| 90 | + |
| 91 | +We're extremely excited to announce general availability of the GraphQL API in |
| 92 | +Cube. With this, the GraphQL API now fully supports variables, a much-requested |
| 93 | +(and much-needed) improvement: |
| 94 | +
|
| 95 | +```javascript |
| 96 | +import { gql } from '@apollo/client'; |
| 97 | +
|
| 98 | +const getOrdersQuery = gql` |
| 99 | + query CubeQuery($orderBy: OrdersOrderByInput) { |
| 100 | + cube { |
| 101 | + orders(orderBy: $orderBy) { |
| 102 | + count |
| 103 | + status |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | +`; |
| 108 | +
|
| 109 | +const variables = { |
| 110 | + orderBy: { |
| 111 | + count: 'desc', |
| 112 | + }, |
| 113 | +}; |
| 114 | +
|
| 115 | +client |
| 116 | + .query({ |
| 117 | + query: getOrdersQuery, |
| 118 | + variables, |
| 119 | + }) |
| 120 | + .then((result) => console.log(result)); |
| 121 | +``` |
| 122 | +
|
| 123 | +## SQL API |
| 124 | +
|
| 125 | +Cube SQL continues to see quality-of-life improvements as well as enhanced |
| 126 | +support for even more SQL functions as selections and projections. Some examples |
| 127 | +of what we've improved this release include: |
| 128 | + |
| 129 | +- Support for `CASE` statements in Cube projections |
| 130 | +- Support for expressions like `NOT(LOWER() IN)` |
| 131 | +- Allow using `CAST` in `HAVING` clauses |
| 132 | +- Support for `LEFT` and `RIGHT` functions in projections |
| 133 | +- Support for `NULLIF` in projections |
| 134 | +- Allow using `TO_DATE()` in `DATE_DIFF()` expressions |
| 135 | +- Allow using `DATE_TRUNC()` in `WHERE` clauses |
| 136 | +
|
| 137 | +We hope that you find these helpful in your work with Cube SQL; please let us |
| 138 | +know if you have any feedback or suggestions by [opening |
| 139 | +issues][cube-gh-issue-new] on our GitHub repository. |
| 140 | +
|
| 141 | +## Community Contributions |
| 142 | +
|
| 143 | +A huge thank you to each and every person who took the time to help us improve |
| 144 | +Cube 😁 |
| 145 | +
|
| 146 | +- [@jay-choe](https://github.com/jay-choe) |
| 147 | +- [@so2liu](https://github.com/so2liu) |
| 148 | +- [@Barsoomx](https://github.com/Barsoomx) |
| 149 | +- [@MattFanto](https://github.com/MattFanto) |
| 150 | +- [@yuraborue](https://github.com/yuraborue) |
| 151 | +- [@tkislan](https://github.com/tkislan) |
| 152 | +- [@euljr](https://github.com/euljr) |
| 153 | +- [@philipprus](https://github.com/philipprus) |
| 154 | +- [@fbalicchia](https://github.com/fbalicchia) |
| 155 | +- [@alexanderlz](https://github.com/alexanderlz) |
| 156 | +- [@AlessandroLollo](https://github.com/AlessandroLollo) |
| 157 | +
|
| 158 | +Apologies to anyone who we forgot to mention; please get in touch and we'll make |
| 159 | +sure to add your name to the list 🙌 |
| 160 | +
|
| 161 | +[cube-blog-redis-deprecation]: |
| 162 | + https://cube.dev/blog/replacing-redis-with-cube-store |
| 163 | +[cube-docs-0-31]: https://cube.dev/docs/releases/v0-31 |
| 164 | +[cube-docs-caching-lambda]: /caching/pre-aggregations/lambda-pre-aggregations |
| 165 | +[cube-docs-conf-clickhouse]: /config/databases/clickhouse |
| 166 | +[cube-docs-conf-mssql]: /config/databases/mssql |
| 167 | +[cube-docs-conf-oracle]: /config/databases/oracle |
| 168 | +[cube-docs-deploy-cloud]: /deployment/platforms/cube-cloud |
| 169 | +[cube-docs-deploy-docker]: /deployment/platforms/docker |
| 170 | +[cube-gh-issue-new]: https://github.com/cube-js/cube.js/issues/new/choose |
0 commit comments