Skip to content

rebie-bigdata/dimension-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dimension-builder

针对以下的场景 0. A=2,B=3,0<P<5

  1. 根据C分组
  2. 从表a,b中取维度
    • a.D
    • a.D when E=1
    • a.D when E=2
    • b.D
  3. 结果表结构为
C a.D a.D when E=1 a.D when E=2 b.D
C1 10 2 3 7
C2 8 4 2 6
  1. 要求a,b满足:字段C,D必须存在
  2. 传输状态的json
{
  "group_by": [
    "C"
  ],
  "order_by": [],
  "limit": null,
  "where": {
    "type": "and",
    "left": {
      "type": "value",
      "sub_type": "discrete",
      "field": "A",
      "value": 2
    },
    "right": {
      "type": "and",
      "left": {
        "type": "value",
        "sub_type": "discrete",
        "field": "B",
        "value": 3
      },
      "right": {
        "type": "value",
        "sub_type": "range",
        "field": "P",
        "lower_bound": "0",
        "upper_bound": "5"
      }
    }
  },
  "fields": [
    {
      "table": "a",
      "field": "D",
      "name": "D"
    },
    {
      "table": "a",
      "field": "D",
      "name": "D1",
      "where": {
        "type": "value",
        "sub_type": "discrete",
        "field": "E",
        "value": 1
      }
    },
    {
      "table": "a",
      "field": "D",
      "name": "D2",
      "where": {
        "type": "value",
        "sub_type": "discrete",
        "field": "E",
        "value": 2
      }
    },
    {
      "table": "b",
      "field": "D",
      "name": "bD"
    }
  ]
}

About

维度构建者

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages