
+
Exploring the demo deployment is a great way to understand how Cube works.
Use the [data model editor][ref-data-model] to review the data model and
@@ -59,7 +62,7 @@ make sure to run a few queries in [Playground][ref-playground].
## Deployment overview
The
Overview page of each deployment provides a high-level
-summary if its components and state:
+summary of its components and state:
* API endpoints with URLs and connection instructions.
* Allocated resources in line with the [deployment type][ref-deployment-types].
* Activity log of the most recent events.
diff --git a/docs/pages/product/deployment/cloud/pricing.mdx b/docs/pages/product/deployment/cloud/pricing.mdx
index 9a1a373367..20de77c7dd 100644
--- a/docs/pages/product/deployment/cloud/pricing.mdx
+++ b/docs/pages/product/deployment/cloud/pricing.mdx
@@ -101,19 +101,34 @@ terms][ref-enterprise-premier-tier-support], and [limits][ref-cloud-limits].
## Resources
-The following resource types incur CCU consumption (measured in 5-minute intervals):
-
-| Resource type | CCUs per hour |
-| ------------------------- | :--------------------------------------------------: |
-| [Production Cluster][ref-production-cluster] | Depends on a [chosen tier](#deployment-tiers) |
-| [Development Instance][ref-development-instance] | Depends on a [chosen tier](#deployment-tiers) |
-| Cube API Instance | Depends on a [chosen tier](#deployment-tiers) |
-| Cube Store Worker | Depends on a [chosen tier](#cube-store-worker-tiers) |
-| [Semantic Catalog][ref-semantic-catalog] | Depends on a [chosen tier](#semantic-catalog-tiers) |
-| [Dedicated infrastructure][ref-dedicated-infra] | 3 |
-| [Query History][ref-query-history] | Depends on a [chosen tier](#query-history-tiers) |
-| [Monitoring Integrations][ref-monitoring-integrations] | Depends on a [chosen tier](#monitoring-integrations-tiers) |
-| [Audit Log][ref-audit-log] | Depends on a [chosen tier](#audit-log-tiers) |
+The following resource types incur CCU consumption and apply to _individual resources_
+of deployments within a Cube Cloud account. The consumption is measured in 5-minute intervals.
+
+| Resource type | CCUs per hour | Notes |
+| --- | :---: | --- |
+| [Production Cluster][ref-production-cluster] |
4..8 | Depends on a [chosen tier](#deployment-tiers) |
+| [Development Instance][ref-development-instance] |
1..2 | Depends on a [chosen tier](#deployment-tiers) |
+| Cube API Instance |
1..2 | Depends on a [chosen tier](#deployment-tiers) |
+| Cube Store Worker |
1..2 | Depends on a [chosen tier](#cube-store-worker-tiers) |
+| [Semantic Catalog][ref-semantic-catalog] |
2..4 | Depends on a [chosen tier](#semantic-catalog-tiers) |
+| [Query History][ref-query-history] |
0..20 | Depends on a [chosen tier](#query-history-tiers) |
+| [Monitoring Integrations][ref-monitoring-integrations] |
1..4 | Depends on a [chosen tier](#monitoring-integrations-tiers) |
+
+The following resource types incur CCU consumption and apply to _individual requests_
+to deployments within a Cube Cloud account:
+
+| Resource type | CCUs per request | Notes |
+| --- | :---: | --- |
+| [AI API][ref-ai-api] |
0..1 | Depends on [configuration](#ai-requests-consumption) |
+| [AI Assistant][ref-ai-assistant] |
0..1 | Depends on [configuration](#ai-requests-consumption) |
+
+The following resource types incur CCU consumption and apply to the _whole Cube Cloud
+account_:
+
+| Resource type | CCUs per hour | Notes |
+| --- | :---: | --- |
+| [Dedicated infrastructure][ref-dedicated-infra] | 3 | — |
+| [Audit Log][ref-audit-log] |
4..6 | Depends on the [chosen tier](#audit-log-tiers) |
### Deployment tiers
@@ -124,7 +139,7 @@ requests through [APIs & integrations][ref-apis] under the following tiers:
| Tier |
CCUs per hour |
CPU and memory | Dependent features |
| ---- | :--- | --- | --- |
| S |
4 — _for Production Cluster_1 — _for Development Instance_1 — _for Cube API Instance_ | 100% | — |
-| M |
8 — _for Production Cluster_2 — _for Development Instance_2 — _for Cube API Instance_ | 200% |
[MDX API][ref-mdx-api] |
+| M |
8 — _for Production Cluster_2 — _for Development Instance_2 — _for Cube API Instance_ | 200% | [DAX API][ref-dax-api], [MDX API][ref-mdx-api] |
You can upgrade to a chosen tier in the
Settings of your deployment.
@@ -185,6 +200,16 @@ You can upgrade to a chosen tier in the
You can [upgrade][ref-monitoring-integrations-config] to a chosen tier in the
Settings of your deployment.
+### AI requests consumption
+
+[AI API][ref-ai-api] and [AI Assistant][ref-ai-assistant] consume CCUs per request apart from
+[Enterprise and above][cube-pricing] product tiers where customers can provide their own suitable
+LLM if wanted and then will be exempt from this charge:
+
+|
CCUs per request |
+| :------------------------: |
+| 1 |
+
### Audit Log tiers
[Audit Log][ref-audit-log] collects, stores, and displays security-related events
@@ -336,7 +361,10 @@ product tier level. Payments are non-refundable.
[ref-development-instance]: /product/deployment/cloud/deployment-types#development-instance
[ref-apis]: /product/apis-integrations
[ref-mdx-api]: /product/apis-integrations/mdx-api
+[ref-dax-api]: /product/apis-integrations/dax-api
[ref-cube-store-architecture]: /product/caching/running-in-production#architecture
[ref-data-at-rest-encryption]: /product/caching/running-in-production#data-at-rest-encryption
[ref-customer-managed-keys]: /product/workspace/encryption-keys
-[ref-semantic-catalog]: /product/workspace/semantic-catalog
\ No newline at end of file
+[ref-semantic-catalog]: /product/workspace/semantic-catalog
+[ref-ai-api]: /product/apis-integrations/ai-api
+[ref-ai-assistant]: /product/workspace/ai-assistant
\ No newline at end of file
diff --git a/docs/pages/product/deployment/cloud/providers/azure.mdx b/docs/pages/product/deployment/cloud/providers/azure.mdx
index eb31313feb..088861e381 100644
--- a/docs/pages/product/deployment/cloud/providers/azure.mdx
+++ b/docs/pages/product/deployment/cloud/providers/azure.mdx
@@ -23,7 +23,9 @@ Cube Cloud integrates with the following [data sources](/product/configuration/d
Cube Cloud integrates with the following [data visualization tools](/product/configuration/visualization-tools):
-- [Microsoft Power BI](https://www.microsoft.com/en-us/power-platform/products/power-bi/) via [Semantic Layer Sync](/product/apis-integrations/semantic-layer-sync)
+- [Microsoft Power BI][ref-powerbi] via the [DAX API][ref-dax-api]
+- [Microsoft Excel][ref-excel] via the [MDX API][ref-mdx-api] and
+[Cube Cloud for Excel][ref-cube-cloud-for-excel]
## Storage
@@ -47,4 +49,11 @@ Cube Cloud integrates with the following [data visualization tools](/product/con
## Networking
-[Azure Virtual Network](https://azure.microsoft.com/en-us/products/virtual-network) can be used for [secure networking](/product/deployment/cloud/vpc/azure).
\ No newline at end of file
+[Azure Virtual Network](https://azure.microsoft.com/en-us/products/virtual-network) can be used for [secure networking](/product/deployment/cloud/vpc/azure).
+
+
+[ref-powerbi]: /product/configuration/visualization-tools/powerbi
+[ref-dax-api]: /product/apis-integrations/dax-api
+[ref-excel]: /product/configuration/visualization-tools/excel
+[ref-mdx-api]: /product/apis-integrations/mdx-api
+[ref-cube-cloud-for-excel]: /product/apis-integrations/microsoft-excel
\ No newline at end of file
diff --git a/docs/pages/product/deployment/production-checklist.mdx b/docs/pages/product/deployment/production-checklist.mdx
index 1576be9317..44f03ee1c7 100644
--- a/docs/pages/product/deployment/production-checklist.mdx
+++ b/docs/pages/product/deployment/production-checklist.mdx
@@ -158,5 +158,5 @@ performance numbers can differ as it has different Cube runtime.
[ref-schema-ref-preaggs]: /reference/data-model/pre-aggregations
[ref-sec-ctx]: /product/auth/context
[ref-config-jwt]: /reference/configuration/config#jwt
-[ref-api-readyz]: /reference/rest-api#readyz
-[ref-api-livez]: /reference/rest-api#livez
+[ref-api-readyz]: /product/apis-integrations/rest-api/reference#readyz
+[ref-api-livez]: /product/apis-integrations/rest-api/reference#livez
diff --git a/docs/pages/product/faqs/troubleshooting.mdx b/docs/pages/product/faqs/troubleshooting.mdx
index e3d7441f6e..caecb26fe2 100644
--- a/docs/pages/product/faqs/troubleshooting.mdx
+++ b/docs/pages/product/faqs/troubleshooting.mdx
@@ -34,8 +34,6 @@ details which will help narrow down the scope of the issue.
If you see `has a key that already exists in Name index` message, it means that your
multitenancy setup is missing the `pre_aggregations_schema` configuration setting in your `cube.py` file.
-If you see `Error: Query execution timeout after 10 min of waiting` message, it means pre-aggregation is too large to be built.
-
For any other error types, feel free to reach out to us in our support chat.
## Warning: There were queries in these timezones which are not added in the CUBEJS_SCHEDULED_REFRESH_TIMEZONES environment variable.
diff --git a/docs/pages/product/getting-started/core/learn-more.mdx b/docs/pages/product/getting-started/core/learn-more.mdx
index 0b0bde79ea..da38be10e8 100644
--- a/docs/pages/product/getting-started/core/learn-more.mdx
+++ b/docs/pages/product/getting-started/core/learn-more.mdx
@@ -18,7 +18,7 @@ modeling problems.
## Querying
Cube can be queried in a variety of ways. Explore how to use
-[REST API](/reference/rest-api), [GraphQL API](/reference/graphql-api), and
+[REST API](/product/apis-integrations/rest-api), [GraphQL API](/product/apis-integrations/graphql-api), and
[SQL API](/product/apis-integrations/sql-api), or how to
[connect a BI or data visualization tool](/product/configuration/visualization-tools).
diff --git a/docs/pages/product/getting-started/core/query-data.mdx b/docs/pages/product/getting-started/core/query-data.mdx
index 10c72edd66..1b9964a01c 100644
--- a/docs/pages/product/getting-started/core/query-data.mdx
+++ b/docs/pages/product/getting-started/core/query-data.mdx
@@ -52,8 +52,8 @@ usage instructions for these APIs:
Now that we've seen how to use Cube's APIs, let's take a look at [how to add
pre-aggregations][next] to speed up your queries.
-[ref-graphql-api]: /reference/graphql-api
-[ref-rest-api]: /reference/rest-api
+[ref-graphql-api]: /product/apis-integrations/graphql-api
+[ref-rest-api]: /product/apis-integrations/rest-api
[ref-downstream]: /product/configuration/visualization-tools
[ref-frontend-int]: /product/apis-integrations/javascript-sdk
[ref-sql-api]: /product/apis-integrations/sql-api
diff --git a/docs/pages/product/workspace/_meta.js b/docs/pages/product/workspace/_meta.js
index 0b05eebdbe..6e324c427c 100644
--- a/docs/pages/product/workspace/_meta.js
+++ b/docs/pages/product/workspace/_meta.js
@@ -13,7 +13,7 @@ module.exports = {
"performance": "Performance Insights",
"monitoring": "Monitoring Integrations",
"access-control": "Access Control",
- "sso": "Single Sign-on",
+ "sso": "Authentication & SSO",
"audit-log": "Audit Log",
"encryption-keys": "Encryption keys",
"budgets": "Budgets",
diff --git a/docs/pages/product/workspace/audit-log.mdx b/docs/pages/product/workspace/audit-log.mdx
index f4d210c85d..46ac279aed 100644
--- a/docs/pages/product/workspace/audit-log.mdx
+++ b/docs/pages/product/workspace/audit-log.mdx
@@ -15,7 +15,10 @@ You can also choose an [Audit Log tier](/product/deployment/cloud/pricing#audit-
Read below about [collected events](#event-types). Also, see how you can [enable](#configuration)
Audit Log, [view events](#viewing-events), and [download](#downloading-events) them.
-
+
## Configuration
diff --git a/docs/pages/product/workspace/cli.mdx b/docs/pages/product/workspace/cli.mdx
index 7399b235c3..7ae908f814 100644
--- a/docs/pages/product/workspace/cli.mdx
+++ b/docs/pages/product/workspace/cli.mdx
@@ -57,4 +57,4 @@ location][link-athena-output] where query results are stored.
[link-athena-access]: https://docs.aws.amazon.com/athena/latest/ug/access.html
[link-athena-output]: https://docs.aws.amazon.com/athena/latest/ug/querying.html
-[ref-ref-cli]: /reference/cli
\ No newline at end of file
+[ref-ref-cli]: /product/workspace/cli/reference
\ No newline at end of file
diff --git a/docs/pages/product/workspace/cli/_meta.js b/docs/pages/product/workspace/cli/_meta.js
new file mode 100644
index 0000000000..ca8ef87b8f
--- /dev/null
+++ b/docs/pages/product/workspace/cli/_meta.js
@@ -0,0 +1,3 @@
+module.exports = {
+ "reference": "Reference"
+}
diff --git a/docs/pages/reference/cli.mdx b/docs/pages/product/workspace/cli/reference.mdx
similarity index 100%
rename from docs/pages/reference/cli.mdx
rename to docs/pages/product/workspace/cli/reference.mdx
diff --git a/docs/pages/product/workspace/integrations.mdx b/docs/pages/product/workspace/integrations.mdx
index 905f360115..be3dabe18b 100644
--- a/docs/pages/product/workspace/integrations.mdx
+++ b/docs/pages/product/workspace/integrations.mdx
@@ -12,7 +12,10 @@ The Integrations page is available in Cube Cloud on
-
+
You can [manage integrations](#manage-integrations), connect a [specific
tool](#connect-specific-tools), or [view API credentials](#view-api-credentials).
diff --git a/docs/pages/product/workspace/monitoring.mdx b/docs/pages/product/workspace/monitoring.mdx
index 24b3e72910..0589ac890d 100644
--- a/docs/pages/product/workspace/monitoring.mdx
+++ b/docs/pages/product/workspace/monitoring.mdx
@@ -32,7 +32,10 @@ destinations][vector-docs-sinks], also known as _sinks_.
-
+
## Guides
diff --git a/docs/pages/product/workspace/playground.mdx b/docs/pages/product/workspace/playground.mdx
index 77a266e280..6296719e1f 100644
--- a/docs/pages/product/workspace/playground.mdx
+++ b/docs/pages/product/workspace/playground.mdx
@@ -31,6 +31,11 @@ for them, [compose](#composing-queries) a query from scratch or [paste](#pasting
an exsiting query, view [results](#viewing-results), check a [generated
query](#viewing-a-generated-query), or copy equivalent [queries for data APIs](#copying-api-queries).
+
+
## Viewing the data model
You can see a list of all cubes or views in the sidebar on the left. Choose either
diff --git a/docs/pages/product/workspace/sql-runner.mdx b/docs/pages/product/workspace/sql-runner.mdx
index eda6a5e876..5ad5079b98 100644
--- a/docs/pages/product/workspace/sql-runner.mdx
+++ b/docs/pages/product/workspace/sql-runner.mdx
@@ -35,13 +35,22 @@ and click
▶ Run. The query results will be displayed under
src="https://ucarecdn.com/2f910abf-5b94-43cd-87f8-14c86bd98f77/"
/>
-## Querying a data source vs Cube Store
+## Querying data sources
-The SQL Runner can run queries against any configured data sources, which is
-helpful for diagnosing database-specific issues. It can also run queries against
-Cube Store, which is useful for testing pre-aggregations directly to see if they
-return expected results. You can switch data source(s) by clicking the dropdown
-under **Data Source**:
+SQL Runner can run queries against configured data sources, which is
+helpful for diagnosing database-specific issues.
+
+
+
+In order for an additional data source to show up in SQL Runner, it needs to be
+the [data source][ref-cube-datasource] in at least one cube definition.
+
+
+
+It can also run queries against Cube Store, which is useful for testing
+pre-aggregations directly to see if they return expected results.
+
+You can switch data source(s) by clicking the dropdown under
Data Source:
+
[cubecloud-signup]: https://cubecloud.dev/auth/signup
[ref-conf-scheduled-refresh-ctx]:
/reference/configuration/config#scheduledrefreshcontexts
+[ref-cube-datasource]: /reference/data-model/cube#data_source
\ No newline at end of file
diff --git a/docs/pages/product/workspace/sso.mdx b/docs/pages/product/workspace/sso.mdx
index 151f6e5f77..58d99656b4 100644
--- a/docs/pages/product/workspace/sso.mdx
+++ b/docs/pages/product/workspace/sso.mdx
@@ -1,22 +1,20 @@
----
-redirect_from:
- - /workspace/sso/
----
+# Authentication & SSO
-# Single Sign-on
-
-As an account administrator, you can manage how your team accesses Cube Cloud.
-There are options to log in using email and password, a GitHub account, or a
-Google account.
+As an account administrator, you can manage how your team and users access Cube Cloud.
+You can authenticate using email and password, a GitHub account, or a Google account.
Cube Cloud also provides single sign-on (SSO) via identity providers supporting
-industry-proven [SAML 2.0 protocol][wiki-saml], e.g., Okta, Google Workspace,
-Azure AD, etc.
+[SAML 2.0](#saml-20), e.g., Okta, Google Workspace, Azure AD, etc.
+
+Finally, Cube Cloud provides the [LDAP integration](#ldap-integration), enabling
+users of [APIs & integrations][ref-apis] to authenticate via an LDAP catalog
+and assume roles that work with [data access policies][ref-dap] once [authentication
+integration][ref-auth-integration] is enabled.
-Single sign-on is available in Cube Cloud on
-[Enterprise and above](https://cube.dev/pricing) product tiers.
+Authentication is available in Cube Cloud on [all product tiers](https://cube.dev/pricing).
+[SAML 2.0](#saml-20) and [LDAP integration](#ldap-integration) are available on [Enterprise and above](https://cube.dev/pricing) product tiers.
@@ -25,10 +23,23 @@ Single sign-on is available in Cube Cloud on
style="border: 0;"
/>
-## Guides
+## Configuration
+
+To manage authentication settings, navigate to
Team & Security settings
+of your Cube Cloud account, and switch to the
Authentication & SSO tab:
+
+
+
+Use the toggles in
Password,
Google, and
GitHub
+sections to enable or disable these authentication options.
+
+### SAML 2.0
+
+Use the toggle in the
SAML 2.0 section to enable or disable the authentication
+via an identity provider supporting the [SAML 2.0 protocol][wiki-saml].
+Once it's enabled, you'll see the
SAML 2.0 Settings section directly below.
-Single sign-on works with various identity providers. Check the following guides
-to get tool-specific instructions:
+Check the following guides to get tool-specific instructions on configuration:
-## Configuration
+### LDAP integration
-To manage sign-in and single sign-on settings, click your user name from the
-top-right corner, navigate to
Team & Security, and switch to
-the
Authentication & SSO tab:
+Use the toggle in the
LDAP Integration section to enable or disable the
+integration with an [LDAP catalog][wiki-ldap].
+Once it's enabled, you'll see the
LDAP Settings section directly below.
-
+
+
+Cube Cloud will be accessing your LDAP server from the IP addresses shown under
+LDAP Settings. If needed, add these IP addresses to an allowlist.
+
+
+
+You can configure [connection settings](#connection-settings) and use the
+
Test Connection button to validate them. You can also configure
+[user properties](#user-properties-mapping) mapping, [user roles](#user-roles-mapping) mapping,
+and [user attributes](#user-attributes-mapping) mapping.
+
+#### Connection settings
+
+You have to configure the following connection settings:
+
+| Option | Description |
+| --- | --- |
+|
LDAP Server URL | Address of your LDAP server |
+|
Use Secure LDAP | Use an encrypted connection (LDAPS) |
+|
Don't Verify CA | Disable certificate authority verification |
+|
Certificate | Certificate for LDAPS in the PEM format |
+|
Certificate Authority | Certificate for the private CA in the PEM format |
+|
Key | Key for mutual TLS (mTLS) in the PEM format |
+|
Bind DN | User name for LDAP authentication |
+|
Bind Credentials | Password for LDAP authentication |
+|
Search Base | Base DN for searching users |
+|
User Object Class | Object class for user entries |
+
+Use the tooltips in Cube Cloud to get more information about each setting.
+
+#### User properties mapping
+
+You have to configure how user data in an LDAP catalog maps to user properties in Cube Cloud.
+The following properties are required:
+
+| Property | Description |
+| --- | --- |
+|
Login Attribute | Login name |
+|
Id Attribute | Unique identifier |
+|
Email Attribute | Email address |
+|
Name Attribute | Full name |
+
+Use the tooltips in Cube Cloud to get more information about each setting.
+
+#### User roles mapping
+
+You can configure how user data in an LDAP catalog maps to roles in Cube Cloud.
+You can also use mapped roles with [data access policies][ref-dap] once [authentication
+integration][ref-auth-integration] is enabled.
+
+Mapping is performed as follows:
+*
Roles Attribute is retrieved from an LDAP catalog.
+* Retrieved value is transformed using rules under
Role mapping.
+* If the value matches an existing role in Cube Cloud, then the user assumes this role.
+
+Additionally, the user always assumes the role specified under
Default Cloud role.
+
+
+
+All roles will be available under `cubeCloud.roles` array in the [security context][ref-security-context]:
+
+```json
+{
+ "cubeCloud": {
+ "roles": [
+ "Everyone",
+ "manager"
+ ]
+ }
+}
+```
+
+#### User attributes mapping
+
+You can also bring more user data from an LDAP catalog to use with [data access policies][ref-dap].
+Mapping is performed using the rules under
Attribute mapping.
+
+All mapped attributes and their values will be available under `cubeCloud.userAttributes`
+dictionary in the [security context][ref-security-context]:
+
+```json
+{
+ "cubeCloud": {
+ "userAttributes": {
+ "fullName": "John Doe",
+ "department": "Finance",
+ "location": "San Mateo"
+ }
+ }
+}
+```
[wiki-saml]: https://en.wikipedia.org/wiki/SAML_2.0
+[wiki-ldap]: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol
+[ref-apis]: /product/apis-integrations
+[ref-dap]: /product/auth/data-access-policies
+[ref-security-context]: /product/auth/context
+[ref-auth-integration]: /product/auth#authentication-integration
\ No newline at end of file
diff --git a/docs/pages/product/workspace/vizard.mdx b/docs/pages/product/workspace/vizard.mdx
index 2fe4ca83ae..5627fb6bf6 100644
--- a/docs/pages/product/workspace/vizard.mdx
+++ b/docs/pages/product/workspace/vizard.mdx
@@ -14,7 +14,10 @@ Chart Prototyping is part of [Playground][ref-playground].
To access Chart Prototyping from Playground, compose and run a query, expand
the
Chart pane, and click
Code on the right:
-
+
## Preview the chart
diff --git a/docs/pages/reference/_meta.js b/docs/pages/reference/_meta.js
index 459786ac16..360a9e04d3 100644
--- a/docs/pages/reference/_meta.js
+++ b/docs/pages/reference/_meta.js
@@ -2,11 +2,5 @@ module.exports = {
"configuration": "Configuration",
"data-model": "Data modeling",
"python": "Python packages",
- "sql-api": "SQL API",
- "rest-api": "REST API",
- "graphql-api": "GraphQL API",
- "ai-api": "AI API",
- "frontend": "JavaScript SDK",
- "cli": "CLI",
"errors": "Error messages"
}
\ No newline at end of file
diff --git a/docs/pages/reference/configuration/config.mdx b/docs/pages/reference/configuration/config.mdx
index b9abd79237..883aaf4013 100644
--- a/docs/pages/reference/configuration/config.mdx
+++ b/docs/pages/reference/configuration/config.mdx
@@ -52,8 +52,6 @@ environment variable. The default value is `model`.
Use [`repositoryFactory`][self-repofactory] for [multitenancy][ref-multitenancy]
or when a more flexible setup is needed.
-{/* TODO: https://cubedevinc.atlassian.net/browse/CC-3095 */}
-
### `context_to_app_id`
It's a [multitenancy][ref-multitenancy] option.
@@ -890,7 +888,7 @@ environment variable, this option is enabled as well for the best user experienc
### `base_path`
-The base path for the [REST API](/reference/rest-api).
+The base path for the [REST API](/product/apis-integrations/rest-api/reference).
@@ -1308,11 +1306,64 @@ module.exports = {
+### `context_to_roles`
+
+Used by [data access policies][ref-dap]. This option is used to derive a list of
+[data access roles][ref-dap-roles] from the [security context][ref-sec-ctx].
+
+
+
+```python
+from cube import config
+
+@config('context_to_roles')
+def context_to_roles(ctx: dict) -> list[str]:
+ return ctx['securityContext'].get('roles', ['default'])
+```
+
+```javascript
+
+module.exports = {
+ contextToRoles: ({ securityContext }) => {
+ return securityContext.roles || ['default']
+ }
+}
+```
+
+
+
+If the [user roles mapping][ref-ldap-roles-mapping] in the [LDAP integration][ref-ldap-integration]
+is configured and the [authentication integration][ref-auth-integration] is enabled,
+the `context_to_roles` option might be defined as follows:
+
+
+
+```python
+from cube import config
+
+@config('context_to_roles')
+def context_to_roles(ctx: dict) -> list[str]:
+ cloud_ctx = ctx['securityContext'].get('cloud', {'roles': []})
+ return cloud_ctx.get('roles', [])
+```
+
+```javascript
+
+module.exports = {
+ contextToRoles: ({ securityContext }) => {
+ const cloud_ctx = securityContext.cloud || { roles: [] }
+ return cloud_ctx.roles || []
+ }
+}
+```
+
+
+
## Utility
### `logger`
-A function to server as a custom logger.
+A function to define a custom logger.
Accepts the following arguments:
- `message`: the message to be logged
@@ -1408,7 +1459,7 @@ If not defined, Cube will lookup for environment variable
[link-wiki-tz]: https://en.wikipedia.org/wiki/Tz_database
[ref-development-mode]: /product/configuration#development-mode
[ref-multitenancy]: /product/configuration/advanced/multitenancy
-[ref-rest-api]: /reference/rest-api
+[ref-rest-api]: /product/apis-integrations/rest-api
[ref-sql-api]: /product/apis-integrations/sql-api
[ref-pre-aggregations-refresh-key]:
/reference/data-model/pre-aggregations#refresh_key
@@ -1439,4 +1490,9 @@ If not defined, Cube will lookup for environment variable
[link-snake-case]: https://en.wikipedia.org/wiki/Snake_case
[link-camel-case]: https://en.wikipedia.org/wiki/Camel_case
[link-github-cube-drivers]: https://github.com/cube-js/cube/tree/master/packages
-[ref-ungrouped-query]: /product/apis-integrations/queries#ungrouped-query
\ No newline at end of file
+[ref-ungrouped-query]: /product/apis-integrations/queries#ungrouped-query
+[ref-dap]: /product/auth/data-access-policies
+[ref-dap-roles]: /product/auth/data-access-policies#data-access-roles
+[ref-auth-integration]: /product/auth#authentication-integration
+[ref-ldap-roles-mapping]: /product/workspace/sso#user-roles-mapping
+[ref-ldap-integration]: /product/workspace/sso#ldap-integration
\ No newline at end of file
diff --git a/docs/pages/reference/data-model/_meta.js b/docs/pages/reference/data-model/_meta.js
index 781d8f47f4..66735c5ec4 100644
--- a/docs/pages/reference/data-model/_meta.js
+++ b/docs/pages/reference/data-model/_meta.js
@@ -7,6 +7,7 @@ module.exports = {
"segments": "Segments",
"joins": "Joins",
"pre-aggregations": "Pre-aggregations",
+ "data-access-policies": "Data access policies",
"types-and-formats": "Types and formats",
"context-variables": "Context variables"
}
\ No newline at end of file
diff --git a/docs/pages/reference/data-model/cube.mdx b/docs/pages/reference/data-model/cube.mdx
index 24ee25cd3a..c367aa0ba1 100644
--- a/docs/pages/reference/data-model/cube.mdx
+++ b/docs/pages/reference/data-model/cube.mdx
@@ -12,7 +12,7 @@ Cubes are typically declared in separate files with one cube per file.
Within each cube are definitions of [measures][ref-ref-measures],
[dimensions][ref-ref-dimensions], [hierarchies][ref-ref-hierarchies],
[segments][ref-ref-segments], [joins][ref-ref-joins] between cubes,
-and [pre-aggregations][ref-ref-pre-aggs].
+[pre-aggregations][ref-ref-pre-aggs], and [data access policies][ref-ref-dap].
@@ -110,88 +110,31 @@ cubes:
-### `data_source`
+### `sql_alias`
-Each cube can have its own `data_source` name to support scenarios where data
-should be fetched from multiple databases. The value of the `data_source`
-parameter will be passed to the [`driverFactory()`][ref-config-driverfactory]
-function as part of the `context` parameter. By default, each cube has a
-`default` value for its `data_source`; to override it you can use:
+Use `sql_alias` when auto-generated cube alias prefix is too long and truncated
+by databases such as Postgres:
```javascript
-cube(`order_facts`, {
- data_source: `prod_db`,
+cube(`order_facts_about_literally_everything_in_the_world`, {
sql_table: `orders`,
+ sql_alias: `order_facts`,
});
```
```yaml
cubes:
- - name: order_facts
- data_source: prod_db
+ - name: order_facts_about_literally_everything_in_the_world
sql_table: orders
+ sql_alias: order_facts
```
-### `description`
-
-This parameter provides a human-readable description of a cube.
-When applicable, it will be displayed in [Playground][ref-playground] and exposed
-to data consumers via [APIs and integrations][ref-apis].
-
-A description can give a hint both to your team and end users, making sure they
-interpret the data correctly.
-
-
-
-```javascript
-cube(`orders`, {
- sql_table: `orders`,
- title: `Product Orders`,
- description: `All orders-related information`,
-});
-```
-
-```yaml
-cubes:
- - name: orders
- sql_table: orders
- title: Product Orders
- description: All orders-related information
-```
-
-
-
-### `meta`
-
-Custom metadata. Can be used to pass any information to the frontend.
-
-
-
-```javascript
-cube(`orders`, {
- sql_table: `orders`,
- title: `Product Orders`,
- meta: {
- any: `value`
- }
-});
-```
-
-```yaml
-cubes:
- - name: orders
- sql_table: orders
- title: Product Orders
- meta:
- any: value
-
-```
-
-
+It'll generate aliases for members such as `order_facts__count`. `sql_alias` affects
+all member names including pre-aggregation table names.
### `extends`
@@ -276,6 +219,151 @@ cube(`extended_order_facts`, {
});
```
+### `data_source`
+
+Each cube can have its own `data_source` name to support scenarios where data
+should be fetched from multiple databases. The value of the `data_source`
+parameter will be passed to the [`driverFactory()`][ref-config-driverfactory]
+function as part of the `context` parameter. By default, each cube has a
+`default` value for its `data_source`; to override it you can use:
+
+
+
+```javascript
+cube(`order_facts`, {
+ data_source: `prod_db`,
+ sql_table: `orders`,
+});
+```
+
+```yaml
+cubes:
+ - name: order_facts
+ data_source: prod_db
+ sql_table: orders
+```
+
+
+
+### `sql`
+
+The `sql` parameter specifies the SQL that will be used to generate a table that
+will be queried by a cube. It can be any valid SQL query, but usually it takes
+the form of a `SELECT * FROM my_table` query. Please note that you don't need to
+use `GROUP BY` in a SQL query on the cube level. This query should return a
+plain table, without aggregations.
+
+
+
+```javascript
+cube(`orders`, {
+ sql: `SELECT * FROM orders`,
+});
+```
+
+```yaml
+cubes:
+ - name: orders
+ sql: SELECT * FROM orders
+```
+
+
+
+With JavaScript models, you can also reference other cubes' SQL statements for
+code reuse:
+
+```javascript
+cube(`companies`, {
+ sql: `
+ SELECT users.company_name, users.company_id
+ FROM ${users.sql()} AS users
+ `,
+});
+```
+
+It is recommended to prefer the [`sql_table`](#parameters-sql-table) parameter
+over the `sql` parameter for all cubes that are supposed to use queries like
+this: `SELECT * FROM table`.
+
+### `sql_table`
+
+The `sql_table` parameter is used as a concise way for defining a cube that uses
+a query like this: `SELECT * FROM table`. Instead of using the
+[`sql`](#parameters-sql) parameter, use `sql_table` with the table name that this
+cube will query.
+
+
+
+```javascript
+cube(`orders`, {
+ sql_table: `public.orders`,
+});
+```
+
+```yaml
+cubes:
+ - name: orders
+ sql_table: public.orders
+```
+
+
+
+### `title`
+
+Use `title` to change the display name of the cube. By default, Cube will
+humanize the cube's name, so for instance, `users_orders` would become
+`Users Orders`. If default humanizing doesn't work in your case, please use the
+title parameter. It is highly recommended to give human readable names to your
+cubes. It will help everyone on a team better understand the data structure and
+will help maintain a consistent set of definitions across an organization.
+
+
+
+```javascript
+cube(`orders`, {
+ sql_table: `orders`,
+ title: `Product Orders`,
+});
+```
+
+```yaml
+cubes:
+ - name: orders
+ sql_table: orders
+ title: Product Orders
+```
+
+
+
+### `description`
+
+This parameter provides a human-readable description of a cube.
+When applicable, it will be displayed in [Playground][ref-playground] and exposed
+to data consumers via [APIs and integrations][ref-apis].
+
+A description can give a hint both to your team and end users, making sure they
+interpret the data correctly.
+
+
+
+```javascript
+cube(`orders`, {
+ sql_table: `orders`,
+ title: `Product Orders`,
+ description: `All orders-related information`,
+});
+```
+
+```yaml
+cubes:
+ - name: orders
+ sql_table: orders
+ title: Product Orders
+ description: All orders-related information
+```
+
+
+
### `public`
The `public` parameter is used to manage the visibility of a cube. Valid values
@@ -318,7 +406,7 @@ The default values for `refresh_key` are
Refresh key of a query is a concatenation of all cubes refresh keys involved in
query. For rollup queries pre-aggregation table name is used as a refresh key.
-You can set up a custom refresh check SQL by changing `refresh_key` property.
+You can set up a custom refresh check SQL by changing the `refresh_key` parameter.
Often, a `MAX(updated_at_timestamp)` for OLTP data is a viable option, or
examining a metadata table for whatever system is managing the data to see when
it last ran. timestamp in that case.
@@ -374,7 +462,7 @@ cubes:
`every` - can be set as an interval with granularities `second`, `minute`,
`hour`, `day`, and `week` or accept CRON string with some limitations. If you
-set `every` as CRON string, you can use the `timezone` property.
+set `every` as CRON string, you can use the `timezone` parameter.
For example:
@@ -462,121 +550,61 @@ SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) / 5)
└───────────────────────── second (0 - 59, optional)
```
-### `sql`
+### `meta`
-The `sql` parameter specifies the SQL that will be used to generate a table that
-will be queried by a cube. It can be any valid SQL query, but usually it takes
-the form of a `SELECT * FROM my_table` query. Please note that you don't need to
-use `GROUP BY` in a SQL query on the cube level. This query should return a
-plain table, without aggregations.
+Custom metadata. Can be used to pass any information to the frontend.
```javascript
cube(`orders`, {
- sql: `SELECT * FROM orders`,
+ sql_table: `orders`,
+ title: `Product Orders`,
+ meta: {
+ any: `value`
+ }
});
```
```yaml
cubes:
- name: orders
- sql: SELECT * FROM orders
-```
-
-
-
-With JavaScript models, you can also reference other cubes' SQL statements for
-code reuse:
-
-```javascript
-cube(`companies`, {
- sql: `
- SELECT users.company_name, users.company_id
- FROM ${users.sql()} AS users
- `,
-});
-```
-
-It is recommended to prefer the [`sql_table`](#parameters-sql-table) property
-over the `sql` property for all cubes that are supposed to use queries like
-this: `SELECT * FROM table`.
-
-### `sql_table`
-
-The `sql_table` property is used as a concise way for defining a cube that uses
-a query like this: `SELECT * FROM table`. Instead of using the
-[`sql`](#parameters-sql) property, use `sql_table` with the table name that this
-cube will query.
-
-
-
-```javascript
-cube(`orders`, {
- sql_table: `public.orders`,
-});
-```
+ sql_table: orders
+ title: Product Orders
+ meta:
+ any: value
-```yaml
-cubes:
- - name: orders
- sql_table: public.orders
```
-### `sql_alias`
+### `pre_aggregations`
-Use `sql_alias` when auto-generated cube alias prefix is too long and truncated
-by DB such as Postgres:
+The `pre_aggregations` parameter is used to configure [pre-aggregations][ref-ref-pre-aggs].
-
+### `joins`
-```javascript
-cube(`order_facts`, {
- sql_table: `orders`,
- sql_alias: `ofacts`,
-});
-```
+The `joins` parameter is used to configure [joins][ref-ref-joins].
-```yaml
-cubes:
- - name: order_facts
- sql_table: orders
- sql_alias: ofacts
-```
+### `dimensions`
-
+The `dimensions` parameter is used to configure [dimensions][ref-ref-dimensions].
-It'll generate aliases for members such as `ofacts__count`. `sql_alias` affects
-all member names including pre-aggregation table names.
+### `hierarchies`
-### `title`
+The `hierarchies` parameter is used to configure [hierarchies][ref-ref-hierarchies].
-Use `title` to change the display name of the cube. By default, Cube will
-humanize the cube's name, so for instance, `users_orders` would become
-`Users Orders`. If default humanizing doesn't work in your case, please use the
-title parameter. It is highly recommended to give human readable names to your
-cubes. It will help everyone on a team better understand the data structure and
-will help maintain a consistent set of definitions across an organization.
+### `segments`
-
+The `segments` parameter is used to configure [segments][ref-ref-segments].
-```javascript
-cube(`orders`, {
- sql_table: `orders`,
- title: `Product Orders`,
-});
-```
+### `measures`
-```yaml
-cubes:
- - name: orders
- sql_table: orders
- title: Product Orders
-```
+The `measures` parameter is used to configure [measures][ref-ref-measures].
-
+### `access_policy`
+
+The `access_policy` parameter is used to configure [data access policies][ref-ref-dap].
[ref-config-driverfactory]: /reference/configuration/config#driverfactory
@@ -586,8 +614,8 @@ cubes:
[ref-dev-playground]: /product/workspace/playground
[ref-recipe-control-access-cubes-views]:
/guides/recipes/access-control/controlling-access-to-cubes-and-views
-[ref-restapi-meta]: /reference/rest-api#v1meta
-[ref-restapi-sql]: /reference/rest-api#v1sql
+[ref-restapi-meta]: /product/apis-integrations/rest-api/reference#v1meta
+[ref-restapi-sql]: /product/apis-integrations/rest-api/reference#v1sql
[ref-sec-ctx]: /product/auth/context
[ref-naming]: /product/data-modeling/syntax#naming
[ref-playground]: /product/workspace/playground
@@ -598,3 +626,4 @@ cubes:
[ref-ref-segments]: /reference/data-model/segments
[ref-ref-joins]: /reference/data-model/joins
[ref-ref-pre-aggs]: /reference/data-model/pre-aggregations
+[ref-ref-dap]: /reference/data-model/data-access-policies
\ No newline at end of file
diff --git a/docs/pages/reference/data-model/data-access-policies.mdx b/docs/pages/reference/data-model/data-access-policies.mdx
new file mode 100644
index 0000000000..b5d699155c
--- /dev/null
+++ b/docs/pages/reference/data-model/data-access-policies.mdx
@@ -0,0 +1,366 @@
+# Data access policies
+
+You can use the `access_policy` parameter within [cubes][ref-ref-cubes] and [views][ref-ref-views]
+to configure [data access policies][ref-dap] for them.
+
+## Parameters
+
+The `access_policy` parameter should define a list of access policies. Each policy
+can be configured using the following parameters:
+
+- [`role`](#role) defines which [data access role][ref-dap-roles] a policy applies
+to.
+- [`conditions`](#conditions) can be optionally used to specify when a policy
+takes effect.
+- [`member_level`](#member-level) and [`row_level`](#row-level) parameters are used
+to configure [member-level][ref-dap-mls] and [row-level][ref-dap-rls] access.
+
+### `role`
+
+The `role` parameter defines which [data access role][ref-dap-roles], as defined
+by the [`context_to_roles`][ref-context-to-roles] configuration parameter, a
+policy applies to. To define a policy that applies to all users regardless of
+their roles, use the _any role_ shorthand: `role: "*"`.
+
+In the following example, three access policies are defined, with the first one
+applying to all users and two other applying to users with `marketing` or
+`finance` roles, respectively.
+
+
+
+```yaml
+cubes:
+ - name: orders
+ # ...
+
+ access_policy:
+ # Applies to any role
+ - role: "*"
+ # ...
+
+ - role: marketing
+ # ...
+
+ - role: finance
+ # ...
+```
+
+```javascript
+cube(`orders`, {
+ // ...
+
+ access_policy: [
+ {
+ // Applies to any role
+ role: `*`,
+ // ...
+ },
+ {
+ role: `marketing`,
+ // ...
+ },
+ {
+ role: `finance`,
+ // ...
+ }
+ ]
+})
+```
+
+
+
+### `conditions`
+
+The optional `conditions` parameter, when present, defines a list of conditions
+that should all be `true` in order for a policy to take effect. Each condition is
+configured with an `if` parameter that is expected to reference the [security
+context][ref-sec-ctx].
+
+In the following example, a permissive policy for all roles will only apply to
+EMEA-based users, as determined by the `is_EMEA_based` attribute in the security
+context:
+
+
+
+```yaml
+cubes:
+ - name: orders
+ # ...
+
+ access_policy:
+ - role: "*"
+ conditions:
+ - if: "{ securityContext.is_EMEA_based }"
+ member_level:
+ includes: "*"
+```
+
+```javascript
+cube(`orders`, {
+ // ...
+
+ access_policy: [
+ {
+ role: `*`,
+ conditions: [
+ { if: securityContext.is_EMEA_based }
+ ],
+ member_level: {
+ includes: `*`
+ }
+ }
+ ]
+})
+```
+
+
+
+You can use the `conditions` parameter to define multiple policies for the same
+role.
+
+In the following example, the first policy provides access to a _subset of members_
+to managers who are full-time employees while the other one provides access to
+_all members_ to managers who are full-time employees and have also completed a
+data privacy training:
+
+
+
+```yaml
+cubes:
+ - name: orders
+ # ...
+
+ access_policy:
+ - role: manager
+ conditions:
+ - if: "{ securityContext.is_full_time_employee }"
+ member_level:
+ includes:
+ - status
+ - count
+
+ - role: manager
+ conditions:
+ - if: "{ securityContext.is_full_time_employee }"
+ - if: "{ securityContext.has_completed_privacy_training }"
+ member_level:
+ includes: "*"
+```
+
+```javascript
+cube(`orders`, {
+ // ...
+
+ access_policy: [
+ {
+ role: `manager`,
+ conditions: [
+ { if: securityContext.is_full_time_employee }
+ ],
+ member_level: {
+ includes: [
+ `status`,
+ `count`
+ ]
+ }
+ },
+ {
+ role: `manager`,
+ conditions: [
+ { if: securityContext.is_full_time_employee },
+ { if: securityContext.has_completed_privacy_training }
+ ],
+ member_level: {
+ includes: `*`
+ }
+ }
+ ]
+})
+```
+
+
+
+### `member_level`
+
+The optional `member_level` parameter, when present, configures [member-level
+access][ref-dap-mls] for a policy by specifying allowed or disallowed members.
+
+You can either provide a list of allowed members with the `includes` parameter,
+or a list of disallowed members with the `excludes` parameter. There's also the
+_all members_ shorthand for both of these paramaters: `includes: "*"`, `excludes: "*"`.
+
+In the following example, member-level access is configured this way:
+
+| Scope | Access |
+| --- | --- |
+| Users with the `manager` role | All members except for `count` |
+| Users with the `observer` role | All members except for `count` and `count_7d` |
+| Users with the `guest` role | Only the `count_30d` measure |
+| All other users | No access to this cube at all |
+
+
+
+```yaml
+cubes:
+ - name: orders
+ # ...
+
+ access_policy:
+ - role: "*"
+ member_level:
+ # Includes nothing, i.e., excludes all members
+ includes: []
+
+ - role: manager
+ member_level:
+ # Includes all members except for `count`
+ excludes:
+ - count
+
+ - role: observer
+ member_level:
+ # Includes all members except for `count` and `count_7d`
+ excludes:
+ - count
+ - count_7d
+
+ - role: guest
+ # Includes only `count_30d`, excludes all other members
+ member_level:
+ includes:
+ - count_30d
+```
+
+```javascript
+cube(`orders`, {
+ // ...
+
+ access_policy: [
+ {
+ role: `*`,
+ // Includes nothing, i.e., excludes all members
+ member_level: {
+ includes: []
+ }
+ },
+ {
+ role: `manager`,
+ // Includes all members except for `count`
+ member_level: {
+ excludes: [
+ `count`
+ ]
+ }
+ },
+ {
+ role: `observer`,
+ // Includes all members except for `count` and `count_7d`
+ member_level: {
+ excludes: [
+ `count`,
+ `count_7d`
+ ]
+ }
+ },
+ {
+ role: `guest`,
+ // Includes only `count_30d`, excludes all other members
+ member_level: {
+ includes: [
+ `count_30d`
+ ]
+ }
+ }
+ ]
+})
+```
+
+
+
+Note that access policies also respect [member-level security][ref-mls] restrictions
+configured via `public` parameters. See [member-level access][ref-dap-mls] to
+learn more about policy evaluation.
+
+### `row_level`
+
+The optional `row_level` parameter, when present, configures [row-level
+access][ref-dap-rls] for a policy by specifying `filters` that should apply to result set rows.
+You can also use the optional `allow_all` parameter to explicitly allow or disallow all rows.
+
+In the following example, users with the `manager` role are allowed to access only
+rows that have the `state` dimension matching the state from the [security context][ref-sec-ctx].
+All other users are disallowed from accessing any rows at all.
+
+
+
+```yaml
+cubes:
+ - name: orders
+ # ...
+
+ access_policy:
+ - role: "*"
+ row_level:
+ allow_all: false
+
+ - role: manager
+ row_level:
+ filters:
+ - member: state
+ operator: equals
+ values: [ "{ securityContext.state }" ]
+```
+
+```javascript
+cube(`orders`, {
+ // ...
+
+ access_policy: [
+ {
+ role: `*`,
+ row_level: {
+ allow_all: false
+ }
+ },
+ {
+ role: `manager`,
+ row_level: {
+ filters: [
+ {
+ member: `state`,
+ operator: `equals`,
+ values: [ securityContext.state ]
+ }
+ ]
+ }
+ }
+ ]
+})
+```
+
+
+
+For convenience, row filters are configured using the same format as [filters in
+REST API][ref-rest-query-filters] queries, allowing to use the same set of
+[filter operators][ref-rest-query-ops], e.g., `equals`, `contains`, `gte`, etc.
+You can also use `and` and `or` parameters to combine multiple filters into
+[boolean logical operators][ref-rest-boolean-ops].
+
+Note that access policies also respect [row-level security][ref-rls] restrictions
+configured via the `query_rewrite` configuration option. See [row-level access][ref-dap-rls] to
+learn more about policy evaluation.
+
+
+[ref-ref-cubes]: /reference/data-model/cube
+[ref-ref-views]: /reference/data-model/view
+[ref-dap]: /product/auth/data-access-policies
+[ref-dap-roles]: /product/auth/data-access-policies#data-access-roles
+[ref-dap-mls]: /product/auth/data-access-policies#member-level-access
+[ref-dap-rls]: /product/auth/data-access-policies#row-level-access
+[ref-context-to-roles]: /reference/configuration/config#context_to_roles
+[ref-mls]: /product/auth/member-level-security
+[ref-rls]: /product/auth/row-level-security
+[ref-sec-ctx]: /product/auth/context
+[ref-rest-query-filters]: /product/apis-integrations/rest-api/query-format#filters-format
+[ref-rest-query-ops]: /product/apis-integrations/rest-api/query-format#filters-operators
+[ref-rest-boolean-ops]: /product/apis-integrations/rest-api/query-format#boolean-logical-operators
\ No newline at end of file
diff --git a/docs/pages/reference/data-model/dimensions.mdx b/docs/pages/reference/data-model/dimensions.mdx
index 7c35bb0989..cdeee806f3 100644
--- a/docs/pages/reference/data-model/dimensions.mdx
+++ b/docs/pages/reference/data-model/dimensions.mdx
@@ -6,11 +6,11 @@ redirect_from:
# Dimensions
-The `dimensions` property contains a set of dimensions. You can think about a
-dimension as an attribute related to a measure, e.g. the measure `user_count`
+You can use the `dimensions` parameter within [cubes][ref-ref-cubes] to define dimensions.
+You can think about a dimension as an attribute related to a measure, e.g. the measure `user_count`
can have dimensions like `country`, `age`, `occupation`, etc.
-Any dimension should have the following parameters: `name`, `sql` and `type`.
+Any dimension should have the following parameters: [`name`](#name), [`sql`](#sql), and [`type`](#type).
Dimensions can be also organized into [hierarchies][ref-ref-hierarchies].
@@ -699,6 +699,7 @@ cube(`orders`, {
+[ref-ref-cubes]: /reference/data-model/cube
[ref-schema-ref-joins]: /reference/data-model/joins
[ref-subquery]: /product/data-modeling/concepts/calculated-members#subquery-dimensions
[self-subquery]: #sub-query
diff --git a/docs/pages/reference/data-model/hierarchies.mdx b/docs/pages/reference/data-model/hierarchies.mdx
index 92212b4938..8f7313ecd9 100644
--- a/docs/pages/reference/data-model/hierarchies.mdx
+++ b/docs/pages/reference/data-model/hierarchies.mdx
@@ -1,7 +1,7 @@
# Hierarchies
-The `hierarchies` property contains a set of hierarchies. You can think about a
-hierarchy as a means to group [dimensions][ref-ref-dimensions] together and organize
+You can use the `hierarchies` parameter within [cubes][ref-ref-cubes] to define hierarchies.
+You can think about a hierarchy as a means to group [dimensions][ref-ref-dimensions] together and organize
them into levels of granularity, allowing users to drill down or roll up for analysis.
@@ -14,6 +14,11 @@ You can also preview hierarchies in [Playground][ref-playground].
Any hierarchy should have the following parameters: [`name`](#name) and [`levels`](#levels).
+
+
## Parameters
### `name`
@@ -298,8 +303,9 @@ cubes:
+[ref-ref-cubes]: /reference/data-model/cube
[ref-ref-dimensions]: /reference/data-model/dimensions
[ref-naming]: /product/data-modeling/syntax#naming
-[ref-apis-support]: /product/apis-integrations#support-for-data-modeling
+[ref-apis-support]: /product/apis-integrations#data-modeling
[ref-playground]: /product/workspace/playground#viewing-the-data-model
[ref-viz-tools]: /product/configuration/visualization-tools
\ No newline at end of file
diff --git a/docs/pages/reference/data-model/joins.mdx b/docs/pages/reference/data-model/joins.mdx
index defb03fa38..dab74c78ef 100644
--- a/docs/pages/reference/data-model/joins.mdx
+++ b/docs/pages/reference/data-model/joins.mdx
@@ -6,9 +6,8 @@ redirect_from:
# Joins
-The `joins` parameter declares a block to define relationships between cubes. It
-allows users to access and compare fields from two or more cubes at the same
-time.
+You can use the `joins` parameter within [cubes][ref-ref-cubes] to define joins to other cubes.
+Joins allow to access and compare members from two or more cubes at the same time.
@@ -664,6 +663,8 @@ In case there are multiple join paths that can be used to join the same set of c
Cube makes join trees as predictable and stable as possible, but this isn't guaranteed in case multiple join paths exist.
Please use views to address join predictability and stability.
+
+[ref-ref-cubes]: /reference/data-model/cube
[ref-restapi-query-filter-op-set]:
/product/apis-integrations/rest-api/query-format#set
[ref-schema-fundamentals-join-dir]:
@@ -675,4 +676,4 @@ Please use views to address join predictability and stability.
[wiki-djikstra-alg]: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
[wiki-left-join]: https://en.wikipedia.org/wiki/Join_(SQL)#Left_outer_join
[wiki-1-1]: https://en.wikipedia.org/wiki/One-to-one_(data_model)
-[wiki-1-m]: https://en.wikipedia.org/wiki/One-to-many_(data_model)
+[wiki-1-m]: https://en.wikipedia.org/wiki/One-to-many_(data_model)
\ No newline at end of file
diff --git a/docs/pages/reference/data-model/measures.mdx b/docs/pages/reference/data-model/measures.mdx
index 64d378c23a..96ff9eb2ba 100644
--- a/docs/pages/reference/data-model/measures.mdx
+++ b/docs/pages/reference/data-model/measures.mdx
@@ -6,10 +6,10 @@ redirect_from:
# Measures
-The `measures` parameter contains a set of measures and each measure is an
-aggregation over a certain column in your database table.
+You can use the `measures` parameter within [cubes][ref-ref-cubes] to define measures.
+Each measure is an aggregation over a certain column in your database table.
-Any measure should have the following parameters: `name`, `sql` and `type`.
+Any measure should have the following parameters: [`name`](#name), [`sql`](#sql), and [`type`](#type).
## Parameters
@@ -527,6 +527,7 @@ You can create calculated measures from several joined cubes. In this case, a
join will be created automatically.
+[ref-ref-cubes]: /reference/data-model/cube
[ref-schema-ref-types-formats-measures-types]:
/reference/data-model/types-and-formats#measure-types
[ref-schema-ref-types-formats-measures-formats]:
diff --git a/docs/pages/reference/data-model/pre-aggregations.mdx b/docs/pages/reference/data-model/pre-aggregations.mdx
index abea423da8..eb18db356a 100644
--- a/docs/pages/reference/data-model/pre-aggregations.mdx
+++ b/docs/pages/reference/data-model/pre-aggregations.mdx
@@ -6,8 +6,8 @@ redirect_from:
# Pre-aggregations
-[Pre-aggregations][ref-pre-aggs] can be defined using the `pre_aggregations`
-parameter of a [cube][ref-ref-cubes].
+You can use the `pre_aggregations` parameter within [cubes][ref-ref-cubes] to define
+[pre-aggregations][ref-pre-aggs].
Pre-aggregations must have, at minimum, a [name](#name) and a [type](#type).
Pre-aggregations must include all dimensions and measures you will query with.
@@ -1111,8 +1111,12 @@ refreshes.
### `allow_non_strict_date_range_match`
The `allow_non_strict_date_range_match` property can be used to allow queries to
-match this pre-aggregation when using non-strict date ranges. This is useful
-when using a visualization tools such as [Apache
+match this pre-aggregation when using non-strict date ranges.
+By default Cube checks if requested date range exactly matches pre-aggregation granularity.
+For example if you're requesting half of a day or your date range filter is just one millisecond off for daily granularity pre-aggregation Cube would not use such a pre-aggregation by default.
+Use this flag to lift this strict check.
+This is useful
+when using a visualization tools such as Tableau or [Apache
Superset][ref-config-downstream-superset] that use loose date ranges by default.
diff --git a/docs/pages/reference/data-model/segments.mdx b/docs/pages/reference/data-model/segments.mdx
index 2c074f5aad..e9a903a47f 100644
--- a/docs/pages/reference/data-model/segments.mdx
+++ b/docs/pages/reference/data-model/segments.mdx
@@ -6,9 +6,10 @@ redirect_from:
# Segments
-Segments are predefined filters. You can use segments to define complex
-filtering logic in SQL. For example, users for one particular city can be
-treated as a segment:
+You can use the `segments` parameter within [cubes][ref-ref-cubes] to define segments.
+Segments are predefined filters. You can use segments to define complex filtering logic in SQL.
+
+For example, users for one particular city can be treated as a segment:
@@ -336,6 +337,7 @@ cubes:
+[ref-ref-cubes]: /reference/data-model/cube
[ref-backend-query]: /product/apis-integrations/rest-api/query-format
[ref-schema-gen]: /guides/recipes/code-reusability/schema-generation
[ref-naming]: /product/data-modeling/syntax#naming
diff --git a/docs/pages/reference/data-model/view.mdx b/docs/pages/reference/data-model/view.mdx
index 800bdb98b7..82472bc532 100644
--- a/docs/pages/reference/data-model/view.mdx
+++ b/docs/pages/reference/data-model/view.mdx
@@ -152,7 +152,7 @@ above for `base_orders`.
The other required parameter inside the `cubes` block is `includes`. Use it
to list measures, dimensions, or segments you'd like to include into the view.
-To include all members from a cube, use the "includes all" form: `includes: "*"`.
+To include all members from a cube, use the _includes all_ shorthand: `includes: "*"`.
In that case, you can also use the `excludes` parameter to list members that
you'd like to exclude.
@@ -292,8 +292,20 @@ view(`arr`, {
description: `Annual Recurring Revenue`,
public: COMPILE_CONTEXT.security_context.is_finance,
- includes: [revenue.arr, revenue.date, customers.plan],
-});
+ cubes: [
+ {
+ join_path: revenue,
+ includes: [
+ `arr`,
+ `date`
+ ]
+ },
+ {
+ join_path: revenue.customers,
+ includes: `plan`
+ }
+ ]
+})
```
```yaml
@@ -302,12 +314,15 @@ views:
description: Annual Recurring Revenue
public: COMPILE_CONTEXT.security_context.is_finance
- includes:
- # Measures
- - revenue.arr
- # Dimensions
- - revenue.date
- - customers.plan
+ cubes:
+ - join_path: revenue
+ includes:
+ - arr
+ - date
+
+ - join_path: revenue.customers
+ includes:
+ - plan
```
@@ -340,49 +355,9 @@ views:
-### `includes` (deprecated)
-
-
-
-The top-level `includes` parameter is deprecated and might be removed in
-the future. Please always use the `includes` parameter with `cubes` and
-`join_path` parameters so you can explicitly control the join path.
-
-
-
-The top-level `includes` parameter is used to bulk add measures or dimensions
-to a view.
-
-
-
-```javascript
-view(`active_users`, {
- includes: [
- // Measures
- users.rolling_count,
-
- // Dimensions
- users.city,
- users.created_at,
- ],
-});
-```
-
-```yaml
-views:
- - name: active_users
-
- includes:
- # Measures
- - users.rolling_count
-
- # Dimensions
- - users.city
- - users.created_at
-```
-
-
+### `access_policy`
+The `access_policy` parameter is used to configure [data access policies][ref-ref-dap].
[ref-recipe-control-access-cubes-views]:
/guides/recipes/access-control/controlling-access-to-cubes-and-views
@@ -391,6 +366,7 @@ views:
[ref-naming]: /product/data-modeling/syntax#naming
[ref-apis]: /product/apis-integrations
[ref-ref-cubes]: /reference/data-model/cube
-[ref-apis-support]: /product/apis-integrations#support-for-data-modeling
+[ref-ref-dap]: /reference/data-model/data-access-policies
+[ref-apis-support]: /product/apis-integrations#data-modeling
[ref-playground]: /product/workspace/playground#viewing-the-data-model
[ref-viz-tools]: /product/configuration/visualization-tools
\ No newline at end of file
diff --git a/docs/pages/reference/errors.mdx b/docs/pages/reference/errors.mdx
index 2f9e9bf6fc..23729c9e76 100644
--- a/docs/pages/reference/errors.mdx
+++ b/docs/pages/reference/errors.mdx
@@ -37,7 +37,7 @@ incapsulate join paths and completely remove the possibility of the error in que
You might also consider setting [`public: false`](/reference/data-model/cube#public)
on your cubes to hide them from end users.
-If you’re building a custom data application, you might use the [`meta` endpoint](/reference/rest-api#v1meta)
+If you’re building a custom data application, you might use the [`meta` endpoint](/product/apis-integrations/rest-api/reference#v1meta)
of the REST API. It groups cubes into `connectedComponents` to help select those ones
that can be joined together.
diff --git a/docs/redirects.json b/docs/redirects.json
index 62f19d77c5..dd98aef061 100644
--- a/docs/redirects.json
+++ b/docs/redirects.json
@@ -1,4 +1,64 @@
[
+ {
+ "source": "/product/apis-integrations/semantic-layer-sync/power-bi",
+ "destination": "/product/configuration/visualization-tools/powerbi",
+ "permanent": true
+ },
+ {
+ "source": "/reference/frontend/cubejs-client-core",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-core",
+ "permanent": true
+ },
+ {
+ "source": "/reference/frontend/cubejs-client-react",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-react",
+ "permanent": true
+ },
+ {
+ "source": "/reference/frontend/cubejs-client-ngx",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-ngx",
+ "permanent": true
+ },
+ {
+ "source": "/reference/frontend/cubejs-client-vue",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-vue",
+ "permanent": true
+ },
+ {
+ "source": "/reference/frontend/cubejs-client-ws-transport",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-ws-transport",
+ "permanent": true
+ },
+ {
+ "source": "/reference/cli",
+ "destination": "/product/workspace/cli/reference",
+ "permanent": true
+ },
+ {
+ "source": "/reference/ai-api",
+ "destination": "/product/apis-integrations/ai-api/reference",
+ "permanent": true
+ },
+ {
+ "source": "/reference/graphql-api",
+ "destination": "/product/apis-integrations/graphql-api/reference",
+ "permanent": true
+ },
+ {
+ "source": "/reference/rest-api",
+ "destination": "/product/apis-integrations/rest-api/reference",
+ "permanent": true
+ },
+ {
+ "source": "/reference/sql-api",
+ "destination": "/product/apis-integrations/sql-api/reference",
+ "permanent": true
+ },
+ {
+ "source": "/product/data-modeling/concepts/publicity",
+ "destination": "/product/auth/member-level-security",
+ "permanent": true
+ },
{
"source": "/guides/recipes/data-modeling/fiscal-year-quarter-dimensions",
"destination": "/guides/recipes/data-modeling/custom-granularity",
@@ -516,12 +576,12 @@
},
{
"source": "/backend/sql/reference/functions-operators",
- "destination": "/reference/sql-api/sql-functions-and-operators",
+ "destination": "/product/apis-integrations/sql-api/reference#sql-functions-and-operators",
"permanent": true
},
{
"source": "/backend/sql/reference/commands",
- "destination": "/reference/sql-api/sql-commands",
+ "destination": "/product/apis-integrations/sql-api/reference#sql-commands",
"permanent": true
},
{
@@ -581,27 +641,22 @@
},
{
"source": "/rest-api",
- "destination": "/reference/rest-api",
+ "destination": "/product/apis-integrations/rest-api/reference",
"permanent": true
},
{
"source": "/backend/graphql",
- "destination": "/reference/graphql-api",
+ "destination": "/product/apis-integrations/graphql-api/reference",
"permanent": true
},
{
"source": "/@cubejs-client-vue",
- "destination": "/reference/frontend/cubejs-client-vue",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-vue",
"permanent": true
},
{
"source": "/@cubejs-client-ngx",
- "destination": "/reference/frontend/cubejs-client-ngx",
- "permanent": true
- },
- {
- "source": "/reference",
- "destination": "/reference/cli",
+ "destination": "/product/apis-integrations/javascript-sdk/reference/cubejs-client-ngx",
"permanent": true
},
{
diff --git a/lerna-publish.sh b/lerna-publish.sh
index c01bee96c8..2d6ce46994 100755
--- a/lerna-publish.sh
+++ b/lerna-publish.sh
@@ -5,4 +5,4 @@ BUMP=$1
if [ "x$BUMP" == "x" ]; then
BUMP=patch
fi
-yarn lerna version --create-release=github --conventional-commits --exact $BUMP
+yarn lerna version --create-release=github --conventional-commits --force-publish --exact $BUMP
diff --git a/lerna.json b/lerna.json
index d0a112c36b..42f1b32a31 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.18",
+ "version": "1.2.14",
"npmClient": "yarn",
"command": {
"bootstrap": {
diff --git a/package.json b/package.json
index afe3a8e325..f0ddac4ad4 100644
--- a/package.json
+++ b/package.json
@@ -64,6 +64,7 @@
"url": "https://github.com/cube-js/cube.git"
},
"resolutions": {
+ "es5-ext": "0.10.53",
"@types/node": "^18",
"@types/ramda": "0.27.40",
"thrift": "0.20.0"
diff --git a/packages/cubejs-api-gateway/CHANGELOG.md b/packages/cubejs-api-gateway/CHANGELOG.md
index 606851a2bf..0aac302b43 100644
--- a/packages/cubejs-api-gateway/CHANGELOG.md
+++ b/packages/cubejs-api-gateway/CHANGELOG.md
@@ -3,6 +3,72 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.2.14](https://github.com/cube-js/cube/compare/v1.2.13...v1.2.14) (2025-02-28)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.13](https://github.com/cube-js/cube/compare/v1.2.12...v1.2.13) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.12](https://github.com/cube-js/cube/compare/v1.2.11...v1.2.12) (2025-02-26)
+
+### Bug Fixes
+
+- **api-gateway:** data scope check ([#9264](https://github.com/cube-js/cube/issues/9264)) ([75095e1](https://github.com/cube-js/cube/commit/75095e1f86839a3f459d1050226b319d3ed2410f))
+
+## [1.2.11](https://github.com/cube-js/cube/compare/v1.2.10...v1.2.11) (2025-02-25)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.10](https://github.com/cube-js/cube/compare/v1.2.9...v1.2.10) (2025-02-24)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.9](https://github.com/cube-js/cube/compare/v1.2.8...v1.2.9) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.8](https://github.com/cube-js/cube/compare/v1.2.7...v1.2.8) (2025-02-21)
+
+### Features
+
+- **cubeclient:** Add `short_title` to dimensions and measures ([#9256](https://github.com/cube-js/cube/issues/9256)) ([584b3dc](https://github.com/cube-js/cube/commit/584b3dcefedb7c01b849e7f18a59445bd3542b7e))
+
+## [1.2.7](https://github.com/cube-js/cube/compare/v1.2.6...v1.2.7) (2025-02-20)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.6](https://github.com/cube-js/cube/compare/v1.2.5...v1.2.6) (2025-02-18)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.5](https://github.com/cube-js/cube/compare/v1.2.4...v1.2.5) (2025-02-13)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.4](https://github.com/cube-js/cube/compare/v1.2.3...v1.2.4) (2025-02-11)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.3](https://github.com/cube-js/cube/compare/v1.2.2...v1.2.3) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.2](https://github.com/cube-js/cube/compare/v1.2.1...v1.2.2) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+## [1.2.1](https://github.com/cube-js/cube/compare/v1.2.0...v1.2.1) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/api-gateway
+
+# [1.2.0](https://github.com/cube-js/cube/compare/v1.1.18...v1.2.0) (2025-02-05)
+
+### Features
+
+- **cubeclient:** Add hierarchies to Cube meta ([#9180](https://github.com/cube-js/cube/issues/9180)) ([56dbf9e](https://github.com/cube-js/cube/commit/56dbf9edc8c257cd81f00ff119b12543652b76d0))
+
## [1.1.18](https://github.com/cube-js/cube/compare/v1.1.17...v1.1.18) (2025-01-27)
### Bug Fixes
diff --git a/packages/cubejs-api-gateway/openspec.yml b/packages/cubejs-api-gateway/openspec.yml
index a895bdb3cb..5add9ce3a6 100644
--- a/packages/cubejs-api-gateway/openspec.yml
+++ b/packages/cubejs-api-gateway/openspec.yml
@@ -127,6 +127,8 @@ components:
type: "string"
title:
type: "string"
+ shortTitle:
+ type: "string"
description:
type: "string"
type:
@@ -150,6 +152,8 @@ components:
type: "string"
title:
type: "string"
+ shortTitle:
+ type: "string"
description:
type: "string"
type:
@@ -170,6 +174,20 @@ components:
type: array
items:
type: "string"
+ V1CubeMetaHierarchy:
+ type: "object"
+ required:
+ - name
+ - levels
+ properties:
+ name:
+ type: "string"
+ title:
+ type: "string"
+ levels:
+ type: "array"
+ items:
+ type: "string"
V1CubeMeta:
type: "object"
required:
@@ -209,6 +227,10 @@ components:
type: "array"
items:
$ref: "#/components/schemas/V1CubeMetaFolder"
+ hierarchies:
+ type: "array"
+ items:
+ $ref: "#/components/schemas/V1CubeMetaHierarchy"
V1CubeMetaType:
type: "string"
description: Type of cube
diff --git a/packages/cubejs-api-gateway/package.json b/packages/cubejs-api-gateway/package.json
index 9d389e5d3d..a2868bcd86 100644
--- a/packages/cubejs-api-gateway/package.json
+++ b/packages/cubejs-api-gateway/package.json
@@ -2,7 +2,7 @@
"name": "@cubejs-backend/api-gateway",
"description": "Cube.js API Gateway",
"author": "Cube Dev, Inc.",
- "version": "1.1.18",
+ "version": "1.2.14",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
@@ -27,8 +27,8 @@
"dist/src/*"
],
"dependencies": {
- "@cubejs-backend/native": "1.1.17",
- "@cubejs-backend/shared": "1.1.17",
+ "@cubejs-backend/native": "1.2.14",
+ "@cubejs-backend/shared": "1.2.14",
"@ungap/structured-clone": "^0.3.4",
"body-parser": "^1.19.0",
"chrono-node": "^2.6.2",
@@ -50,7 +50,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
- "@cubejs-backend/linter": "^1.0.0",
+ "@cubejs-backend/linter": "1.2.14",
"@types/express": "^4.17.21",
"@types/jest": "^27",
"@types/jsonwebtoken": "^9.0.2",
diff --git a/packages/cubejs-api-gateway/src/gateway.ts b/packages/cubejs-api-gateway/src/gateway.ts
index af90986b41..20d2c0780d 100644
--- a/packages/cubejs-api-gateway/src/gateway.ts
+++ b/packages/cubejs-api-gateway/src/gateway.ts
@@ -385,6 +385,7 @@ class ApiGateway {
res.setHeader('Transfer-Encoding', 'chunked');
try {
+ await this.assertApiScope('data', req.context?.securityContext);
await this.sqlServer.execSql(req.body.query, res, req.context?.securityContext);
} catch (e: any) {
this.handleError({
diff --git a/packages/cubejs-athena-driver/CHANGELOG.md b/packages/cubejs-athena-driver/CHANGELOG.md
index 17a4e5982a..63ff8b9a63 100644
--- a/packages/cubejs-athena-driver/CHANGELOG.md
+++ b/packages/cubejs-athena-driver/CHANGELOG.md
@@ -3,6 +3,68 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.2.14](https://github.com/cube-js/cube/compare/v1.2.13...v1.2.14) (2025-02-28)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.13](https://github.com/cube-js/cube/compare/v1.2.12...v1.2.13) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.12](https://github.com/cube-js/cube/compare/v1.2.11...v1.2.12) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.11](https://github.com/cube-js/cube/compare/v1.2.10...v1.2.11) (2025-02-25)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.10](https://github.com/cube-js/cube/compare/v1.2.9...v1.2.10) (2025-02-24)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.9](https://github.com/cube-js/cube/compare/v1.2.8...v1.2.9) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.8](https://github.com/cube-js/cube/compare/v1.2.7...v1.2.8) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.7](https://github.com/cube-js/cube/compare/v1.2.6...v1.2.7) (2025-02-20)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.6](https://github.com/cube-js/cube/compare/v1.2.5...v1.2.6) (2025-02-18)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.5](https://github.com/cube-js/cube/compare/v1.2.4...v1.2.5) (2025-02-13)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.4](https://github.com/cube-js/cube/compare/v1.2.3...v1.2.4) (2025-02-11)
+
+### Features
+
+- **server-core:** Introduce CUBEJS_REFRESH_WORKER_CONCURRENCY env and update default concurrency settings for drivers ([#9168](https://github.com/cube-js/cube/issues/9168)) ([7ef6282](https://github.com/cube-js/cube/commit/7ef628273905d47996b108862a52dde89b9525e3))
+
+## [1.2.3](https://github.com/cube-js/cube/compare/v1.2.2...v1.2.3) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.2](https://github.com/cube-js/cube/compare/v1.2.1...v1.2.2) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+## [1.2.1](https://github.com/cube-js/cube/compare/v1.2.0...v1.2.1) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
+# [1.2.0](https://github.com/cube-js/cube/compare/v1.1.18...v1.2.0) (2025-02-05)
+
+**Note:** Version bump only for package @cubejs-backend/athena-driver
+
## [1.1.17](https://github.com/cube-js/cube/compare/v1.1.16...v1.1.17) (2025-01-27)
**Note:** Version bump only for package @cubejs-backend/athena-driver
diff --git a/packages/cubejs-athena-driver/package.json b/packages/cubejs-athena-driver/package.json
index 538b377087..2fbdbe43b6 100644
--- a/packages/cubejs-athena-driver/package.json
+++ b/packages/cubejs-athena-driver/package.json
@@ -2,7 +2,7 @@
"name": "@cubejs-backend/athena-driver",
"description": "Cube.js Athena database driver",
"author": "Cube Dev, Inc.",
- "version": "1.1.17",
+ "version": "1.2.14",
"repository": {
"type": "git",
"url": "https://github.com/cube-js/cube.git",
@@ -29,13 +29,13 @@
"types": "dist/src/index.d.ts",
"dependencies": {
"@aws-sdk/client-athena": "^3.22.0",
- "@cubejs-backend/base-driver": "1.1.17",
- "@cubejs-backend/shared": "1.1.17",
+ "@cubejs-backend/base-driver": "1.2.14",
+ "@cubejs-backend/shared": "1.2.14",
"sqlstring": "^2.3.1"
},
"devDependencies": {
- "@cubejs-backend/linter": "^1.0.0",
- "@cubejs-backend/testing-shared": "1.1.17",
+ "@cubejs-backend/linter": "1.2.14",
+ "@cubejs-backend/testing-shared": "1.2.14",
"@types/ramda": "^0.27.40",
"typescript": "~5.2.2"
},
diff --git a/packages/cubejs-athena-driver/src/AthenaDriver.ts b/packages/cubejs-athena-driver/src/AthenaDriver.ts
index fe60a1dd71..aaea16c04a 100644
--- a/packages/cubejs-athena-driver/src/AthenaDriver.ts
+++ b/packages/cubejs-athena-driver/src/AthenaDriver.ts
@@ -76,7 +76,7 @@ export class AthenaDriver extends BaseDriver implements DriverInterface {
* Returns default concurrency value.
*/
public static getDefaultConcurrency(): number {
- return 5;
+ return 10;
}
private config: AthenaDriverOptionsInitialized;
diff --git a/packages/cubejs-backend-cloud/CHANGELOG.md b/packages/cubejs-backend-cloud/CHANGELOG.md
index 66ca24afb1..4e9f74cd0f 100644
--- a/packages/cubejs-backend-cloud/CHANGELOG.md
+++ b/packages/cubejs-backend-cloud/CHANGELOG.md
@@ -3,6 +3,66 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.2.14](https://github.com/cube-js/cube/compare/v1.2.13...v1.2.14) (2025-02-28)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.13](https://github.com/cube-js/cube/compare/v1.2.12...v1.2.13) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.12](https://github.com/cube-js/cube/compare/v1.2.11...v1.2.12) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.11](https://github.com/cube-js/cube/compare/v1.2.10...v1.2.11) (2025-02-25)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.10](https://github.com/cube-js/cube/compare/v1.2.9...v1.2.10) (2025-02-24)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.9](https://github.com/cube-js/cube/compare/v1.2.8...v1.2.9) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.8](https://github.com/cube-js/cube/compare/v1.2.7...v1.2.8) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.7](https://github.com/cube-js/cube/compare/v1.2.6...v1.2.7) (2025-02-20)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.6](https://github.com/cube-js/cube/compare/v1.2.5...v1.2.6) (2025-02-18)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.5](https://github.com/cube-js/cube/compare/v1.2.4...v1.2.5) (2025-02-13)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.4](/compare/v1.2.3...v1.2.4) (2025-02-11)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.3](https://github.com/cube-js/cube/compare/v1.2.2...v1.2.3) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.2](https://github.com/cube-js/cube/compare/v1.2.1...v1.2.2) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+## [1.2.1](https://github.com/cube-js/cube/compare/v1.2.0...v1.2.1) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
+# [1.2.0](https://github.com/cube-js/cube/compare/v1.1.18...v1.2.0) (2025-02-05)
+
+**Note:** Version bump only for package @cubejs-backend/cloud
+
## [1.1.17](https://github.com/cube-js/cube/compare/v1.1.16...v1.1.17) (2025-01-27)
**Note:** Version bump only for package @cubejs-backend/cloud
diff --git a/packages/cubejs-backend-cloud/package.json b/packages/cubejs-backend-cloud/package.json
index 3cd8c63ea4..ddbf6875c2 100644
--- a/packages/cubejs-backend-cloud/package.json
+++ b/packages/cubejs-backend-cloud/package.json
@@ -1,6 +1,6 @@
{
"name": "@cubejs-backend/cloud",
- "version": "1.1.17",
+ "version": "1.2.14",
"description": "Cube Cloud package",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
@@ -25,7 +25,7 @@
"devDependencies": {
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
- "@cubejs-backend/linter": "^1.0.0",
+ "@cubejs-backend/linter": "1.2.14",
"@types/fs-extra": "^9.0.8",
"@types/jest": "^27",
"jest": "^27",
@@ -33,7 +33,7 @@
},
"dependencies": {
"@cubejs-backend/dotenv": "^9.0.2",
- "@cubejs-backend/shared": "1.1.17",
+ "@cubejs-backend/shared": "1.2.14",
"chokidar": "^3.5.1",
"env-var": "^6.3.0",
"form-data": "^4.0.0",
diff --git a/packages/cubejs-backend-maven/CHANGELOG.md b/packages/cubejs-backend-maven/CHANGELOG.md
index 053f96fb62..0d6941fd06 100644
--- a/packages/cubejs-backend-maven/CHANGELOG.md
+++ b/packages/cubejs-backend-maven/CHANGELOG.md
@@ -3,6 +3,66 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.2.14](https://github.com/cube-js/cube/compare/v1.2.13...v1.2.14) (2025-02-28)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.13](https://github.com/cube-js/cube/compare/v1.2.12...v1.2.13) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.12](https://github.com/cube-js/cube/compare/v1.2.11...v1.2.12) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.11](https://github.com/cube-js/cube/compare/v1.2.10...v1.2.11) (2025-02-25)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.10](https://github.com/cube-js/cube/compare/v1.2.9...v1.2.10) (2025-02-24)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.9](https://github.com/cube-js/cube/compare/v1.2.8...v1.2.9) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.8](https://github.com/cube-js/cube/compare/v1.2.7...v1.2.8) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.7](https://github.com/cube-js/cube/compare/v1.2.6...v1.2.7) (2025-02-20)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.6](https://github.com/cube-js/cube/compare/v1.2.5...v1.2.6) (2025-02-18)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.5](https://github.com/cube-js/cube/compare/v1.2.4...v1.2.5) (2025-02-13)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.4](https://github.com/cube-js/cube/compare/v1.2.3...v1.2.4) (2025-02-11)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.3](https://github.com/cube-js/cube/compare/v1.2.2...v1.2.3) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.2](https://github.com/cube-js/cube/compare/v1.2.1...v1.2.2) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+## [1.2.1](https://github.com/cube-js/cube/compare/v1.2.0...v1.2.1) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
+# [1.2.0](https://github.com/cube-js/cube/compare/v1.1.18...v1.2.0) (2025-02-05)
+
+**Note:** Version bump only for package @cubejs-backend/maven
+
## [1.1.17](https://github.com/cube-js/cube/compare/v1.1.16...v1.1.17) (2025-01-27)
**Note:** Version bump only for package @cubejs-backend/maven
diff --git a/packages/cubejs-backend-maven/package.json b/packages/cubejs-backend-maven/package.json
index f85b12e438..734aeb31db 100644
--- a/packages/cubejs-backend-maven/package.json
+++ b/packages/cubejs-backend-maven/package.json
@@ -2,7 +2,7 @@
"name": "@cubejs-backend/maven",
"description": "Cube.js Maven Wrapper for java dependencies downloading",
"author": "Cube Dev, Inc.",
- "version": "1.1.17",
+ "version": "1.2.14",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -31,12 +31,12 @@
"dist/src/*"
],
"dependencies": {
- "@cubejs-backend/shared": "1.1.17",
+ "@cubejs-backend/shared": "1.2.14",
"source-map-support": "^0.5.19",
"xmlbuilder2": "^2.4.0"
},
"devDependencies": {
- "@cubejs-backend/linter": "^1.0.0",
+ "@cubejs-backend/linter": "1.2.14",
"@types/jest": "^27",
"@types/node": "^18",
"jest": "^27",
diff --git a/packages/cubejs-backend-native/.cargo/config.toml b/packages/cubejs-backend-native/.cargo/config.toml
index 82c8ed99a3..7000a9c841 100644
--- a/packages/cubejs-backend-native/.cargo/config.toml
+++ b/packages/cubejs-backend-native/.cargo/config.toml
@@ -1,7 +1 @@
# Please keep in sync this file with rust/cubesql!
-
-[target."x86_64-unknown-linux-gnu"]
-rustflags = ["-C", "link-arg=-fuse-ld=lld"]
-
-[target."aarch64-unknown-linux-gnu"]
-rustflags = ["-C", "link-arg=-fuse-ld=lld"]
diff --git a/packages/cubejs-backend-native/CHANGELOG.md b/packages/cubejs-backend-native/CHANGELOG.md
index a8169ed2f4..af5edddb89 100644
--- a/packages/cubejs-backend-native/CHANGELOG.md
+++ b/packages/cubejs-backend-native/CHANGELOG.md
@@ -3,6 +3,88 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.2.14](https://github.com/cube-js/cube/compare/v1.2.13...v1.2.14) (2025-02-28)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.13](https://github.com/cube-js/cube/compare/v1.2.12...v1.2.13) (2025-02-26)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.12](https://github.com/cube-js/cube/compare/v1.2.11...v1.2.12) (2025-02-26)
+
+### Bug Fixes
+
+- **native:** Jinja - pass kwargs correctly into Python ([#9276](https://github.com/cube-js/cube/issues/9276)) ([9d1c3f8](https://github.com/cube-js/cube/commit/9d1c3f8cfef5fd9383ee5fa69e79328b5c739231))
+
+## [1.2.11](https://github.com/cube-js/cube/compare/v1.2.10...v1.2.11) (2025-02-25)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.10](https://github.com/cube-js/cube/compare/v1.2.9...v1.2.10) (2025-02-24)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.9](https://github.com/cube-js/cube/compare/v1.2.8...v1.2.9) (2025-02-21)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.8](https://github.com/cube-js/cube/compare/v1.2.7...v1.2.8) (2025-02-21)
+
+### Bug Fixes
+
+- **backend-native:** Handle closed channel on Rust side ([#9242](https://github.com/cube-js/cube/issues/9242)) ([1203291](https://github.com/cube-js/cube/commit/120329146046f2bffc0b8ff252dcee1cc285d1ef))
+
+## [1.2.7](https://github.com/cube-js/cube/compare/v1.2.6...v1.2.7) (2025-02-20)
+
+### Reverts
+
+- **schema-compiler:** Revert breaking changes in models transpilation ([#9240](https://github.com/cube-js/cube/issues/9240)) ([28bca42](https://github.com/cube-js/cube/commit/28bca42a1bb92fff5895ddfe4946601c0ebc2746))
+
+## [1.2.6](https://github.com/cube-js/cube/compare/v1.2.5...v1.2.6) (2025-02-18)
+
+### Bug Fixes
+
+- **schema-compiler:** Correct models transpilation in native in multitenant environments ([#9234](https://github.com/cube-js/cube/issues/9234)) ([84f90c0](https://github.com/cube-js/cube/commit/84f90c07ee3827e6f3652dd6c9fab0993ecc8150))
+
+### Features
+
+- **schema-compiler:** Boost models transpilation 10-13x times (using SWC instead of Babel) ([#9225](https://github.com/cube-js/cube/issues/9225)) ([2dd9a4a](https://github.com/cube-js/cube/commit/2dd9a4a5ba0f178e304befc476609fc30ada8975))
+
+### Performance Improvements
+
+- **cubesql:** Avoid allocations in MetaContext methods ([#9228](https://github.com/cube-js/cube/issues/9228)) ([ba753d0](https://github.com/cube-js/cube/commit/ba753d0d43927b50d5cf8faf5f09de3e53bec3db))
+
+## [1.2.5](https://github.com/cube-js/cube/compare/v1.2.4...v1.2.5) (2025-02-13)
+
+### Features
+
+- Upgrade rust to 1.84.1 (stable) ([#9222](https://github.com/cube-js/cube/issues/9222)) ([cfc95b5](https://github.com/cube-js/cube/commit/cfc95b5e5601166d2a0aa388a211d4be66630cd8))
+
+## [1.2.4](https://github.com/cube-js/cube/compare/v1.2.3...v1.2.4) (2025-02-11)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.3](https://github.com/cube-js/cube/compare/v1.2.2...v1.2.3) (2025-02-06)
+
+### Bug Fixes
+
+- **cubejs-backend-native:** support context_to_cube_store_router_id ([#9200](https://github.com/cube-js/cube/issues/9200)) ([f93edd3](https://github.com/cube-js/cube/commit/f93edd3713c58ad62ca8daee034639b0f10a0282))
+
+## [1.2.2](https://github.com/cube-js/cube/compare/v1.2.1...v1.2.2) (2025-02-06)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
+## [1.2.1](https://github.com/cube-js/cube/compare/v1.2.0...v1.2.1) (2025-02-06)
+
+### Features
+
+- **tesseract:** Subqueries support ([#9108](https://github.com/cube-js/cube/issues/9108)) ([0dbf3bb](https://github.com/cube-js/cube/commit/0dbf3bb866b731f97b5588b0e620c3be7cbf9e5b))
+
+# [1.2.0](https://github.com/cube-js/cube/compare/v1.1.18...v1.2.0) (2025-02-05)
+
+**Note:** Version bump only for package @cubejs-backend/native
+
## [1.1.17](https://github.com/cube-js/cube/compare/v1.1.16...v1.1.17) (2025-01-27)
### Features
diff --git a/packages/cubejs-backend-native/Cargo.lock b/packages/cubejs-backend-native/Cargo.lock
index 65113ac0e7..91b325facd 100644
--- a/packages/cubejs-backend-native/Cargo.lock
+++ b/packages/cubejs-backend-native/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "Inflector"
@@ -33,7 +33,7 @@ version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
dependencies = [
- "getrandom",
+ "getrandom 0.2.11",
"once_cell",
"version_check",
]
@@ -44,7 +44,7 @@ version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"once_cell",
"version_check",
"zerocopy",
@@ -97,9 +97,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.75"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
+checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
[[package]]
name = "arc-swap"
@@ -273,7 +273,7 @@ checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
dependencies = [
"addr2line",
"cc",
- "cfg-if 1.0.0",
+ "cfg-if",
"libc",
"miniz_oxide",
"object",
@@ -328,9 +328,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.4.1"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
[[package]]
name = "bitvec"
@@ -362,7 +362,7 @@ dependencies = [
"arrayref",
"arrayvec",
"cc",
- "cfg-if 1.0.0",
+ "cfg-if",
"constant_time_eq",
]
@@ -382,7 +382,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9897ef0f1bd2362169de6d7e436ea2237dc1085d7d1e4db75f4be34d86f309d1"
dependencies = [
"borsh-derive",
- "cfg_aliases",
+ "cfg_aliases 0.1.1",
]
[[package]]
@@ -432,9 +432,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.14.0"
+version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
+checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "bytecheck"
@@ -472,20 +472,15 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "cc"
-version = "1.1.5"
+version = "1.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052"
+checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
dependencies = [
"jobserver",
"libc",
+ "shlex",
]
-[[package]]
-name = "cfg-if"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
-
[[package]]
name = "cfg-if"
version = "1.0.0"
@@ -498,11 +493,17 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
[[package]]
name = "chrono"
-version = "0.4.31"
+version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
@@ -510,7 +511,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
- "windows-targets 0.48.5",
+ "windows-targets 0.52.0",
]
[[package]]
@@ -636,7 +637,7 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
]
[[package]]
@@ -645,7 +646,7 @@ version = "0.8.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
]
[[package]]
@@ -654,7 +655,7 @@ version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.8.0",
"crossterm_winapi",
"libc",
"parking_lot",
@@ -806,7 +807,6 @@ dependencies = [
name = "cubesql"
version = "0.28.0"
dependencies = [
- "anyhow",
"arc-swap",
"async-stream",
"async-trait",
@@ -814,25 +814,22 @@ dependencies = [
"bigdecimal",
"bincode",
"bitflags 1.3.2",
- "byteorder",
"bytes",
"chrono",
"chrono-tz 0.6.3",
"comfy-table 7.1.0",
- "csv",
"cubeclient",
"datafusion",
"egg",
"futures",
"futures-core",
"futures-util",
- "hashbrown 0.14.3",
+ "hashbrown 0.14.5",
"indexmap 1.9.3",
- "itertools 0.10.5",
+ "itertools 0.14.0",
"log",
"lru",
"minijinja",
- "mockall",
"paste",
"pg-srv",
"postgres-types",
@@ -844,10 +841,9 @@ dependencies = [
"sha1_smol",
"sha2",
"simple_logger",
- "smallvec",
"sqlparser",
"tera",
- "thiserror",
+ "thiserror 2.0.11",
"tokio",
"tokio-util",
"tracing",
@@ -974,12 +970,6 @@ dependencies = [
"unicode-segmentation",
]
-[[package]]
-name = "difference"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
-
[[package]]
name = "digest"
version = "0.10.7"
@@ -992,10 +982,15 @@ dependencies = [
]
[[package]]
-name = "downcast"
-version = "0.10.0"
+name = "displaydoc"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bb454f0228b18c7f4c3b0ebbee346ed9c52e7443b0999cd543ff3571205701d"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
[[package]]
name = "egg"
@@ -1015,15 +1010,15 @@ dependencies = [
"smallvec",
"symbol_table",
"symbolic_expressions",
- "thiserror",
+ "thiserror 1.0.69",
"vectorize",
]
[[package]]
name = "either"
-version = "1.9.0"
+version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "env_logger"
@@ -1042,9 +1037,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
-version = "0.3.8"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -1079,9 +1074,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
[[package]]
name = "fastrand"
-version = "2.0.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "findshlibs"
@@ -1109,7 +1104,7 @@ checksum = "86b428b715fdbdd1c364b84573b5fdc0f84f8e423661b9f398735278bc7f2b6a"
dependencies = [
"bitflags 1.3.2",
"smallvec",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -1132,21 +1127,18 @@ dependencies = [
"miniz_oxide",
]
-[[package]]
-name = "float-cmp"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4"
-dependencies = [
- "num-traits",
-]
-
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+[[package]]
+name = "foldhash"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
+
[[package]]
name = "form_urlencoded"
version = "1.2.1"
@@ -1156,21 +1148,6 @@ dependencies = [
"percent-encoding",
]
-[[package]]
-name = "fragile"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7464c5c4a3f014d9b2ec4073650e5c06596f385060af740fc45ad5a19f959e8"
-dependencies = [
- "fragile 2.0.0",
-]
-
-[[package]]
-name = "fragile"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
-
[[package]]
name = "funty"
version = "2.0.0"
@@ -1291,9 +1268,23 @@ version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
+ "js-sys",
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.13.3+wasi-0.2.2",
+ "windows-targets 0.52.0",
]
[[package]]
@@ -1344,14 +1335,25 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.14.3"
+version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash 0.8.11",
"allocator-api2",
]
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
[[package]]
name = "heck"
version = "0.3.3"
@@ -1524,14 +1526,143 @@ dependencies = [
"cc",
]
+[[package]]
+name = "icu_collections"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_locid_transform_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+
+[[package]]
+name = "icu_normalizer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "utf16_iter",
+ "utf8_iter",
+ "write16",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
+
+[[package]]
+name = "icu_properties"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_locid_transform",
+ "icu_properties_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
+
+[[package]]
+name = "icu_provider"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_provider_macros",
+ "stable_deref_trait",
+ "tinystr",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_provider_macros"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
[[package]]
name = "idna"
-version = "0.5.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
]
[[package]]
@@ -1564,12 +1695,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.4.0"
+version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
+checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
dependencies = [
"equivalent",
- "hashbrown 0.14.3",
+ "hashbrown 0.15.2",
]
[[package]]
@@ -1584,7 +1715,7 @@ version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
]
[[package]]
@@ -1628,6 +1759,15 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
version = "1.0.10"
@@ -1724,9 +1864,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.151"
+version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
+checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "libloading"
@@ -1734,7 +1874,7 @@ version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"windows-targets 0.52.0",
]
@@ -1746,9 +1886,15 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "linux-raw-sys"
-version = "0.4.12"
+version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
+
+[[package]]
+name = "litemap"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
[[package]]
name = "lock_api"
@@ -1779,11 +1925,11 @@ dependencies = [
[[package]]
name = "lru"
-version = "0.12.1"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7"
+checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465"
dependencies = [
- "hashbrown 0.14.3",
+ "hashbrown 0.15.2",
]
[[package]]
@@ -1818,7 +1964,7 @@ version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"digest",
]
@@ -1887,37 +2033,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.48.0",
]
-[[package]]
-name = "mockall"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41cabea45a7fc0e37093f4f30a5e2b62602253f91791c057d5f0470c63260c3d"
-dependencies = [
- "cfg-if 0.1.10",
- "downcast",
- "fragile 1.2.2",
- "lazy_static",
- "mockall_derive",
- "predicates",
- "predicates-tree",
-]
-
-[[package]]
-name = "mockall_derive"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c461918bf7f59eefb1459252756bf2351a995d6bd510d0b2061bd86bcdabfa6"
-dependencies = [
- "cfg-if 0.1.10",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
[[package]]
name = "multiversion"
version = "0.6.1"
@@ -1977,12 +2096,6 @@ dependencies = [
"syn-mid",
]
-[[package]]
-name = "normalize-line-endings"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
-
[[package]]
name = "num"
version = "0.4.1"
@@ -2124,9 +2237,9 @@ version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"libc",
- "redox_syscall",
+ "redox_syscall 0.4.1",
"smallvec",
"windows-targets 0.48.5",
]
@@ -2189,7 +2302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5"
dependencies = [
"memchr",
- "thiserror",
+ "thiserror 1.0.69",
"ucd-trie",
]
@@ -2236,7 +2349,7 @@ dependencies = [
"bytes",
"chrono",
"log",
- "thiserror",
+ "thiserror 2.0.11",
"tokio",
]
@@ -2366,35 +2479,6 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
-[[package]]
-name = "predicates"
-version = "1.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f49cfaf7fdaa3bfacc6fa3e7054e65148878354a5cfddcf661df4c851f8021df"
-dependencies = [
- "difference",
- "float-cmp",
- "normalize-line-endings",
- "predicates-core",
- "regex",
-]
-
-[[package]]
-name = "predicates-core"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
-
-[[package]]
-name = "predicates-tree"
-version = "1.0.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
-dependencies = [
- "predicates-core",
- "termtree",
-]
-
[[package]]
name = "proc-macro-crate"
version = "2.0.1"
@@ -2463,7 +2547,7 @@ version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04e8453b658fe480c3e70c8ed4e3d3ec33eb74988bd186561b0cc66b85c3bc4b"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"indoc",
"libc",
"memoffset",
@@ -2545,9 +2629,9 @@ dependencies = [
[[package]]
name = "quinn"
-version = "0.11.2"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad"
+checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
dependencies = [
"bytes",
"pin-project-lite",
@@ -2555,34 +2639,39 @@ dependencies = [
"quinn-udp",
"rustc-hash",
"rustls",
- "thiserror",
+ "socket2",
+ "thiserror 2.0.11",
"tokio",
"tracing",
]
[[package]]
name = "quinn-proto"
-version = "0.11.3"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe"
+checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
dependencies = [
"bytes",
+ "getrandom 0.2.11",
"rand",
"ring",
"rustc-hash",
"rustls",
+ "rustls-pki-types",
"slab",
- "thiserror",
+ "thiserror 2.0.11",
"tinyvec",
"tracing",
+ "web-time",
]
[[package]]
name = "quinn-udp"
-version = "0.5.2"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46"
+checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944"
dependencies = [
+ "cfg_aliases 0.2.1",
"libc",
"once_cell",
"socket2",
@@ -2632,7 +2721,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "getrandom",
+ "getrandom 0.2.11",
]
[[package]]
@@ -2644,27 +2733,36 @@ dependencies = [
"bitflags 1.3.2",
]
+[[package]]
+name = "redox_syscall"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f"
+dependencies = [
+ "bitflags 2.8.0",
+]
+
[[package]]
name = "regex"
-version = "1.10.2"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
- "regex-syntax 0.8.2",
+ "regex-syntax 0.8.5",
]
[[package]]
name = "regex-automata"
-version = "0.4.3"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax 0.8.2",
+ "regex-syntax 0.8.5",
]
[[package]]
@@ -2675,9 +2773,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
-version = "0.8.2"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rend"
@@ -2742,7 +2840,7 @@ dependencies = [
"http",
"reqwest",
"serde",
- "thiserror",
+ "thiserror 1.0.69",
"tower-service",
]
@@ -2753,7 +2851,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"
dependencies = [
"cc",
- "getrandom",
+ "getrandom 0.2.11",
"libc",
"spin",
"untrusted",
@@ -2813,9 +2911,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
[[package]]
name = "rustc-hash"
-version = "1.1.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "rustc_version"
@@ -2828,11 +2926,11 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.28"
+version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316"
+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.8.0",
"errno",
"libc",
"linux-raw-sys",
@@ -2868,6 +2966,9 @@ name = "rustls-pki-types"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
+dependencies = [
+ "web-time",
+]
[[package]]
name = "rustls-webpki"
@@ -2882,9 +2983,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.14"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "ryu"
@@ -2939,18 +3040,18 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
[[package]]
name = "serde"
-version = "1.0.215"
+version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.215"
+version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
dependencies = [
"proc-macro2",
"quote",
@@ -2959,11 +3060,11 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.133"
+version = "1.0.138"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
dependencies = [
- "indexmap 2.4.0",
+ "indexmap 2.7.1",
"itoa",
"memchr",
"ryu",
@@ -2998,7 +3099,7 @@ version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"cpufeatures",
"digest",
]
@@ -3015,11 +3116,17 @@ version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"cpufeatures",
"digest",
]
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
@@ -3099,6 +3206,12 @@ dependencies = [
"log",
]
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
[[package]]
name = "static_assertions"
version = "1.1.0"
@@ -3234,6 +3347,17 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+[[package]]
+name = "synstructure"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
[[package]]
name = "tap"
version = "1.0.1"
@@ -3248,15 +3372,16 @@ checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a"
[[package]]
name = "tempfile"
-version = "3.8.1"
+version = "3.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5"
+checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"fastrand",
- "redox_syscall",
+ "getrandom 0.3.1",
+ "once_cell",
"rustix",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -3276,25 +3401,39 @@ dependencies = [
]
[[package]]
-name = "termtree"
-version = "0.4.1"
+name = "thiserror"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
[[package]]
name = "thiserror"
-version = "1.0.50"
+version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
+checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
dependencies = [
- "thiserror-impl",
+ "thiserror-impl 2.0.11",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.50"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
dependencies = [
"proc-macro2",
"quote",
@@ -3307,7 +3446,7 @@ version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"once_cell",
]
@@ -3333,6 +3472,16 @@ dependencies = [
"threadpool",
]
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
[[package]]
name = "tinyvec"
version = "1.6.0"
@@ -3466,7 +3615,7 @@ version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
dependencies = [
- "indexmap 2.4.0",
+ "indexmap 2.7.1",
"toml_datetime",
"winnow",
]
@@ -3551,7 +3700,7 @@ dependencies = [
"log",
"rand",
"sha1",
- "thiserror",
+ "thiserror 1.0.69",
"url",
"utf-8",
]
@@ -3683,9 +3832,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.0"
+version = "2.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
dependencies = [
"form_urlencoded",
"idna",
@@ -3698,13 +3847,25 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+[[package]]
+name = "utf16_iter"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
+
+[[package]]
+name = "utf8_iter"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+
[[package]]
name = "uuid"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [
- "getrandom",
+ "getrandom 0.2.11",
]
[[package]]
@@ -3713,7 +3874,7 @@ version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560"
dependencies = [
- "getrandom",
+ "getrandom 0.2.11",
"serde",
]
@@ -3757,13 +3918,28 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+[[package]]
+name = "wasi"
+version = "0.13.3+wasi-0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
+dependencies = [
+ "wit-bindgen-rt",
+]
+
+[[package]]
+name = "wasite"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
+
[[package]]
name = "wasm-bindgen"
version = "0.2.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"wasm-bindgen-macro",
]
@@ -3788,7 +3964,7 @@ version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"js-sys",
"wasm-bindgen",
"web-sys",
@@ -3833,6 +4009,16 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "web-time"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
[[package]]
name = "webpki-roots"
version = "0.26.3"
@@ -3844,11 +4030,12 @@ dependencies = [
[[package]]
name = "whoami"
-version = "1.4.1"
+version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50"
+checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d"
dependencies = [
- "wasm-bindgen",
+ "redox_syscall 0.5.9",
+ "wasite",
"web-sys",
]
@@ -4039,10 +4226,31 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if",
"windows-sys 0.48.0",
]
+[[package]]
+name = "wit-bindgen-rt"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
+dependencies = [
+ "bitflags 2.8.0",
+]
+
+[[package]]
+name = "write16"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
+
+[[package]]
+name = "writeable"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+
[[package]]
name = "wyz"
version = "0.5.1"
@@ -4052,6 +4260,30 @@ dependencies = [
"tap",
]
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
[[package]]
name = "zerocopy"
version = "0.7.32"
@@ -4072,12 +4304,55 @@ dependencies = [
"syn 2.0.90",
]
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
[[package]]
name = "zeroize"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+[[package]]
+name = "zerovec"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
[[package]]
name = "zstd"
version = "0.11.2+zstd.1.5.2"
diff --git a/packages/cubejs-backend-native/Cargo.toml b/packages/cubejs-backend-native/Cargo.toml
index 37ddb4094c..ba826fda48 100644
--- a/packages/cubejs-backend-native/Cargo.toml
+++ b/packages/cubejs-backend-native/Cargo.toml
@@ -36,8 +36,11 @@ minijinja = { version = "1", features = ["json", "loader"] }
once_cell = "1.10"
# python
pyo3 = { version = "0.20.0", features = [], optional = true }
-pyo3-asyncio = { version = "0.20.0", features = ["tokio-runtime", "attributes"], optional = true }
-serde = { version = "1.0.209", features = ["derive"] }
+pyo3-asyncio = { version = "0.20.0", features = [
+ "tokio-runtime",
+ "attributes",
+], optional = true }
+serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.127"
simple_logger = "1.7.0"
tokio = { version = "1", features = ["full", "rt"] }
diff --git a/packages/cubejs-backend-native/js/index.ts b/packages/cubejs-backend-native/js/index.ts
index f6c54477f4..eec5c7370d 100644
--- a/packages/cubejs-backend-native/js/index.ts
+++ b/packages/cubejs-backend-native/js/index.ts
@@ -101,6 +101,23 @@ export type SQLInterfaceOptions = {
gatewayPort?: number,
};
+export interface TransformConfig {
+ fileName: string;
+ transpilers: string[];
+ compilerId: string;
+ metaData?: {
+ cubeNames: string[];
+ cubeSymbols: Record>;
+ contextSymbols: Record;
+ }
+}
+
+export interface TransformResponse {
+ code: string;
+ errors: string[];
+ warnings: string[];
+}
+
export type DBResponsePrimitive =
null |
boolean |
@@ -275,7 +292,23 @@ function wrapNativeFunctionWithStream(
if (!!response && !!response.stream) {
response.stream.destroy(e);
}
- writerOrChannel.reject(errorString(e));
+
+ try {
+ writerOrChannel.reject(errorString(e));
+ } catch (rejectError) {
+ // This is async function, just for usability, it's return value is not expected anywhere
+ // Rust part does not care for returned promises, so we should take care here to avoid unhandled rejections
+ // `writerOrChannel.reject` can throw when channel is already dropped by Rust side
+ // This can happen directly, when drop happened between creating channel and calling `reject`,
+ // or indirectly, when drop happened between creating channel and calling `resolve`, resolve raised an exception
+ // that was caught here
+ // There's nothing we can do, or should do with this: there's nobody to respond to
+ if (process.env.CUBEJS_NATIVE_INTERNAL_DEBUG) {
+ console.debug('[js] writerOrChannel.reject exception', {
+ e: rejectError,
+ });
+ }
+ }
}
};
}
@@ -405,6 +438,16 @@ export const getFinalQueryResultMulti = (transformDataArr: Object[], rows: any[]
return native.getFinalQueryResultMulti(transformDataArr, rows, responseData);
};
+export const transpileJs = async (content: String, metadata: TransformConfig): Promise => {
+ const native = loadNative();
+
+ if (native.transpileJs) {
+ return native.transpileJs(content, metadata);
+ }
+
+ throw new Error('TranspileJs native implementation not found!');
+};
+
export interface PyConfiguration {
repositoryFactory?: (ctx: unknown) => Promise,
logger?: (msg: string, params: Record) => void,
diff --git a/packages/cubejs-backend-native/package.json b/packages/cubejs-backend-native/package.json
index 45861acb7d..fcb932a815 100644
--- a/packages/cubejs-backend-native/package.json
+++ b/packages/cubejs-backend-native/package.json
@@ -1,6 +1,6 @@
{
"name": "@cubejs-backend/native",
- "version": "1.1.17",
+ "version": "1.2.14",
"author": "Cube Dev, Inc.",
"description": "Native module for Cube.js (binding to Rust codebase)",
"main": "dist/js/index.js",
@@ -34,7 +34,7 @@
"dist/js"
],
"devDependencies": {
- "@cubejs-backend/linter": "^1.0.0",
+ "@cubejs-backend/linter": "1.2.14",
"@types/jest": "^27",
"@types/node": "^18",
"cargo-cp-artifact": "^0.1.9",
@@ -44,8 +44,8 @@
"uuid": "^8.3.2"
},
"dependencies": {
- "@cubejs-backend/cubesql": "1.1.17",
- "@cubejs-backend/shared": "1.1.17",
+ "@cubejs-backend/cubesql": "1.2.14",
+ "@cubejs-backend/shared": "1.2.14",
"@cubejs-infra/post-installer": "^0.0.7"
},
"resources": {
diff --git a/packages/cubejs-backend-native/python/cube/src/__init__.py b/packages/cubejs-backend-native/python/cube/src/__init__.py
index e8b52ab046..6a49f9545e 100644
--- a/packages/cubejs-backend-native/python/cube/src/__init__.py
+++ b/packages/cubejs-backend-native/python/cube/src/__init__.py
@@ -62,6 +62,7 @@ class Configuration:
logger: Callable
context_to_app_id: Union[str, Callable[[RequestContext], str]]
context_to_orchestrator_id: Union[str, Callable[[RequestContext], str]]
+ context_to_cube_store_router_id: Union[str, Callable[[RequestContext], str]]
driver_factory: Callable[[RequestContext], Dict]
external_driver_factory: Callable[[RequestContext], Dict]
db_type: Union[str, Callable[[RequestContext], str]]
@@ -108,6 +109,7 @@ def __init__(self):
self.logger = None
self.context_to_app_id = None
self.context_to_orchestrator_id = None
+ self.context_to_cube_store_router_id = None
self.driver_factory = None
self.external_driver_factory = None
self.db_type = None
diff --git a/packages/cubejs-backend-native/rust-toolchain.toml b/packages/cubejs-backend-native/rust-toolchain.toml
index 13598fb83c..d9f5179de3 100644
--- a/packages/cubejs-backend-native/rust-toolchain.toml
+++ b/packages/cubejs-backend-native/rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
-channel = "nightly-2024-07-15"
+channel = "1.84.1"
components = ["rustfmt", "clippy"]
-profile = "minimal"
\ No newline at end of file
+profile = "minimal"
diff --git a/packages/cubejs-backend-native/src/cross/clrepr.rs b/packages/cubejs-backend-native/src/cross/clrepr.rs
index 9c6f4d3f4a..9e0b17b256 100644
--- a/packages/cubejs-backend-native/src/cross/clrepr.rs
+++ b/packages/cubejs-backend-native/src/cross/clrepr.rs
@@ -15,18 +15,24 @@ use std::collections::hash_map::{IntoIter, Iter, Keys};
use std::collections::HashMap;
use std::sync::Arc;
+#[derive(Debug, Clone)]
+pub enum CLReprObjectKind {
+ Object,
+ KWargs,
+}
+
#[derive(Clone)]
-pub struct CLReprObject(pub(crate) HashMap);
+pub struct CLReprObject(pub(crate) HashMap, CLReprObjectKind);
impl Default for CLReprObject {
fn default() -> Self {
- Self::new()
+ Self::new(CLReprObjectKind::Object)
}
}
impl CLReprObject {
- pub fn new() -> Self {
- Self(HashMap::new())
+ pub fn new(kind: CLReprObjectKind) -> Self {
+ Self(HashMap::new(), kind)
}
pub fn get(&self, key: &str) -> Option<&CLRepr> {
@@ -110,6 +116,15 @@ pub enum CLRepr {
Null,
}
+impl CLRepr {
+ pub fn is_kwarg(&self) -> bool {
+ match self {
+ CLRepr::Object(obj) => matches!(obj.1, CLReprObjectKind::KWargs),
+ _ => false,
+ }
+ }
+}
+
impl std::fmt::Display for CLRepr {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(&self, f)
@@ -179,7 +194,7 @@ impl CLRepr {
Ok(CLRepr::Array(r))
} else if from.is_a::(cx) {
- let mut obj = CLReprObject::new();
+ let mut obj = CLReprObject::new(CLReprObjectKind::Object);
let v = from.downcast_or_throw::(cx)?;
let properties = v.get_own_property_names(cx)?;
diff --git a/packages/cubejs-backend-native/src/cross/clrepr_python.rs b/packages/cubejs-backend-native/src/cross/clrepr_python.rs
index 3a834dba55..9712206845 100644
--- a/packages/cubejs-backend-native/src/cross/clrepr_python.rs
+++ b/packages/cubejs-backend-native/src/cross/clrepr_python.rs
@@ -1,5 +1,5 @@
use crate::cross::clrepr::CLReprObject;
-use crate::cross::{CLRepr, StringType};
+use crate::cross::{CLRepr, CLReprObjectKind, StringType};
use pyo3::exceptions::{PyNotImplementedError, PyTypeError};
use pyo3::types::{
PyBool, PyComplex, PyDate, PyDict, PyFloat, PyFrame, PyFunction, PyInt, PyList, PySequence,
@@ -16,15 +16,9 @@ pub enum PythonRef {
PyExternalFunction(Py),
}
-pub trait CLReprPython: Sized {
- fn from_python_ref(v: &PyAny) -> Result;
- fn into_py_impl(from: CLRepr, py: Python) -> Result;
- fn into_py(self, py: Python) -> Result;
-}
-
-impl CLReprPython for CLRepr {
+impl CLRepr {
/// Convert python value to CLRepr
- fn from_python_ref(v: &PyAny) -> Result {
+ pub fn from_python_ref(v: &PyAny) -> Result {
if v.is_none() {
return Ok(Self::Null);
}
@@ -47,7 +41,7 @@ impl CLReprPython for CLRepr {
Self::Int(i)
} else if v.get_type().is_subclass_of::()? {
let d = v.downcast::()?;
- let mut obj = CLReprObject::new();
+ let mut obj = CLReprObject::new(CLReprObjectKind::Object);
for (k, v) in d.iter() {
if k.get_type().is_subclass_of::()? {
@@ -126,6 +120,16 @@ impl CLReprPython for CLRepr {
})
}
+ fn into_py_dict_impl(obj: CLReprObject, py: Python) -> Result<&PyDict, PyErr> {
+ let r = PyDict::new(py);
+
+ for (k, v) in obj.into_iter() {
+ r.set_item(k, Self::into_py_impl(v, py)?)?;
+ }
+
+ Ok(r)
+ }
+
fn into_py_impl(from: CLRepr, py: Python) -> Result {
Ok(match from {
CLRepr::String(v, _) => PyString::new(py, &v).to_object(py),
@@ -155,11 +159,7 @@ impl CLReprPython for CLRepr {
PyTuple::new(py, elements).to_object(py)
}
CLRepr::Object(obj) => {
- let r = PyDict::new(py);
-
- for (k, v) in obj.into_iter() {
- r.set_item(k, Self::into_py_impl(v, py)?)?;
- }
+ let r = Self::into_py_dict_impl(obj, py)?;
r.to_object(py)
}
@@ -189,7 +189,19 @@ impl CLReprPython for CLRepr {
})
}
- fn into_py(self, py: Python) -> Result {
+ pub fn into_py_dict(self, py: Python) -> Result<&PyDict, PyErr> {
+ Ok(match self {
+ CLRepr::Object(obj) => Self::into_py_dict_impl(obj, py)?,
+ other => {
+ return Err(PyErr::new::(format!(
+ "Unable to convert {:?} into PyDict",
+ other.kind()
+ )))
+ }
+ })
+ }
+
+ pub fn into_py(self, py: Python) -> Result {
Self::into_py_impl(self, py)
}
}
diff --git a/packages/cubejs-backend-native/src/cross/mod.rs b/packages/cubejs-backend-native/src/cross/mod.rs
index 39c4ad999e..8f9bbc4649 100644
--- a/packages/cubejs-backend-native/src/cross/mod.rs
+++ b/packages/cubejs-backend-native/src/cross/mod.rs
@@ -4,7 +4,7 @@ mod clrepr_python;
#[cfg(feature = "python")]
mod py_in_js;
-pub use clrepr::{CLRepr, CLReprKind, CLReprObject, StringType};
+pub use clrepr::{CLRepr, CLReprKind, CLReprObject, CLReprObjectKind, StringType};
#[cfg(feature = "python")]
-pub use clrepr_python::{CLReprPython, PythonRef};
+pub use clrepr_python::PythonRef;
diff --git a/packages/cubejs-backend-native/src/lib.rs b/packages/cubejs-backend-native/src/lib.rs
index 6828507554..60104692c6 100644
--- a/packages/cubejs-backend-native/src/lib.rs
+++ b/packages/cubejs-backend-native/src/lib.rs
@@ -1,7 +1,6 @@
-#![feature(async_closure)]
-#![feature(thread_id_value)]
#![allow(clippy::result_large_err)]
+#[cfg(feature = "python")]
extern crate findshlibs;
pub mod auth;
diff --git a/packages/cubejs-backend-native/src/node_export.rs b/packages/cubejs-backend-native/src/node_export.rs
index 5d4eb73320..802076279c 100644
--- a/packages/cubejs-backend-native/src/node_export.rs
+++ b/packages/cubejs-backend-native/src/node_export.rs
@@ -18,7 +18,7 @@ use crate::stream::OnDrainHandler;
use crate::tokio_runtime_node;
use crate::transport::NodeBridgeTransport;
use crate::utils::batch_to_rows;
-use cubenativeutils::wrappers::neon::context::ContextHolder;
+use cubenativeutils::wrappers::neon::context::neon_run_with_guarded_lifetime;
use cubenativeutils::wrappers::neon::inner_types::NeonInnerTypes;
use cubenativeutils::wrappers::neon::object::NeonObject;
use cubenativeutils::wrappers::object_handle::NativeObjectHandle;
@@ -462,37 +462,29 @@ pub fn setup_logger(mut cx: FunctionContext) -> JsResult {
//============ sql planner ===================
fn build_sql_and_params(cx: FunctionContext) -> JsResult {
- //IMPORTANT It seems to be safe here, because context lifetime is bound to function, but this
- //context should be used only inside function
- let mut cx = extend_function_context_lifetime(cx);
- let options = cx.argument::(0)?;
-
- let neon_context_holder = ContextHolder::new(cx);
-
- let options = NativeObjectHandle::>>::new(
- NeonObject::new(neon_context_holder.clone(), options),
- );
-
- let context_holder =
- NativeContextHolder::>>::new(
+ neon_run_with_guarded_lifetime(cx, |neon_context_holder| {
+ let options =
+ NativeObjectHandle::>>::new(NeonObject::new(
+ neon_context_holder.clone(),
+ neon_context_holder
+ .with_context(|cx| cx.argument::(0))
+ .unwrap()?,
+ ));
+
+ let context_holder = NativeContextHolder::>>::new(
neon_context_holder,
);
- let base_query_options = Rc::new(NativeBaseQueryOptions::from_native(options).unwrap());
+ let base_query_options = Rc::new(NativeBaseQueryOptions::from_native(options).unwrap());
- let base_query = BaseQuery::try_new(context_holder.clone(), base_query_options).unwrap();
+ let base_query = BaseQuery::try_new(context_holder.clone(), base_query_options).unwrap();
- //arg_clrep.into_js(&mut cx)
- let res = base_query.build_sql_and_params().unwrap();
-
- let result: NeonObject<'static, FunctionContext<'static>> = res.into_object();
- let result = result.into_object();
-
- Ok(result)
-}
+ let res = base_query.build_sql_and_params();
-fn extend_function_context_lifetime<'a>(cx: FunctionContext<'a>) -> FunctionContext<'static> {
- unsafe { std::mem::transmute::, FunctionContext<'static>>(cx) }
+ let result: NeonObject> = res.into_object();
+ let result = result.into_object();
+ Ok(result)
+ })
}
fn debug_js_to_clrepr_to_js(mut cx: FunctionContext) -> JsResult {
diff --git a/packages/cubejs-backend-native/src/node_obj_deserializer.rs b/packages/cubejs-backend-native/src/node_obj_deserializer.rs
index d9ed815682..9f10790cfd 100644
--- a/packages/cubejs-backend-native/src/node_obj_deserializer.rs
+++ b/packages/cubejs-backend-native/src/node_obj_deserializer.rs
@@ -41,7 +41,7 @@ impl<'a, 'b> JsValueDeserializer<'a, 'b> {
}
}
-impl<'de, 'a, 'b> Deserializer<'de> for JsValueDeserializer<'a, 'b> {
+impl<'de> Deserializer<'de> for JsValueDeserializer<'_, '_> {
type Error = JsDeserializationError;
fn deserialize_any(self, visitor: V) -> Result
@@ -294,7 +294,7 @@ impl<'a, 'b> JsObjectDeserializer<'a, 'b> {
// `MapAccess` is provided to the `Visitor` to give it the ability to iterate
// through entries of the map.
-impl<'de, 'a, 'b> MapAccess<'de> for JsObjectDeserializer<'a, 'b> {
+impl<'de> MapAccess<'de> for JsObjectDeserializer<'_, '_> {
type Error = JsDeserializationError;
fn next_key_seed(&mut self, seed: K) -> Result