File tree Expand file tree Collapse file tree 17 files changed +1509
-14
lines changed
packages/cubejs-testing-drivers Expand file tree Collapse file tree 17 files changed +1509
-14
lines changed Original file line number Diff line number Diff line change 258258 "name" : " Customers" ,
259259 "relationship" : " belongs_to" ,
260260 "sql" : " {CUBE}.customer_id = {Customers}.customer_id"
261+ },
262+ {
263+ "name" : " RetailCalendar" ,
264+ "relationship" : " many_to_one" ,
265+ "sql" : " {CUBE}.order_date = {RetailCalendar.date_val}"
261266 }
262267 ],
263268 "dimensions" : [
389394 "type" : " prior"
390395 }]
391396 },
397+ {
398+ "name" : " totalCountRetailYearAgo" ,
399+ "type" : " number" ,
400+ "sql" : " {count}" ,
401+ "multi_stage" : true ,
402+ "time_shift" : [{
403+ "interval" : " 1 year" ,
404+ "type" : " prior"
405+ }]
406+ },
407+ {
408+ "name" : " totalCountRetailMonthAgo" ,
409+ "type" : " number" ,
410+ "sql" : " {count}" ,
411+ "multi_stage" : true ,
412+ "time_shift" : [{
413+ "interval" : " 1 month" ,
414+ "type" : " prior"
415+ }]
416+ },
417+ {
418+ "name" : " totalCountRetailWeekAgo" ,
419+ "type" : " number" ,
420+ "sql" : " {count}" ,
421+ "multi_stage" : true ,
422+ "time_shift" : [{
423+ "interval" : " 1 week" ,
424+ "type" : " prior"
425+ }]
426+ },
392427 {
393428 "name" : " totalProfitForStatus" ,
394429 "type" : " sum" ,
462497 }
463498 }
464499 ]
500+ },
501+ {
502+ "name" : " RetailCalendar" ,
503+ "calendar" : true ,
504+ "dimensions" : [
505+ {
506+ "name" : " date_val" ,
507+ "sql" : " date_val" ,
508+ "type" : " time" ,
509+ "primary_key" : true ,
510+ "shown" : true
511+ },
512+ {
513+ "name" : " retail_date" ,
514+ "sql" : " date_val" ,
515+ "type" : " time" ,
516+ "granularities" : [
517+ {
518+ "name" : " week" ,
519+ "sql" : " {CUBE}.retail_week_begin_date"
520+ },
521+ {
522+ "name" : " quarter" ,
523+ "sql" : " {CUBE}.retail_quarter_begin_date"
524+ },
525+ {
526+ "name" : " year" ,
527+ "sql" : " {CUBE}.retail_year_begin_date"
528+ }
529+ ],
530+ "timeShift" : [
531+ {
532+ "interval" : " 1 month" ,
533+ "type" : " prior" ,
534+ "sql" : " {CUBE}.retail_date_prev_month"
535+ },
536+ {
537+ "interval" : " 1 quarter" ,
538+ "type" : " prior" ,
539+ "sql" : " {CUBE}.retail_date_prev_quarter"
540+ },
541+ {
542+ "interval" : " 1 year" ,
543+ "type" : " prior" ,
544+ "sql" : " {CUBE}.retail_date_prev_year"
545+ }
546+ ]
547+ }
548+ ]
465549 }
466550 ]
467551}
Original file line number Diff line number Diff line change 3434 "products" : " products" ,
3535 "customers" : " customers" ,
3636 "ecommerce" : " ecommerce" ,
37- "bigecommerce" : " bigecommerce"
37+ "bigecommerce" : " bigecommerce" ,
38+ "retailcalendar" : " retailcalendar"
3839 },
3940 "preAggregations" : {
4041 "Products" : [],
150151 " week granularity is not supported for intervals" ,
151152 " querying BigECommerce: rolling window by 2 week" ,
152153 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
154+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
155+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
156+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
153157
154158 " ---------------------------------------" ,
155159 " Custom Granularities " ,
203207 " querying BigECommerce: rolling window YTD (month + week + no gran)" ,
204208 " querying BigECommerce: rolling window YTD without granularity" ,
205209 " SQL API: Rolling Window YTD (year + month + day + date_trunc equal)" ,
206- " SQL API: Rolling Window YTD (year + month + day + date_trunc IN)"
210+ " SQL API: Rolling Window YTD (year + month + day + date_trunc IN)" ,
211+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo"
207212 ]
208213}
Original file line number Diff line number Diff line change 3636 "products" : " test.products" ,
3737 "customers" : " test.customers" ,
3838 "ecommerce" : " test.ecommerce" ,
39- "bigecommerce" : " test.bigecommerce"
39+ "bigecommerce" : " test.bigecommerce" ,
40+ "retailcalendar" : " test.retailcalendar"
4041 },
4142 "preAggregations" : {
4243 "Products" : [],
164165 " querying BigECommerce: rolling window by 2 month without date range" ,
165166 " querying BigECommerce: rolling window YTD without date range" ,
166167 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
168+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
169+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
170+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
167171
168172 " ---------------------------------------" ,
169173 " SKIPPED SQL API (Need work)" ,
Original file line number Diff line number Diff line change 7474 "products" : " products" ,
7575 "customers" : " customers" ,
7676 "ecommerce" : " ecommerce" ,
77- "bigecommerce" : " bigecommerce"
77+ "bigecommerce" : " bigecommerce" ,
78+ "retailcalendar" : " retailcalendar"
7879 },
7980 "preAggregations" : {
8081 "Products" : [],
201202 " querying BigECommerce: rolling window by 2 month without date range" ,
202203 " querying BigECommerce: rolling window YTD without date range" ,
203204 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
205+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
206+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
207+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
204208
205209 " ---------------------------------------" ,
206210 " Custom Granularities " ,
Original file line number Diff line number Diff line change 9696 "products" : " products" ,
9797 "customers" : " customers" ,
9898 "ecommerce" : " ecommerce" ,
99- "bigecommerce" : " bigecommerce"
99+ "bigecommerce" : " bigecommerce" ,
100+ "retailcalendar" : " retailcalendar"
100101 },
101102 "preAggregations" : {
102103 "Products" : [],
217218 " querying BigECommerce: rolling window by 2 month without date range" ,
218219 " querying BigECommerce: rolling window YTD without date range" ,
219220 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
221+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
222+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
223+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
220224
221225 " ---------------------------------------" ,
222226 " Custom Granularities " ,
Original file line number Diff line number Diff line change 4343 "products" : " products" ,
4444 "customers" : " customers" ,
4545 "ecommerce" : " ecommerce" ,
46- "bigecommerce" : " bigecommerce"
46+ "bigecommerce" : " bigecommerce" ,
47+ "retailcalendar" : " retailcalendar"
4748 },
4849 "preAggregations" : {
4950 "Products" : [],
143144 " querying BigECommerce: rolling window by 2 month without date range" ,
144145 " querying BigECommerce: rolling window YTD without date range" ,
145146 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
147+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
148+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
149+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
146150
147151 " ---------------------------------------" ,
148152 " SKIPPED SQL API (Need work)" ,
Original file line number Diff line number Diff line change 4343 "products" : " products" ,
4444 "customers" : " customers" ,
4545 "ecommerce" : " ecommerce" ,
46- "bigecommerce" : " bigecommerce"
46+ "bigecommerce" : " bigecommerce" ,
47+ "retailcalendar" : " retailcalendar"
4748 },
4849 "preAggregations" : {
4950 "Products" : [],
139140 " querying BigECommerce: rolling window by 2 month without date range" ,
140141 " querying BigECommerce: rolling window YTD without date range" ,
141142 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
143+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
144+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
145+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
142146
143147 " ---------------------------------------" ,
144148 " Custom Granularities " ,
Original file line number Diff line number Diff line change 4242 "products" : " products" ,
4343 "customers" : " customers" ,
4444 "ecommerce" : " ecommerce" ,
45- "bigecommerce" : " bigecommerce"
45+ "bigecommerce" : " bigecommerce" ,
46+ "retailcalendar" : " retailcalendar"
4647 },
4748 "preAggregations" : {
4849 "Products" : [],
163164 " querying BigECommerce: rolling window by 2 day without date range" ,
164165 " querying BigECommerce: rolling window by 2 month without date range" ,
165166 " querying BigECommerce: rolling window YTD without date range" ,
166- " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range"
167+ " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
168+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
169+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
170+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo"
167171 ],
168172 "tesseractSkip" : [
169173 " querying Products: dimensions -- doesn't work wo ordering" ,
Original file line number Diff line number Diff line change 4747 "products" : " public.products" ,
4848 "customers" : " public.customers" ,
4949 "ecommerce" : " public.ecommerce" ,
50- "bigecommerce" : " public.bigecommerce"
50+ "bigecommerce" : " public.bigecommerce" ,
51+ "retailcalendar" : " public.retailcalendar"
5152 },
5253 "preAggregations" : {
5354 "Products" : [],
175176 " querying BigECommerce: rolling window by 2 month without date range" ,
176177 " querying BigECommerce: rolling window YTD without date range" ,
177178 " querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range" ,
179+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
180+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
181+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo" ,
178182
179183 " ---------------------------------------" ,
180184 " SKIPPED SQL API (Need work) " ,
Original file line number Diff line number Diff line change 120120 "products" : " public.products" ,
121121 "customers" : " public.customers" ,
122122 "ecommerce" : " public.ecommerce" ,
123- "bigecommerce" : " public.bigecommerce"
123+ "bigecommerce" : " public.bigecommerce" ,
124+ "retailcalendar" : " public.retailcalendar"
124125 },
125126 "preAggregations" : {
126127 "Products" : [],
239240 " ---------------------------------------" ,
240241 " querying BigECommerce: rolling window by 2 day without date range" ,
241242 " querying BigECommerce: rolling window by 2 month without date range" ,
242- " querying BigECommerce: rolling window YTD without date range"
243+ " querying BigECommerce: rolling window YTD without date range" ,
244+ " querying BigECommerce with Retail Calendar: totalCountRetailYearAgo" ,
245+ " querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo" ,
246+ " querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo"
243247 ]
244248}
You can’t perform that action at this time.
0 commit comments