Addition of SQL_ALIAS property to Dimension/Measure
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Is your feature request related to a problem? Please describe.**
Columns with long identifiers that work in Postgres do not work in cube - cube has a feature SQL_ALIAS on the cube, which is great and can work to shorten the overall identifier, but Cube is combining the table and column identifier into one Alias, and if a column name is close to 63 chars, the query can still fail with the "You requested hidden member:" [error](https://github.com/cube-js/cube/blob/bfc0708502f78902e481608b4f83c2eee6182636/packages/cubejs-api-gateway/src/helpers/transformData.ts#L239)
**Describe the solution you'd like**
I'd like a sql_alias property on the column (dimension/measure) as well (or maybe a backend automated md5 aliasing) - this feature might be helpful elsewhere / for other dbs as well - not certain
**Describe alternatives you've considered**
Shortening column names! But... things are complicated
**Additional context**
Add any other context or screenshots about the feature request here.
Below are the files I used to test this. With some guidance and buy-in on this request I'd be willing to take a crack at it.
[sql_view_temp_column_identifier_length.txt](https://github.com/cube-js/cube/files/15136730/sql_view_temp_column_identifier_length.txt)
[yml_model_test_numbers.txt](https://github.com/cube-js/cube/files/15136731/yml_model_test_numbers.txt)
Thanks Cube team
Contributor guide
Assessment
This issue has not been assessed yet.