Open TobiasMaehl-pIX opened 11 months ago
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.
This also affects me. I have a number of expensive underlying queries that it would be great to accelerate with originalsql preaggs. It would be particularly great if the tables could be aliased with a view with a consistent name, as then they could also be queried outside of cube.
I was able to reproduce this with Cube v0.36.2 (latest), same behavior as reported:
Describe the bug We would like to reuse an original_sql pre-aggregation stored in Postgres in a rollup pre-aggregation. Setting
use_original_sql_pre_aggregations: true
fails with the following error message during scheduled refresh:When I introspect the database, I can see that Cube appends certain hashes to the original_sql table name. Those hashes are missing in the sql query to the database, which causes it to fail.
Expected behavior It should be possible to reuse the original_sql pre-aggregation stored in Postgres, as stated in the docs. We have a heavy sql query in the original data model.
Minimally reproducible Cube Schema
Version: 0.34.19