You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I want to partition my activity data month-wise. However, cubejs is combining data of more than 1 months in this manner:
Oct 2024 -> From 1 Oct 2024 to 17 Dec 2024.
Nov 2024 -> From 1 Oct 2024 to 17 Dec 2024.
Dec 2024 -> From 1 Oct 2024 to 17 Dec 2024
Expected behavior
It should store only one month data in one partition:
Oct 2024 -> From 1 Oct 2024 to 31 Oct 2024.
Nov 2024 -> From 1 Nov 2024 to 30 Nov 2024.
Dec 2024 -> From 1 Dec 2024 to 17 Dec 2024
cube(`Activity`,{sql: `SELECT id, user_id, type, activity_time, remarks, modified_date FROM public.activity where company = ${COMPILE_CONTEXT.securityContext.companyId} and ${FILTER_PARAMS.Activity.activityTime.filter('activity_time')} `,pre_aggregations: {main: {type: `original_sql`,external: false,time_dimension: CUBE.activityTime,partition_granularity: `month`,allow_non_strict_date_range_match: true,refresh_key: {every: `1 hour`,sql: `SELECT MAX(t.modified_date) FROM public.activity where company = ${COMPILE_CONTEXT.securityContext.companyId} and ${FILTER_PARAMS.Activity.activityTime.filter('activity_time')}`,},build_range_start: {sql: `SELECT date_trunc('month', NOW()) - interval '2 year'`},build_range_end: {sql: `SELECT date_trunc('month', NOW()) + interval '1 month'`}}},measures: {count: {type: `count`}},dimensions: {id: {sql: `id`,type: `number`,primaryKey: true},type: {sql: `type`,type: `string`},remarks: {sql: `remarks`,type: `string`},activityTime: {sql: `activity_time`,type: `time`}}});
"preAggregationsSchema":"pre_x","loadSql":["CREATE TABLE pre_x.activity_main20241001 AS SELECT id, user_id, remarks, activity_time, modified_date FROM public.activity where tenant = x and ((activity_time >= $1::timestamptz AND activity_time <= $2::timestamptz))\n ",["2024-10-01T00:00:00.000Z","2024-12-31T23:59:59.999Z"],{}]
It is sending wrong parameter in $2. It should be 2024-10-31T23:59:59 instead.
Describe the bug
I want to partition my activity data month-wise. However, cubejs is combining data of more than 1 months in this manner:
Oct 2024 -> From 1 Oct 2024 to 17 Dec 2024.
Nov 2024 -> From 1 Oct 2024 to 17 Dec 2024.
Dec 2024 -> From 1 Oct 2024 to 17 Dec 2024
Expected behavior
It should store only one month data in one partition:
Oct 2024 -> From 1 Oct 2024 to 31 Oct 2024.
Nov 2024 -> From 1 Nov 2024 to 30 Nov 2024.
Dec 2024 -> From 1 Dec 2024 to 17 Dec 2024
Request:
{"query":{"limit":10,"offset":0,"order":{},"timeDimensions":[{"dimension":"Activity.activityTime","granularity":"day","dateRange":"This Quarter"}],"dimensions":["Activity.id"],"measures":["Activity.count"],"filters":[],"renewQuery":false},"queryType":"multi"}
Result:
Activity ID Count
100 3
101 3
102 3
Version:
1.0.0 to 1.0.7
The text was updated successfully, but these errors were encountered: