TSL_FlushInfo function

The TSL_FlushInfo function returns information about the last flush operation that saved data to disk.

Syntax

TSL_FlushInfo(
           handle      lvarchar)
returns TSL_FlushInfo_r 
handle
The table and column name combination that was included in a TSL_Flush, TSL_FlushAll, or TSL_Commit function.

Usage

Use the TSL_FlushInfo function to view information about the last time that time series data for the specified table and column name was saved to disk as part of a loader program. You can flush data to disk with the TSL_Flush, TSL_FlushAll, or TSL_Commit function. You must run the TSL_FlushInfo function in the context of a loader session that was initialized by the TSL_Init function.

Returns

A row type that has the following format:

TSL_FlushInfo_r
(
   containers   integer,
   elements     integer,
   duplicates   integer,
   instance_ids integer,
   commits      integer,
   rollbacks    integer,
   exceptions   integer,
   errors       integer
);
containers
The number of containers that were affected by the flush.
elements
The number of elements that were affected by the flush.
duplicates
The number of duplicate values that were inserted for irregular time series, if the writeflag value was 1 or 257.
instance_ids
The number of time series instances that were affected by the flush.
commits
The number of committed transactions, for the TSL_Commit function. For the TSL_Flush and TSL_FlushAll functions, this number is always 0.
rollbacks
For the TSL_Commit function, whether transactions were rolled back:
0 = no rolled back transactions
1 = a transaction was interrupted by the user
exceptions
The number of exceptions that were raised during the flush. For example, attempting to insert an element that has a timestamp that is before the origin results in an exception. Attempting to save data into a container that does not have enough available space also results in an exception.
errors
The number of errors in the load operation. For example, incorrectly formatted input data results in an error.

Example

The following statement returns the results of the TSL_FlushInfo function as a table:

SELECT mr.*
FROM TABLE(TSL_FlushInfo('ts_data|raw_reads')) AS TAB(mr);

containers   4
elements     198458
duplicates   0
instance_ids 522
commits      4
rollbacks    0
exceptions   0
errors       0