Define virtual partitions by assigning a calendar
To virtually partition time series data, a time series calendar must be assigned to the time series virtual table in a data mart. Use the ifx_TSDW_setCalendar() routine to assign a calendar to a time series virtual table in a specific data mart.
The calendar definition includes a start time stamp and an interval size. Time series data in the virtual table with a time stamp earlier than the calendar start time stamp is not included in the data mart. The calendar interval size defines the size of the virtual partition.
You can create a calendar or use an existing calendar, for example
a built-in calendar. Typically, you use a calendar for virtual partitions
that has a significantly longer interval than the calendar for the
time series. For example, you can create a calendar where the start
time stamp is January 2010 and the interval size is one month. You
can assign it to a time series virtual table, by running the following
statements:
insert into calendartable (c_name, c_calendar) values
('2010monthly', 'startdate(2010-01-01 00:00:00.00000),
pattstart(2010-01-01 00:00:00.00000), pattern({1 on},month)');
execute function ifx_TSDW_setCalendar('demo_dwa', 'demo_mart',
'informix', 'ts_data_v', '2010monthly');
Important: You must assign a calendar to a time series
virtual table before the data mart is initially loaded (the data mart
must be in LoadPending state). To specify a different calendar after
the data mart is initially loaded, you must drop and recreate the
data mart.
After a calendar is assigned to the time series virtual table and
the data mart has been loaded, the time series data on the accelerator
is arranged in virtual partitions: