ifx_TSDW_createWindow() function

The ifx_TSDW_createWindow function creates a time window to limit the amount of time series data in a time series virtual table of a data mart.

Syntax

ifx_TSDW_createWindow(accelerator_name varchar(128),
                      datamart_name   varchar(128),
                      table_owner      varchar(32),
                      table_name       varchar(128),
                      begin_index      integer,
                      end_index        integer)
returns lvarchar;

ifx_TSDW_createWindow(accelerator_name varchar(128),
                      datamart_name   varchar(128),
                      table_owner      varchar(32),
                      table_name       varchar(128),
                      begin_stamp      datetime year to fraction(5),
                      end_stamp        datetime year to fraction(5))
returns lvarchar;
accelerator_name
The name of the accelerator.
datamart_name
The name of the data mart.
schema_owner
The owner of the table.
table_name
The name of the table.
begin_index
The calendar index that identifies the first virtual partition that is included in the time window. The value must be greater than or equal 0.
end_index
The calendar index that identifies the first virtual partition that is excluded in the time window. The value must be greater than begin_index.
begin_stamp
The time stamp that identifies the first virtual partition included in the time window. The value must be greater than or equal to the start time stamp of the calendar that is assigned to the table.
end_stamp
The time stamp that identifies the first virtual partition that is excluded in the time window. The value must identify a virtual partition that is greater than the virtual partition identified by begin_stamp.

Usage

Run the ifx_TSDW_createWindow() function to create a time window for a time series virtual table in a data mart.

You must create the first time window before the data mart is initially loaded, with the state of the data mart in LoadPending. You can create subsequent time windows either before or after the data mart is initially loaded, with the state of the data mart in LoadPending or Active.

If a time window is created in an active data mart, the time series data is loaded immediately. Depending on the volume of data, this load can take a significant amount of time.

Return values

The ifx_TSDW_createWindow() function returns the text string "The operation was completed successfully." or an error message.

Example

The following examples create time windows for the time series virtual table named 'informix'.'ts_data_v' in data mart named 'datamart_name' on accelerator named 'demo_dwa'. A calendar with a start time stamp of '2010-01-01 00:00:00.00000' and a pattern of one month is set for this table.

The following example creates a time window that includes January and February 2011:
execute function ifx_TSDW_createWindow(
  'demo_dwa', 'datamart_name', 'informix', 'ts_data_v',
  '2011-01'::datetime year to month, '2011-03'::datetime year to month);
The following example creates a time window that includes March and April 2011:
execute function ifx_TSDW_createWindow(
  'demo_dwa', 'datamart_name', 'informix', 'ts_data_v', 14, 16);