Using the META() function
You can use the META()
function to query the metadata
map of the WAEvent type, which is used by the output streams of several Striim readers. For example, the following creates a stream containing invalid records:
CREATE STREAM ExceptionStream of ExceptionRecord; CREATE CQ CQExceptionRecord INSERT INTO ExceptionStream SELECT data[0] FROM CsvStream WHERE META(CsvStream, ‘RecordStatus’).toString() == ‘INVALID_RECORD’;
The elements of the metadata map vary depending on the reader and parser used.
reader | metadata elements |
---|---|
Database Reader |
|
File Reader |
|
GG Trail Reader | |
HDFS Reader |
|
HP NonStop readers | |
HTTP Reader |
|
JMS Reader | no metadata returned |
Kafka Reader |
|
MS SQL Reader / MSJet | |
MariaDB Reader / MySQL Reader | |
MultiFile Reader |
|
Oracle Reader / OJet | |
PostgreSQL Reader |
The following parsers append metadata elements to those of the associated reader:
parser | metadata elements |
---|---|
DSV Parser |
|
FreeForm Text Parser |
|
Netflow Parser (version 5) |
|
Netflow Parser (version 9) |
|
SNMP Parser |
|
XML Parser |
|