Adding a JSON Source

<< Click to Display Table of Contents >>

Navigation:  Using StreamLab > StreamLab Sources Overview >

Adding a JSON Source

Previous pageReturn to chapter overviewNext page

StreamLab lets you access files in JSON (JavaScript Object Notation) format over the file system, network socket, AMQP, or Kafka.

To add a JSON source:

1.On the Sources page, drag a JSON source from the left column into the center area.
2.Click the new JSON source.

The Edit JSON Source page opens.

3.Select a schema from the pulldown menu on the left.


4.Select a stream from the pulldown menu on the right. This is the stream into which lines from the JSON source will be read.
5.Select File System, Socket, AMQP 0.9.1, AMQP 1.0, or Kafka.
6.Next, enter configuration information for the connection. These change depending on your choice of access. See Configuring Line, CSV, XML, and JSON Sources. For example, for file system, enter the following:

Directory. The file system path to the JSON file, such as /var/log/file.JSON

File Pattern. Java Regular Expression used to identify the file. Test the source by clicking the Sample 5 Rows from Source button.

7.Test the source by clicking the Sample 5 Rows from Source button.
8.Click the Go Up arrow to exit the Edit Source page.


9.To parse the newly added source, add a guide using the newly added Line source.