Build a Real-Time Feedback Analysis Dashboard Using API Ingestion and WebSocket
Purpose
This guide walks you through creating a Feedback Analysis Dashboard using the BDB Platform, integrating real-time data ingestion and live dashboard updates through the Data Pipeline, Data Center, and Dashboard Designer plugins.
The workflow demonstrates how user feedback entered on a dashboard (via a form) is captured, stored in a database, and reflected in real-time using API Ingestion → DB Writer → WebSocket components.
Business Context
Employee feedback collection is a key HR process that benefits from automation and real-time data visibility. This workflow empowers HR and business users to:
Select employees from a dropdown.
Submit text feedback directly from the dashboard.
Instantly view updated feedback data on a grid—without refreshing the dashboard.
This capability showcases how API Ingestion and WebSocket Producer work together in the BDB Platform to achieve bidirectional, real-time data flow.
Core Flow Overview
1. Data Pipeline
Ingest data using API Ingestion → Store it using DB Writer → Broadcast it in real-time using WebSocket Producer.
2. Data Center
Configure ClickHouse connection and datasets to populate employee names and feedback data.
3. Dashboard Designer
Build a Feedback Form dashboard using Combo Box, Text Box, Label, and Data Grid components with live updates.
Architecture Summary
Dashboard (UI) → API Ingestion → Kafka Event → DB Writer → Kafka Event → WebSocket Producer → Dashboard GridKey Features
Step 1 – Create the Data Pipeline
1.1 Navigate to the Data Pipeline Plugin
From the BDB Homepage, click the Apps Menu → select Data Pipeline.
Click Create New Pipeline.
Enter a Pipeline Name (e.g.,
Feedback_Analysis_Pipeline).Choose a suitable Resource Allocation (Medium recommended).
Click Save to create the pipeline.

1.2 Add API Ingestion Component
Click the + icon on the toolbar to open the Components Palette.
Search for API Ingestion and drag it onto the workspace.
Configure as follows:
Invocation Type: Real-time
Ingestion Type: API Ingestion
Click Save to store settings.
Click Update Pipeline → The system generates a Component Instance ID URL for ingestion.
This will serve as the POST API endpoint for feedback submission.
1.3 Add DB Writer Component
From the Components Palette, search DB Writer and drag it into the workspace.
Configure under:
Invocation Type: Batch
Driver: ClickHouse
Save Mode: Append
Host, Port, Username, Password, Database, Table: (As per your ClickHouse configuration)
Validate configuration → click Save.
Add a Kafka Event before the DB Writer component for message handling.
1.4 Add WebSocket Producer Component
From the Components Palette, search WebSocket Producer → drag to canvas.
Configure:
Invocation Type: Real-time
Meta Information: GUID auto-generated
Click Save.
Connect the DB Writer output → Kafka Event → WebSocket Producer.
Pipeline Flow:
API Ingestion → Kafka Event → DB Writer → Kafka Event → WebSocket Producer

1.5 Finalize and Activate
Click Update Pipeline to save all components.
Then click Activate Pipeline to start real-time listening.
Copy the API Ingestion URL and WebSocket GUID for later use in the Dashboard Designer.
Step 2 – Configure Data Connector & Datasets (Data Center Plugin)
2.1 Create ClickHouse Connector
Go to Apps Menu → Data Center Plugin.
Click Create Connector → choose ClickHouse.
Provide:
Connector Name:
ClickHouse_Feedback_ConnectorHostname/IP: As provided by DevOps
Username / Password
Port: 8123 (default)
Database Name: e.g.,
bdb_hiring
Click Save to complete.

2.2 Create Datasets
Dataset 1: Filter Employee
SELECT 'All' AS name
UNION ALL
SELECT DISTINCT name FROM Hiring_data_W4;Purpose: Populate Combo Box with employee names.
Validate → Save → Publish.
Dataset 2: Data Grid Details
SELECT gender, team, skills, name, Feedback, monthly_salary
FROM Hiring_data_W4
WHERE name = @name@ OR 'All' = @name@;Purpose: Populate Data Grid with feedback data.
Validate → Save → Publish.

Step 3 – Build Feedback Dashboard (Dashboard Designer Plugin)
3.1 Create Dashboard
Open Dashboard Designer from the Apps Menu.
Click New Dashboard.
Save with a descriptive name (e.g.,
Feedback_Analysis_Dashboard).
3.2 Add Core Components
Label
Title/Header
Text: Feedback Analysis Dashboard Font: 24pt, Bold, Centered
Combo Box
Select Employee
Dataset: Filter Employee
Context: name
Label (Submit)
Acts as Submit Button
Background: Blue, Text: White, Alignment: Center
Text Box
Feedback Input
User enters feedback text
Label (Mandatory Note)
Reminder Text
Message: “Feedback is mandatory”
Data Grid
Display Existing Feedback
Dataset: Data Grid Details
Export (Optional)
Data Export
Allows HR to download feedback data
3.3 Map Datasets to Components
Combo Box: →
Filter EmployeeData Grid: →
Data Grid Details
3.4 Add Data Connections
Open Data Connection Tab (right panel).
Click Add Data Service → Select
ClickHouse_Feedback_Connector.Link Datasets (
Filter Employee,Data Grid Details).Save connection settings.
3.5 Add Filtering Script
Filter Combo Box Script:
sdk.setContext('name', changedItem.attributes.Value);
sdk.reload(['C_2']); // Reload Data Grid on employee changeData Grid Context Script:
var selected = changedItem;
var rowData = selected.attributes.data[0];
sdk.setContext('gender', rowData.gender);
sdk.setContext('monthly_salary', rowData.monthly_salary);
sdk.setContext('skills', rowData.skills);
sdk.setContext('team', rowData.team);3.6 Add Submit Button Script
Open Submit Label → Properties → Script, then paste:
debugger;
// Get values
var name = sdk.getContext('filter2');
var text = sdk.getWidget('text7').m_textBoxText;
// Get contextual info
var gender = sdk.getContext('gender');
var monthly_salary = sdk.getContext('monthly_salary');
var skills = sdk.getContext('skills');
var team = sdk.getContext('team');
// Log to console
console.log("Submitting Feedback:", { name, text, gender, monthly_salary, skills, team });
// Validate input
if (name && text && text.trim() !== "") {
var payload = {
name: name,
Feedback: text,
gender: gender || '',
monthly_salary: monthly_salary || '',
skills: skills || '',
team: team || ''
};
var settings = {
url: "https://v10.bdb.ai/ingestion/dataIngestion", // API Ingestion URL
method: "POST",
headers: {
ingestionId: "be4ad4fd-fcbf-4bc8-9038-2aaa2b0cb2cc", // Replace with actual ID
ingestionSecret: "fRWvqUHSVFaBcSx2SWe09WcU5lawQOgzqsE0aGEnoOCbibCdD6ea1Q013khFQssA",
"Content-Type": "application/json"
},
data: JSON.stringify(payload)
};
$.ajax(settings).done(function(response) {
console.log("✅ Feedback submitted:", response);
alert("Feedback submitted for: " + name);
setTimeout(() => sdk.reload(['datagrid9']), 2000);
}).fail(function(jqXHR, textStatus, errorThrown) {
console.error("❌ Failed to send data:", errorThrown);
alert("Failed to send data. Check console for details.");
});
} else {
alert("⚠️ Please enter feedback before submitting.");
}3.7 Configure Real-Time WebSocket Data
Create a WebSocket Data Connector in the dashboard.
Configure it using GUID, Ingestion ID, and Ingestion Secret generated from your pipeline.
Link this connector to the Data Grid to automatically refresh feedback when new data arrives.
Step 4 – Test and Validate
4.1 Test Workflow
Click Preview in the Dashboard Designer.

Select an Employee Name from the Combo Box.
Type feedback in the Text Box.
Click Submit.
Observe:
A confirmation popup (“Feedback submitted”).
The Data Grid refreshes automatically with the new feedback.
4.2 Verify Data Flow
Open the Data Pipeline → Event Preview to confirm record ingestion.
Verify database table updates in ClickHouse.
Observe WebSocket real-time update on dashboard grid.
Outcome
Best Practices
Keep your pipeline activated during feedback sessions.
Use parameterized queries (
@name@) in datasets for dynamic filtering.Ensure valid credentials for ClickHouse connections.
Handle empty input validations in Submit Button script.
Apply color coding for Submit Button and alignment rules for consistent UI.
Business Impact
This workflow enables:
Real-time HR feedback collection and monitoring.
Automated database updates with no manual intervention.
Live feedback visualization improving transparency and decision-making.