Skip to content

Commit

Permalink
extend testing fixtures with custom granularities
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon committed Aug 28, 2024
1 parent d535a44 commit 4ba0696
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions packages/cubejs-testing-drivers/fixtures/_schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,23 @@
{
"name": "orderDate",
"sql": "order_date",
"type": "time"
"type": "time",
"granularities": [
{
"name": "half_year",
"interval": "6 months"
},
{
"name": "half_year_by_1st_april",
"interval": "6 months",
"offset": "3 months"
},
{
"name": "month_days_hours_by_15th_march",
"interval": "1 month 2 days 3 hours",
"origin": "2020-03-15"
}
]
},
{
"name": "completedDate",
Expand Down Expand Up @@ -167,6 +183,27 @@
"sql": "profit",
"type": "sum",
"shown": false
},
{
"name": "rollingCountByTrailing2Day",
"type": "count",
"rollingWindow": {
"trailing": "2 day"
}
},
{
"name": "rollingCountByLeading2Day",
"type": "count",
"rollingWindow": {
"leading": "3 day"
}
},
{
"name": "rollingCountByUnbounded",
"type": "count",
"rollingWindow": {
"trailing": "unbounded"
}
}
]
},
Expand Down Expand Up @@ -367,4 +404,4 @@
]
}
]
}
}

0 comments on commit 4ba0696

Please sign in to comment.