Chapter 14. Exports

Exports are anything that leaves the system for the purpose of importing into another one. Exports of a nonstreaming nature would typically be handled by existing batch processes. Batch processes are configured centrally. If a streaming visualization interface has been created to allow client-side customization of what an analyst can see and what it means, there’s an opportunity to use more perspectives with more evolutionary iterations than any centrally developed processes can provide. This chapter focuses on leveraging those varying perspectives enabled by making the streaming data interactive in a client.

When JSON is being exported from JavaScript, it needs to be converted into a string, as demonstrated in Example 14-1. This is required because ways of sending the information are friendly with strings but not objects (for example, URLs or API POST parameters). Many libraries will do this for you, but it’s important to note—if it’s not done, you could end up with output saying something like “[Object]” and nothing else.

Example 14-1. Convert a JSON object to a string
// assuming objConfig is the JSON object you want to convert
var strConfig = JSON.stringify(objConfig);

// the reverse process, when required
var objConfig=JSON.parse(strConfig);

Configurations

When every analyst can set their own configuration in a way that drastically ...

Get Visualizing Streaming Data now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.