Create a Restaurant Analysis Dashboard Using the Designer
Create an interactive Restaurant Analysis Dashboard in BDB, connecting visualizations to parameterized queries and dynamic filters.
Purpose
This guide walks you through the process of creating an interactive Restaurant Analysis Dashboard using the BDB Data Center and Dashboard Designer plugins. It demonstrates how to build datasets with parameterized SQL queries, create a reusable Data Sheet, and link visual components dynamically to filters and radio buttons.
Business Context
Restaurant managers and analysts often need to compare performance metrics such as order types, payment modes, and sales across time periods (month, quarter, year). This workflow shows how to achieve this using the BDB Platform’s integrated tools — combining ClickHouse datasets, data sheets, and dynamic dashboards for end-to-end business analysis.
Key Highlights
Goal
Build a Restaurant Analysis Dashboard integrating datasets, filters, and data sheets.
Data Source
ClickHouse Database
Primary Components
Radio Buttons, Combo Box, Pie Chart, Bar Chart, Data Sheet
Key Feature
Parameterized dataset queries using placeholders @date1@ and @input@
Dynamic Interactivity
All charts update automatically based on selected month, quarter, or year.
Workflow Overview
1
Data Center
Create a ClickHouse connector and parameterized datasets.
2
Data Center
Create and publish a Data Sheet for dashboard integration.
3
Dashboard Designer
Design the layout with interactive charts, filters, and data sheets.
4
Dashboard Designer
Map datasets to components, apply connection conditions, and test dynamic filtering.
Step 1 – Create a ClickHouse Data Connector
From the App Menu, select Data Center.
Click Create (+) → Choose ClickHouse as the connector type.
Provide the following details:
FieldDescriptionConnector Name
e.g.,
Restaurant_ClickHouse_ConnectorUsername / Password
As provided by your database administrator
Host / IP Address
Enter the ClickHouse server address
Port
Default: 8123
Database Name
Your target schema (e.g.,
restaurant_analytics)SSL Type
Non-SSL
Click Save to complete setup.

Step 2 – Create Parameterized Datasets
Parameterized datasets allow users to dynamically filter dashboards based on input parameters such as Month, Quarter, or Year.
2.1 Dataset 1: Order Count Channel
Query:
SELECT
Order_Type,
COUNT(Order_Id) AS Order_Count
FROM Order_Sales_Data
WHERE
(@date1@ = 'month' AND upper(monthName(parseDateTimeBestEffort(Order_Date))) = upper(substring(@input@, 6)))
OR
(@date1@ = 'quarter' AND toQuarter(parseDateTimeBestEffort(Order_Date)) =
CASE upper(substring(@input@, 6))
WHEN 'JANUARY' THEN 1 WHEN 'FEBRUARY' THEN 1 WHEN 'MARCH' THEN 1
WHEN 'APRIL' THEN 2 WHEN 'MAY' THEN 2 WHEN 'JUNE' THEN 2
WHEN 'JULY' THEN 3 WHEN 'AUGUST' THEN 3 WHEN 'SEPTEMBER' THEN 3
WHEN 'OCTOBER' THEN 4 WHEN 'NOVEMBER' THEN 4 WHEN 'DECEMBER' THEN 4
END)
OR
(@date1@ = 'year' AND toYear(parseDateTimeBestEffort(Order_Date)) = toInt32OrZero(substring(@input@, 1, 4)))
GROUP BY Order_Type;Steps:
Click the three-dot menu next to the connector → Create Dataset.
Enter the name Order Count Channel.
Paste the query above.
Validate using sample parameter values (
@date1@='month',@input@='2024-March').Click Save.

2.2 Dataset 2: Payment Mode
Query:
SELECT
Payment_Mode,
COUNT(Order_Id) AS Order_Count
FROM Order_Sales_Data
WHERE
(@date1@ = 'month' AND upper(monthName(parseDateTimeBestEffort(Order_Date))) = upper(substring(@input@, 6)))
OR
(@date1@ = 'quarter' AND toQuarter(parseDateTimeBestEffort(Order_Date)) =
CASE upper(substring(@input@, 6))
WHEN 'JANUARY' THEN 1 WHEN 'FEBRUARY' THEN 1 WHEN 'MARCH' THEN 1
WHEN 'APRIL' THEN 2 WHEN 'MAY' THEN 2 WHEN 'JUNE' THEN 2
WHEN 'JULY' THEN 3 WHEN 'AUGUST' THEN 3 WHEN 'SEPTEMBER' THEN 3
WHEN 'OCTOBER' THEN 4 WHEN 'NOVEMBER' THEN 4 WHEN 'DECEMBER' THEN 4
END)
OR
(@date1@ = 'year' AND toYear(parseDateTimeBestEffort(Order_Date)) = toInt32OrZero(substring(@input@, 1, 4)))
GROUP BY Payment_Mode
ORDER BY Order_Count DESC;Steps:
Name the dataset Payment_Mode.
Validate and Save.
2.3 Dataset 3: Date Filter
Query:
SELECT
CASE
WHEN @input@ = 'month' AND Order_Date IS NOT NULL THEN
concat(toString(toYear(parseDateTimeBestEffort(Order_Date))), '-', monthName(parseDateTimeBestEffort(Order_Date)))
WHEN @input@ = 'quarter' AND Order_Date IS NOT NULL THEN
concat(toString(toYear(parseDateTimeBestEffort(Order_Date))), '-', toString(toQuarter(parseDateTimeBestEffort(Order_Date))))
WHEN @input@ = 'year' AND Order_Date IS NOT NULL THEN
toString(toYear(parseDateTimeBestEffort(Order_Date)))
END AS datestring
FROM Order_Sales_Data
WHERE Order_Date IS NOT NULL;Steps:
Name the dataset Date_Filter.
Validate by passing a parameter (
@input@='month').Save once results are validated.
Step 3 – Create and Publish a Data Sheet
Data Sheets act as reusable, interactive tables that can be integrated directly into dashboards.
Steps:
In the Data Center, select Data Sheet → Create.
Enter a name, e.g.,
Restaurant_Data_Sheet.Add columns:
Order ID
Order Type
Payment Mode
Order Date
Total Amount
Customer Name
Click Save.
Navigate to the Data Sheet list.
Select a Data Sheeet and open the Options context menu.
Click Publish → Choose user roles to share with.
Confirm and Save.
Step 4 – Design the Dashboard (Dashboard Designer Plugin)
Navigate to the Dashboard Designer Plugin (Either from the left navigation panel or the Apps Menu).
Click New Dashboard.
Name it Restaurant Analysis Dashboard.
Click Save.
4.1 Customize Dashboard Appearance
Open Properties → General → Set Width, Height.
To change the background:
Go to Style → Gradient → Select Color Code.
Click Apply → Save.
Step 5 – Add Header Components
5.1 Add Box Component
Drag a Box from the Components Library.
Set size under Properties → General.
Change header background via Style → Gradient.
5.2 Add Label Component
Add a Label inside the Box.
Update text to Restaurant Analysis Dashboard.
Adjust:
Font → Bold, 24 pt
Alignment → Center
Background → Transparent
Step 6 – Add Filter Components
6.1 Add Radio Button (Month, Quarter, Year)
Drag a Radio Button onto the dashboard.
Under Properties → Data Source, add Labels & Values:
Label: Month → Value: month
Label: Quarter → Value: quarter
Label: Year → Value: year
Adjust:
Selection Color → Accent tone
Font Weight → Bold
Font Size → 14
6.2 Add Combo Box
Drag and drop a Combo Box next to the radio buttons.
Resize to match the layout.
Map it later to the Date_Filter dataset.
Step 7 – Add Visualizations
Pie Chart
Order Count by Channel
Order Count Channel Dataset
Bar Chart
Payment Mode Distribution
Payment Mode Dataset
Data Sheet
Interactive order records
Published Data Sheet
7.1 Pie Chart
Drag a Pie Chart component.
Under Properties → General, configure size and title (e.g., Order Count by Channel).
Set Background Gradient for design consistency.
7.2 Bar Chart
Drag a Bar Chart component.
Configure size and title (e.g., Payment Mode Comparison).
Enable Legend for clarity.
7.3 Data Sheet
Drag and drop a Data Sheet component.
Connect it to the Restaurant_Data_Sheet created earlier.
Adjust:
Header Color
Row and Alternate Row Colors
Font Weight and Size
Step 8 – Connect Datasets and Apply Conditions
Click the Connector Icon (Plug) in the toolbar.
Create connections for:
Order Count ChannelPayment ModeDate Filter
For each chart, map the correct dataset fields to the Category and Series.
8.1 Add Filter Conditions
To ensure dynamic filtering:
Go to each dataset connection.
Under Condition, link the following components:
Radio Button
Combo Box (Date Filter)
This setup ensures that when users select “Month,” “Quarter,” or “Year,” all charts update automatically.
Step 9 – Add Scripts
Filter Box Script
sdk.autoReload();Automatically reloads datasets when the Combo Box input changes.
Radio Button Script
sdk.reload(['C_3']);Forces the linked charts to reload when a different time period is selected.
Step 10 – Preview and Validate
Click Preview in the Dashboard Designer.
Select Month, Quarter, or Year using the Radio Button.
Choose a specific date from the Combo Box.
Verify that:
Pie and Bar charts update dynamically.
The datasheet reflects filtered results.
Step 11 – Edit and Update Data Sheet
Navigate to the Home Page → Data Sheets.
Open the previously created Data Sheet.
Click the + (Add Row) button.
Enter new data and click Save.
Return to the dashboard and click Preview — changes appear instantly.
Outcome
Best Practices
Use consistent naming conventions for datasets and connections.
Keep SQL queries optimized — avoid redundant subqueries.
Validate each dataset with sample parameters before saving.
Always link filter components via Connection Conditions to ensure dynamic updates.
Apply uniform font and color schemes for a professional UI.
Business Impact
This workflow enables restaurant owners and analysts to:
View multi-level performance trends (monthly, quarterly, yearly).
Analyze order channels and payment modes in real-time.
Manage and visualize data sheets for record-level insights.
Make data-driven operational decisions efficiently.