0

The cubejs is great.

I can use api which is '/playground/generate-schema' to generate schema automatically.It works great.

But now I want to add meta to dimensions like this:

--- before ---
dimensions:{
...
    level: {
        sql: `level`,
        type: `number`
    },
...

--- after --- 
dimensions:{
...
    level: {
        sql: `level`,
        type: `number`,
        meta:{
            dict:'alarmlevel'
        }
    },
...

}

What should I do ?

radiorz
  • 1,459
  • 4
  • 18
  • 36
  • Hi Cube.js already supports adding meta properties to [dimensions](https://cube.dev/docs/dimensions#parameters-meta) and [measures](https://cube.dev/docs/measures#parameters-meta). Is there a bug you're encountering, or did I misunderstand your question? – Hassan Khan Feb 04 '21 at 20:09
  • Thanks for your comment.How can I add meta properties to dimensions and measures by coding? Is there a API or something helpful? – radiorz Feb 05 '21 at 01:08
  • Perhaps you could try using [Dynamic Schema Generation](https://cube.dev/docs/schema/dynamic-schema-creation) using `asyncModule()` instead?. – Hassan Khan Feb 05 '21 at 16:49

0 Answers0