- To get started with this example, first download the project with all the additional files
- Install the necessary docker containers. Go to working directory and run
docker-compose up -d
command - Go to Cassandra container bash.
docker exec -it cassandra-container-name-or-id bash
- Go to the CQL shell.
cqlsh
- Create keyspace and use it.
CREATE KEYSPACE bike WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}; use bike;
- Create table
CREATE TABLE trip(
ride_id text primary key,
started_time timestamp,
ended_time timestamp,
start_lat double,
start_ing double,
end_lat double,
end_ing double,
member_casual text);
- Run ProducerKafka. Make sure the .csv file was downloaded.
- Run StreamHandler.
- Check the table.
SELECT * FROM trip;