Real-time Twitter Dashboard using Cloudera Data Platform
Table of Contents
- Overview
- Design
- Implementation
- Prerequisites
- Step #1 - Cloudera Data Flow
- Step #2 - Cloudera Data Warehouse (CDW)
- Step #3 - Cloudera Data Visualization
- Notes are available in NiFi Flow to help you understand the use of each processor.
- All NiFi Flow parameters can be updated while the flow is running, from Deployment Manager. As soon as you Apply Changes, running processors that are affected by the Parameter changes will automatically be restarted.
Step #2 - Cloudera Data Warehouse (CDW)
Go to CDW user interface. Ensure CDW service is activated in your CDP environment, and a Database Catalog & a Virtual Warehouse compute cluster are available for use.
In Hue editor, manually load ISO Language Codes into a table. Default settings in the importer wizard will work fine. If you're not sure how to upload data in Hue, visit Hue Importer -- Select a file, choose a dialect, create a table.
In Hue editor, execute twitter-queries.sql. This will create the necessary tables and views, required to support the visuals in the Twitter Dashboard. Please change AWS S3 location to where you've staged the tweets data.
After the query execution is successful, you will be able to validate tables using queries below.
SELECT * FROM twtr.iso_language_codes a;
SELECT * FROM twtr.tweets b;
SELECT * FROM twtr.twtr_view c;
SELECT * FROM twtr.tweets_by_minute d;
Step #3 - Cloudera Data Visualization
Go to CDW user interface, select Cloudera Data Visualization and add a new Data VIZ.
In Cloudera Data Visualization user interface, create a new connection. You must be logged in as admin to create a new connection.
Now that you have a connection to Hive virtual warehouse, let's create two datasets required to support the visuals.
Create first dataset:
- Dataset Title - Twitter View
- Dataset Source - From Table
- Select Database - twtr
- Select Table - twtr_view
Create second dataset:
- Dataset Title - Tweets By Minute
- Dataset Source - From Table
- Select Database - twtr
- Select Table - tweets_by_minute
It's now time to Import Visual Artifacts. Take a quick look at Importing a dashboard if you're doing it for the first time.
Choose dataviz-twitter-dashboard.json in the import dialog.
Once you get the following screen, click ACCEPT AND IMPORT.
Twitter Dashboard should be successfully imported at this point. To see it, go to VISUALS from the top menu and select Twitter Dashboard.
Congratulations on creating your real-time Twitter Dashboard using Cloudera Data Platform!!! To learn more about its implementation, please register here to watch the recording.

