SQL generated by schema should persist the pre-agg schema name

I have a Pre-Agg schema that when generated - generates with table name : test_main_uhm13bdy_dfffzjty_1g3qn84
Currenlty, when I use cube SQL generation, it yields me query as -
SELECT test.bucket test__bucket FROM test_main AS test GROUP BY 1 ORDER BY 1 ASC LIMIT 10000
Ideally it should refer the schema generated name as I want to leverage cube SQL generation to extend it to do some custom calculations which is done in a service, which I cannot do currently

Hey Tanvi!

Currently, pre-aggregation names are not designed to be exposed as those are determined at query time and there’re some consistency guarantees that hard to propagate outside of Cube.js. However, we’re considering some ways to provide this.

Could you please elaborate a little bit on your use case here? Do you want to do some machine learning on top of pre-aggregated data?

1 Like