From 0d72c8aaac236fed08af3e49e3e83c695ffa9111 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Wed, 27 Mar 2024 14:02:23 +0100 Subject: [PATCH 1/2] docs: Extract Rollup Designer page --- docs/pages/product/workspace/_meta.js | 1 + docs/pages/product/workspace/data-model.mdx | 27 ++++++-- docs/pages/product/workspace/playground.mdx | 42 +++--------- .../product/workspace/rollup-designer.mdx | 65 +++++++++++++++++++ 4 files changed, 94 insertions(+), 41 deletions(-) create mode 100644 docs/pages/product/workspace/rollup-designer.mdx diff --git a/docs/pages/product/workspace/_meta.js b/docs/pages/product/workspace/_meta.js index 300c2ae31e31d..de3ebfa431951 100644 --- a/docs/pages/product/workspace/_meta.js +++ b/docs/pages/product/workspace/_meta.js @@ -1,6 +1,7 @@ module.exports = { "playground": "Playground", "data-model": "Data Model", + "rollup-designer": "Rollup Designer", "dev-mode": "Development mode", "semantic-layer-sync": "Semantic Layer Sync", "sql-runner": "SQL Runner", diff --git a/docs/pages/product/workspace/data-model.mdx b/docs/pages/product/workspace/data-model.mdx index dbd1ba457f087..b5c8d1535404d 100644 --- a/docs/pages/product/workspace/data-model.mdx +++ b/docs/pages/product/workspace/data-model.mdx @@ -120,16 +120,27 @@ want to delete, then open the switcher and click Remove Branch: alt="Delete a branch" /> -## Generating models +## Generating data model files -Cube Cloud supports generating models from a data source after the initial -deployment creation. The Generate Data Model on the Data -Model page will let you re-generate models from your source database, or -alternatively add rollups to existing data models: +You can generate data model files when [creating a new +deployment][ref-creating-deployment] or at later moment. To open the data model +wizard, click on the ... button on the right and select Generate +data model: + +## Creating pre-aggregations + +If you'd like to use the UI to create a pre-aggregation, you can click on the +... button on the right and select Add rollup to open +[Rollup Designer][ref-rollup-designer]: + + [ref-data-modeling]: /product/data-modeling/overview @@ -137,3 +148,5 @@ alternatively add rollups to existing data models: [ref-joins]: /reference/data-model/joins [ref-join-types]: /reference/data-model/joins#relationship [wiki-erd]: https://en.wikipedia.org/wiki/Entity–relationship_model +[ref-rollup-designer]: /product/workspace/rollup-designer +[ref-creating-deployment]: /product/deployment/cloud/deployments#creating-a-new-deployment \ No newline at end of file diff --git a/docs/pages/product/workspace/playground.mdx b/docs/pages/product/workspace/playground.mdx index 55aa7ecdd9c9b..54d4af21bf6c0 100644 --- a/docs/pages/product/workspace/playground.mdx +++ b/docs/pages/product/workspace/playground.mdx @@ -93,47 +93,21 @@ To see the SQL generated by a query, click Generated SQL: If you're using Cube Cloud, you can copy this SQL and run it in your data source using the [SQL Runner][ref-workspace-sqlrunner]. -## Using the Rollup Designer +## Accelerating queries -The Rollup Designer provides an easy way to create and edit -[pre-aggregations][ref-caching-preaggs-gs] from within the Playground. For -example, when you execute a query that has no matching pre-aggregations, the -Playground also displays some information above the results: +When you execute a query that has no matching [pre-aggregations][ref-caching-preaggs-gs], +you would see this notificaton. Clicking on it will open [Rollup +Designer][ref-rollup-designer] that would help you create a pre-aggregation +to accelerate the query: - -Clicking Query was not accelerated with pre-aggregation will open the -Rollup Designer with a suggested pre-aggregation that will accelerate the query: - - - -If desired, you can also modify settings such as the [refresh -key][ref-preaggs-ref-refreshkey], the [partition -granularity][ref-preaggs-ref-partitiongranularity], and -[indexes][ref-preaggs-ref-indexes] to further optimize the pre-aggregation by -clicking the ​Settings tab: - - - -Click Add to the Data Schema to add the pre-aggregation to the data -model. You can then run the query again to see the results: - - [cube-cloud]: https://cube.dev/cloud [ref-dev-mode]: /product/configuration [ref-devtools-ide]: /cloud/dev-tools/cube-ide [ref-caching-preaggs-gs]: /product/caching/getting-started-pre-aggregations -[ref-preaggs-ref-refreshkey]: - /reference/data-model/pre-aggregations#refresh_key -[ref-preaggs-ref-partitiongranularity]: - /reference/data-model/pre-aggregations#partition_granularity -[ref-preaggs-ref-indexes]: - /reference/data-model/pre-aggregations#indexes [ref-workspace-sqlrunner]: /product/workspace/sql-runner +[ref-rollup-designer]: /product/workspace/rollup-designer \ No newline at end of file diff --git a/docs/pages/product/workspace/rollup-designer.mdx b/docs/pages/product/workspace/rollup-designer.mdx new file mode 100644 index 0000000000000..66c649db2e9da --- /dev/null +++ b/docs/pages/product/workspace/rollup-designer.mdx @@ -0,0 +1,65 @@ +# Rollup Designer + +Rollup Designer provides an easy way to create and edit +[pre-aggregations][ref-caching-preaggs-gs]. + + + +Rollup Designer is available in Cube Cloud on [all tiers](https://cube.dev/pricing). + + + +## Identifying slow queries + +You can identify queries that might be accelerated with pre-aggregations in +[Playground][ref-playground] and [Query History][ref-query-history]. + +You can also access Rollup Designer from [Data Model][ref-data-model]. + +### Playground + +When you execute a query in [Playground][ref-playground] that has no matching +pre-aggregations, you would see this notificaton. Clicking on it will open +Rollup Designer with a suggested pre-aggregation: + + + +### Query History + +When you browse a query in [Query History][ref-query-history] that has no matching +pre-aggregations, you would see this notificaton. Clicking on Accelerate +will open Rollup Designer with a suggested pre-aggregation: + + + +## Creating pre-aggregations + +When you open Rollup Designer from Playground or Query History, it will suggest +a pre-aggregation accelerating the query in question: + + + +If desired, you can also modify settings such as the [refresh +key][ref-preaggs-ref-refreshkey], the [partition +granularity][ref-preaggs-ref-partitiongranularity], and +[indexes][ref-preaggs-ref-indexes] to further optimize the pre-aggregation by +clicking the ​Settings tab: + + + +Click Add to the Data Schema to add the pre-aggregation to the data +model. + +[ref-caching-preaggs-gs]: /product/caching/getting-started-pre-aggregations +[ref-preaggs-ref-refreshkey]: /reference/data-model/pre-aggregations#refresh_key +[ref-preaggs-ref-partitiongranularity]: /reference/data-model/pre-aggregations#partition_granularity +[ref-preaggs-ref-indexes]: /reference/data-model/pre-aggregations#indexes +[ref-playground]: /product/workspace/playground +[ref-query-history]: /product/workspace/query-history +[ref-data-model]: /product/workspace/data-model \ No newline at end of file From 70473f9bd3a74cd511b17eba881b76e425252c9a Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Wed, 27 Mar 2024 14:11:30 +0100 Subject: [PATCH 2/2] Detail file backup --- docs/pages/product/workspace/data-model.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/pages/product/workspace/data-model.mdx b/docs/pages/product/workspace/data-model.mdx index b5c8d1535404d..85b7bd0941e28 100644 --- a/docs/pages/product/workspace/data-model.mdx +++ b/docs/pages/product/workspace/data-model.mdx @@ -132,6 +132,13 @@ data model: src="https://ucarecdn.com/0f9684c2-a7f5-48a2-9fac-32e050beba5d/" /> +It is safe to generate data model files for tables that already have matching cubes. +In that case, existing files will be renamed by appending `.backup` to their names. +You would also be able to review changes to files on the Changes tab: + + + + ## Creating pre-aggregations If you'd like to use the UI to create a pre-aggregation, you can click on the