cube icon indicating copy to clipboard operation
cube copied to clipboard

Addition of SQL_ALIAS property to Dimension/Measure

Open theblinkingusb opened this issue 1 year ago • 1 comments

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

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 yml_model_test_numbers.txt

Thanks Cube team

theblinkingusb avatar Apr 27 '24 01:04 theblinkingusb

(related: https://github.com/cube-js/cube/issues/4727)

theblinkingusb avatar Apr 27 '24 01:04 theblinkingusb