This Snap routes binary documents to different output views based on a boolean expression.
A binary document consists of the binary content and a header that contains metadata for that content. For example, a file containing JSON data might have a header with a 'content-type' field set to 'application/json'. This Snap then allows you to separate a single stream of binary documents into multiple streams based on their header data. For example, when unzipping an archive with the ZipFile Read Snap, any files with a "content-type" of "application/json" could be sent to a JSON Parser and "text/xml" files could be sent to an XML Parser. The set of header fields available depends on the Snap that outputs the binary document. You can click on the preview icon for a binary view to see the content and headers that are being generated for each binary document. The following fields are often available:
Name | Example | Description |
---|
content-type | application/json | The MIME type for the binary content. If not available from the original source, this value will be derived from the file name. |
content-length | 1234 | The length of the binary content. |
content-location | sldb:///test.json | The URL for the original source of the binary stream. |
last-modified | 2014-07-17T17:12:03.000 UTC | The date that the binary was last modified. |