getStreamTables
Syntax
getStreamTables([option=0])
Arguments
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;
Details
Get the information of specified stream tables. It returns a table containing the following columns:
-
name: the table name;
-
shared: is shared or not;
-
persisted: is persisted or not;
-
loaded: loaded to memory or not;
-
columns: the number of columns;
-
rowsInMemory: the number of rows loaded to memory;
-
totalRows: the total number of rows;
-
memoryUsed: memory used (in bytes).
Note: If the persisted table has not been loaded to memory, only "name", "persisted", and "loaded" columns are returned. NULLs 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 loaded columns rowsInMemory totalRows memoryUsed
rt false false true 2 3 3 152
trades1 true false true 4 0 0 240
trades2 true false true 4 0 0 240