getStreamTables

Syntax

getStreamTables([option=0])

Details

Get the information of specified stream tables.

Parameters

option (optional) is an integral scalar indicating the type of the stream table to be obtained. It can take the following values:

  • 0: all stream tables;

  • 1: persisted stream tables;

  • 2: non-persisted stream tables;

Returns

It returns a table containing the following columns:

  • name: Table name.
  • shared: Whether the table is shared.
  • persisted: Whether the table is persisted.
  • cachePurgeEnabled: Whether cache purge is enabled.
  • loaded: Whether the table is loaded into memory.
  • columns: The number of columns.
  • rowsInMemory: The number of rows in memory.
  • totalRows: The total number of rows.
  • memoryUsed: Memory used (in bytes).
  • accessControlEnabled: Whether access control has been configured for the table using addAccessControl. A value of true indicates that access control has been enabled, while false indicates that it has not been configured.

Note: If the persisted table has not been loaded to memory, only "name", "persisted", and "loaded" columns are returned. Null values are returned for the rest of columns.

Examples

id=`XOM`GS`AAPL;
x=102.1 33.4 73.6;

rt=streamTable(id, x);
share streamTable(10:0,`time`sym`price`volume,[TIMESTAMP,SYMBOL,DOUBLE,INT]) as trades1;
share streamTable(10:0,`time`sym`price`volume,[TIMESTAMP,SYMBOL,DOUBLE,INT]) as trades2;

getStreamTables()

Output:

name shared persisted cachePurgeEnabled loaded columns rowsInMemory totalRows memoryUsed accessControlEnabled
rt false false false true 2 3 3 152 false
trades1 true false false true 4 0 0 240 false
trades2 true false false true 4 0 0 240 false