Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions packages/cubejs-testing-drivers/fixtures/_schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@
"name": "Customers",
"relationship": "belongs_to",
"sql": "{CUBE}.customer_id = {Customers}.customer_id"
},
{
"name": "RetailCalendar",
"relationship": "many_to_one",
"sql": "{CUBE}.order_date = {RetailCalendar.date_val}"
}
],
"dimensions": [
Expand Down Expand Up @@ -389,6 +394,36 @@
"type": "prior"
}]
},
{
"name": "totalCountRetailYearAgo",
"type": "number",
"sql": "{count}",
"multi_stage": true,
"time_shift": [{
"interval": "1 year",
"type": "prior"
}]
},
{
"name": "totalCountRetailMonthAgo",
"type": "number",
"sql": "{count}",
"multi_stage": true,
"time_shift": [{
"interval": "1 month",
"type": "prior"
}]
},
{
"name": "totalCountRetailWeekAgo",
"type": "number",
"sql": "{count}",
"multi_stage": true,
"time_shift": [{
"interval": "1 week",
"type": "prior"
}]
},
{
"name": "totalProfitForStatus",
"type": "sum",
Expand Down Expand Up @@ -462,6 +497,55 @@
}
}
]
},
{
"name": "RetailCalendar",
"calendar": true,
"dimensions": [
{
"name": "date_val",
"sql": "date_val",
"type": "time",
"primary_key": true,
"shown": true
},
{
"name": "retail_date",
"sql": "date_val",
"type": "time",
"granularities": [
{
"name": "week",
"sql": "{CUBE}.retail_week_begin_date"
},
{
"name": "quarter",
"sql": "{CUBE}.retail_quarter_begin_date"
},
{
"name": "year",
"sql": "{CUBE}.retail_year_begin_date"
}
],
"timeShift": [
{
"interval": "1 month",
"type": "prior",
"sql": "{CUBE}.retail_date_prev_month"
},
{
"interval": "1 quarter",
"type": "prior",
"sql": "{CUBE}.retail_date_prev_quarter"
},
{
"interval": "1 year",
"type": "prior",
"sql": "{CUBE}.retail_date_prev_year"
}
]
}
]
}
]
}
9 changes: 7 additions & 2 deletions packages/cubejs-testing-drivers/fixtures/athena.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"products": "products",
"customers": "customers",
"ecommerce": "ecommerce",
"bigecommerce": "bigecommerce"
"bigecommerce": "bigecommerce",
"retailcalendar": "retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -150,6 +151,9 @@
"week granularity is not supported for intervals",
"querying BigECommerce: rolling window by 2 week",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"Custom Granularities ",
Expand Down Expand Up @@ -203,6 +207,7 @@
"querying BigECommerce: rolling window YTD (month + week + no gran)",
"querying BigECommerce: rolling window YTD without granularity",
"SQL API: Rolling Window YTD (year + month + day + date_trunc equal)",
"SQL API: Rolling Window YTD (year + month + day + date_trunc IN)"
"SQL API: Rolling Window YTD (year + month + day + date_trunc IN)",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo"
]
}
6 changes: 5 additions & 1 deletion packages/cubejs-testing-drivers/fixtures/bigquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"products": "test.products",
"customers": "test.customers",
"ecommerce": "test.ecommerce",
"bigecommerce": "test.bigecommerce"
"bigecommerce": "test.bigecommerce",
"retailcalendar": "test.retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -164,6 +165,9 @@
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"SKIPPED SQL API (Need work)",
Expand Down
6 changes: 5 additions & 1 deletion packages/cubejs-testing-drivers/fixtures/clickhouse.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
"products": "products",
"customers": "customers",
"ecommerce": "ecommerce",
"bigecommerce": "bigecommerce"
"bigecommerce": "bigecommerce",
"retailcalendar": "retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -201,6 +202,9 @@
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"Custom Granularities ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
"products": "products",
"customers": "customers",
"ecommerce": "ecommerce",
"bigecommerce": "bigecommerce"
"bigecommerce": "bigecommerce",
"retailcalendar": "retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -217,6 +218,9 @@
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"Custom Granularities ",
Expand Down
6 changes: 5 additions & 1 deletion packages/cubejs-testing-drivers/fixtures/mssql.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"products": "products",
"customers": "customers",
"ecommerce": "ecommerce",
"bigecommerce": "bigecommerce"
"bigecommerce": "bigecommerce",
"retailcalendar": "retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -143,6 +144,9 @@
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"SKIPPED SQL API (Need work)",
Expand Down
6 changes: 5 additions & 1 deletion packages/cubejs-testing-drivers/fixtures/mysql.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"products": "products",
"customers": "customers",
"ecommerce": "ecommerce",
"bigecommerce": "bigecommerce"
"bigecommerce": "bigecommerce",
"retailcalendar": "retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -139,6 +140,9 @@
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"Custom Granularities ",
Expand Down
8 changes: 6 additions & 2 deletions packages/cubejs-testing-drivers/fixtures/postgres.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"products": "products",
"customers": "customers",
"ecommerce": "ecommerce",
"bigecommerce": "bigecommerce"
"bigecommerce": "bigecommerce",
"retailcalendar": "retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -163,7 +164,10 @@
"querying BigECommerce: rolling window by 2 day without date range",
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range"
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo"
],
"tesseractSkip": [
"querying Products: dimensions -- doesn't work wo ordering",
Expand Down
6 changes: 5 additions & 1 deletion packages/cubejs-testing-drivers/fixtures/redshift.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"products": "public.products",
"customers": "public.customers",
"ecommerce": "public.ecommerce",
"bigecommerce": "public.bigecommerce"
"bigecommerce": "public.bigecommerce",
"retailcalendar": "public.retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -175,6 +176,9 @@
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range",
"querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo",

"---------------------------------------",
"SKIPPED SQL API (Need work) ",
Expand Down
8 changes: 6 additions & 2 deletions packages/cubejs-testing-drivers/fixtures/snowflake.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
"products": "public.products",
"customers": "public.customers",
"ecommerce": "public.ecommerce",
"bigecommerce": "public.bigecommerce"
"bigecommerce": "public.bigecommerce",
"retailcalendar": "public.retailcalendar"
},
"preAggregations": {
"Products": [],
Expand Down Expand Up @@ -239,6 +240,9 @@
"---------------------------------------",
"querying BigECommerce: rolling window by 2 day without date range",
"querying BigECommerce: rolling window by 2 month without date range",
"querying BigECommerce: rolling window YTD without date range"
"querying BigECommerce: rolling window YTD without date range",
"querying BigECommerce with Retail Calendar: totalCountRetailYearAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailMonthAgo",
"querying BigECommerce with Retail Calendar: totalCountRetailWeekAgo"
]
}
Loading
Loading