cube-js / cube

📊 Cube — The Semantic Layer for Building Data Applications
https://cube.dev
Other
17.94k stars 1.78k forks source link

Validate column existence in database #6601

Open florianMalbranque opened 1 year ago

florianMalbranque commented 1 year ago

Hey folks 👋 !

Is your feature request related to a problem? Please describe. As a cube JS user, i am frustrated not being able to confront my cube definition vs actual tables layout in database

Describe the solution you'd like Ideally, a CLI command npx cube-js validate-table-layout would generate 1 SQL query per cube and 1 SQL query per view then dry run (Where 1=2) it against a given database to check column existence

Describe alternatives you've considered I considered to build my own validation using a python script but it's cumberstone and would not benefit cube nor the comunity

Additional context Such feature exist for Looker for example

igorlukanin commented 1 year ago

Hey @florianMalbranque 👋 Thanks for submitting this feature request. I think this is a great idea. However, the implementation might be not very trivial considering that the data model might be dynamic and it can also depend on the security context (incoming query).

florianMalbranque commented 1 year ago

Hey ! didn't tough about that, indeed, It makes the implementation not trivial at all. Would you think it would be more trivial to start with static cubes ? Is it even possible ?

github-actions[bot] commented 1 year 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.