cube-js/cube

Format does not return on the REST API when querying a view

Open

#7,444 创建于 2023年11月21日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Rust (1,965 fork)batch import
data modeling:viewshelp wanted

仓库指标

Star
 (19,563 star)
PR 合并指标
 (平均合并 5天 16小时) (30 天内合并 138 个 PR)

描述

Describe the bug If you add the format field to a metric on a cube and then include that metric in a view, the format field is not returned in the API /meta or /query response for the view. Format is included in for the metric on the cube - just not the view.

To Reproduce Steps to reproduce the behaviour:

  1. Create a cube with one or more metrics
  2. Add format: currency or format: percent to the metrics
  3. Create a view that includes the metrics in 1)
  4. Make a request to the /meta or /query endpoints on the REST API.
  5. You will see the format field is returned for the cube but not the view.

Expected behaviour I would expect the format field to be included in the annotations object of the /query response if I query the view. Otherwise, it is not possible to apply the format on the client.

Additional context Both description and meta fields are carried through to the view response from the underlying cube.

贡献者指南