Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-external preaggregations do not function when using ClickHouse Cloud #7438

Closed
maxehmookau opened this issue Nov 20, 2023 · 2 comments
Closed
Labels
driver:clickhouse Issues related to the ClickHouse driver enhancement New feature proposal help wanted Community contributions are welcome. pre-aggregations Issues related to pre-aggregations

Comments

@maxehmookau
Copy link

Describe the bug

When creating a pre-aggregation and not using cubestore, but using ClickHouse Cloud (ClickHouse's IaaS platform) to store the pre-aggregation the creation fails.

As a result, it is impossible to define internal preaggregations using ClickHouse when using ClickHouse Cloud.

To Reproduce

  1. Use ClickHouse Cloud to store some data and create a simple Cube schema to model that data.
  2. Define a preaggregation but do not use cubestore. Define external: false so that the pre-aggregation is stored in ClickHouse.
  3. Notice that the creation fails because CREATE AS SELECT statements are not supported in ClickHouse Cloud. (See Compatibility Guide)

Expected behavior
The pre-aggregation should be created in the ClickHouse Cloud database as expected.

Possible fixes

  • This line will need to be changed. The CREATE AS SELECT statement can be replaced with two statements, one to create the table and another to populate it. However, this method only accepts a single query.
  • Because it inherits from BaseQuery, it may require a more extensive refactor.
@igorlukanin igorlukanin added driver:clickhouse Issues related to the ClickHouse driver pre-aggregations Issues related to pre-aggregations enhancement New feature proposal help wanted Community contributions are welcome. labels Nov 30, 2023
Copy link

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you.
If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines.
You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

@igorlukanin
Copy link
Member

It is recommended to use Cube Store for storing pre-aggregations: https://cube.dev/docs/product/caching/using-pre-aggregations#pre-aggregations-storage

@igorlukanin igorlukanin closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver:clickhouse Issues related to the ClickHouse driver enhancement New feature proposal help wanted Community contributions are welcome. pre-aggregations Issues related to pre-aggregations
Projects
None yet
Development

No branches or pull requests

2 participants