简体   繁体   English

cube.js 能否用于访问原始数据和聚合数据?

[英]Can cube.js be used to access raw data as well as aggregated data?

For example, if I have a Postgres table with columns for sensor_id, temperature and time_recorded, would I still be able to generate a chart that shows temperature (y) over time (x)?例如,如果我有一个包含 sensor_id、temperature 和 time_recorded 列的 Postgres 表,我是否仍然能够生成一个显示温度 (y) 随时间 (x) 变化的图表?

Yes, that's possible with 2 steps:是的,这可以通过 2 个步骤实现:

  1. defining a data schema for that table.为该表定义数据模式
  2. define a query to get data from that data schema.定义查询以从该数据模式中获取数据

after retrieving the data you can feed it to the chart library of your choice.检索数据后,您可以将其提供给您选择的图表库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM