Superset是否支持实时仪表盘?如何配置Druid数据源滚动窗口仪表盘?
Hey there! Let's tackle your two questions about Superset and real-time dashboards with Druid:
1. Does Superset support real-time dashboards?
Absolutely! Superset fully supports real-time dashboards, especially when paired with a real-time-optimized data source like Druid. Since Druid is built for low-latency, streaming analytics, it pairs perfectly with Superset's ability to refresh charts and dashboards on a schedule. As long as your underlying data source is serving fresh data, Superset can display it in near real-time.
2. How to set up a rolling window (refresh every minute, show last 30 minutes of data) for Druid-based charts?
As a new Superset user, this setup is straightforward once you know the steps. Here's how to do it:
- Configure your Druid datasource correctly: First, make sure your Druid table has a timestamp column that Superset can recognize. When connecting Druid to Superset, navigate to the "Edit Datasource" page, go to the "Time" tab, and set your timestamp column as the official "Time Column" for the datasource. This is critical for time-based filtering and rolling windows.
- Add a rolling time filter to your chart: When building any chart (line, bar, table, etc.), head to the "Filters" section. Add a filter for your timestamp column, then select the Relative Time option. Set the range to "Last 30 minutes" — this ensures the chart only pulls data from the most recent 30-minute window.
- Enable auto-refresh for charts/dashboard:
- For individual charts: While editing a chart, look for the Refresh Interval setting (usually in the "Advanced" configuration section). Set this to 60 seconds (1 minute) so the chart refreshes automatically every minute.
- For the entire dashboard: Once your dashboard is assembled, click the gear icon (dashboard settings) in the top-right corner. Find the Auto-refresh option and set it to 60 seconds. This will refresh all charts in the dashboard at the same interval, keeping everything in sync.
- Validate your setup: Save your chart and dashboard, then give it a test. Wait a minute to confirm the data updates, and double-check that only the last 30 minutes of data is displayed. If you need to tweak the window size or refresh rate, you can easily adjust these settings later.
A quick note: Druid's ingestion latency will impact how fresh your data is. Make sure your Druid ingestion pipeline (like Kafka-based streaming ingestion) is configured with small batch intervals to get data into Druid as quickly as possible — this ensures your Superset charts show the latest data when they refresh.
内容的提问来源于stack exchange,提问作者im2kul

