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

Postgres table name limit on preaggregation tables #907

Closed
lvauvillier opened this issue Jul 28, 2020 · 1 comment
Closed

Postgres table name limit on preaggregation tables #907

lvauvillier opened this issue Jul 28, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@lvauvillier
Copy link
Contributor

Describe the bug

Postgres has a limitation of 64 chars for table names.
Generated pre-aggregation table names can reach this limit:

        Schema        |                              Name                               | Type  |  Owner   
----------------------+-----------------------------------------------------------------+-------+----------
 stb_pre_aggregations | impressions_advertiser_count_by_day20200601_hnkacipl_vhthxxhc_1 | table | postgres
 stb_pre_aggregations | impressions_advertiser_count_by_day20200701_wzp3uyld_qnhk3tsr_1 | table | postgres
 stb_pre_aggregations | impressions_publisher_count_by_day20200601_kmpd5gs3_x0zn2l0v_15 | table | postgres
 stb_pre_aggregations | impressions_publisher_count_by_day20200701_1zpylxe_uma3nxf1_159 | table | postgres
 stb_pre_aggregations | requests_fill_rate_by_day20200601_5ypc2raf_gevo3jro_15954312366 | table | postgres
 stb_pre_aggregations | requests_fill_rate_by_day20200701_jsp0kf3_d4klpmk1_159572190821 | table | postgres

In this case, timestamps are not valids and runs issue in preaggregation computations.

Maybe generate a fixed hash for the (cube, preAggregationName) part to avoid reaching this limit?

Version:
[0.19.39]

@vasilev-alex vasilev-alex added the bug Something isn't working label Jul 28, 2020
@vasilev-alex
Copy link
Member

hey @lvauvillier! Thanks for posting this one. There's a similar issue #86.

As a workaround you can use sqlAlias for member names https://cube.dev/docs/cube#parameters-sql-alias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants