jgradl99 / DataStreamingExample

Beginner example of datastreaming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DataStreamingExample

This project is a simple example to show the power of Apache Spark on a small scale using Java. The goal is to continuously run SQL requests on an incoming datastream. In this example, the incoming stream is described with a single csv file consisting of 1000 lines filled with 'id', 'first_name' and 'last_name'. But it does support more and larger files as long as the file follows the set scheme.

Install

Example

The data folder includes the incoming datasteam. In this example its described with 'ExampleData.csv'. After setting the scheme of our stream to fit the needs of the data, we can now finally run SQL requests on the input. An example could be 'select * from viewData where id < 7'. Running this will give us all names with ids under 7 as seen in the table below.

id first_name last_name
1 Lorne Faso
2 Katharina Damarra
3 Vita Pettiford
4 Moyna Goddard
5 Dotty Pillsbury
6 Zia Yorick

Furthermore you can now add more csv files with a fitting scheme while running the programm or include different sql request on the incoming datastream.

About

Beginner example of datastreaming

License:MIT License


Languages

Language:Java 100.0%