Skip to content

Commit 4ba0696

Browse files
committed
extend testing fixtures with custom granularities
1 parent d535a44 commit 4ba0696

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

packages/cubejs-testing-drivers/fixtures/_schemas.json

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,23 @@
8888
{
8989
"name": "orderDate",
9090
"sql": "order_date",
91-
"type": "time"
91+
"type": "time",
92+
"granularities": [
93+
{
94+
"name": "half_year",
95+
"interval": "6 months"
96+
},
97+
{
98+
"name": "half_year_by_1st_april",
99+
"interval": "6 months",
100+
"offset": "3 months"
101+
},
102+
{
103+
"name": "month_days_hours_by_15th_march",
104+
"interval": "1 month 2 days 3 hours",
105+
"origin": "2020-03-15"
106+
}
107+
]
92108
},
93109
{
94110
"name": "completedDate",
@@ -167,6 +183,27 @@
167183
"sql": "profit",
168184
"type": "sum",
169185
"shown": false
186+
},
187+
{
188+
"name": "rollingCountByTrailing2Day",
189+
"type": "count",
190+
"rollingWindow": {
191+
"trailing": "2 day"
192+
}
193+
},
194+
{
195+
"name": "rollingCountByLeading2Day",
196+
"type": "count",
197+
"rollingWindow": {
198+
"leading": "3 day"
199+
}
200+
},
201+
{
202+
"name": "rollingCountByUnbounded",
203+
"type": "count",
204+
"rollingWindow": {
205+
"trailing": "unbounded"
206+
}
170207
}
171208
]
172209
},
@@ -367,4 +404,4 @@
367404
]
368405
}
369406
]
370-
}
407+
}

0 commit comments

Comments
 (0)