cube-js / cube

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

Schema creation automation #1354

Open nagmo opened 3 years ago

nagmo commented 3 years ago

is there a way to create the schema automatically? in Looker for example when you connect the DB you get an automatic view per table and fields are defined as measures or dimensions by default. is there any way to do that on cube? (other then implementing it ourselves)

paveltiunov commented 3 years ago

Hey @nagmo ! Have you tried to generate schema in Playground?

chicco785 commented 3 years ago

@paveltiunov in our case the playground won't help much, in the sense that yes it generate the schemas, but as far I understand you still have to save then the resulting file in the app and restart id. It would be nice to have a functionality similar to the query builder for react dashboard apps. I.e. a SchemaBuilder. Suppose you need a new cube because you added a new table, it would be nice to have the possibility to create such cube schema from the app and store it in the GraphQL backend.

paveltiunov commented 3 years ago

@chicco785 Makes sense. This is certainly outside of our roadmap as of right now. Cube.js provides easy ways to generate a schema based on external definitions: https://cube.dev/docs/schema-execution-environment#async-module.

I'd leave this one open for community contribution. Looking forward to PRs here!