Apache Druid Real-Time Analytics in VS Code
Overview
Section titled “Overview”Apache Druid is a high-performance, real-time analytics database built for fast slice-and-dice queries on large datasets. Key characteristics include:
- Sub-second queries at scale: Optimized for interactive analytics over trillions of rows
- Real-time and batch ingestion: Stream from Kafka or Kinesis alongside batch loads from S3, HDFS, or local files
- Columnar storage with time partitioning: Segment-based storage with bitmap indexes and automatic time-based partitioning
- SQL query interface: Apache Calcite based SQL over an HTTP API
- Elastic, fault-tolerant architecture: Independently scalable ingestion, querying, and storage tiers
Druid is ideal for clickstream and event analytics, application performance monitoring, operational dashboards, and other high-concurrency analytical workloads.
Connecting
Section titled “Connecting”To connect to Apache Druid in DBCode:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- Complete connection form: Select Apache Druid as the database type and enter:
- Host and port of the Druid Router (default: 8888). Connecting directly to a Broker (8082) also works.
- Username and password (if the basic-security extension is enabled)
- Connect: Click save to connect to your Druid cluster.
- Start Exploring: Browse schemas and datasources, inspect columns, and run analytical queries.
For detailed instructions on connecting to databases, refer to the Connect article.
Apache Druid Features in DBCode
Section titled “Apache Druid Features in DBCode”DBCode enhances your Apache Druid experience with:
- Schema browsing: Navigate Druid’s real schemas -
druid(your datasources),sys(system tables for segments, servers, and tasks), andlookup- with column types and per-datasource row and size statistics - SQL query editor: Write and execute Druid SQL with syntax highlighting over the SQL HTTP API
- Schema inspection: View a datasource’s column layout as a reference CREATE TABLE definition
- Data exploration: Preview and export query results
- Query cancellation and row limits: Long-running queries can be cancelled, and the editor row limit is applied efficiently server-side
Druid datasources are populated by ingestion rather than DDL, so connections are read-only for data: there is no insert, update, or delete.
By using Apache Druid with DBCode, you can efficiently explore and query your real-time analytics data directly within Visual Studio Code.
For more information about Apache Druid, visit druid.apache.org.