npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-questdb

v0.5.3

Published

Node-RED nodes for QuestDB time-series database

Readme

node-red-contrib-questdb

Node-RED nodes for writing data to QuestDB time-series database using the Influx Line Protocol (ILP).

Features

  • High-performance writes using QuestDB's native ILP protocol
  • Connection pooling with automatic reconnection
  • Multiple protocols: HTTP, HTTPS, TCP, TCPS
  • Authentication: Basic auth and Bearer token support
  • TLS/SSL: Full TLS support with certificate verification options
  • Flexible data mapping: Map message fields to QuestDB columns
  • Type support: Symbols, floats, integers, longs, booleans, strings, timestamps, arrays, and decimals
  • Auto-flush: Configurable automatic flushing by row count or time interval
  • Examples included: Ready-to-use flow examples

Installation

Via Node-RED Palette Manager

  1. Open Node-RED
  2. Go to Menu > Manage palette > Install
  3. Search for node-red-contrib-questdb
  4. Click Install

Via npm

cd ~/.node-red
npm install node-red-contrib-questdb

Then restart Node-RED.

Nodes

QuestDB Write

Writes data to QuestDB using the ILP protocol.

Configuration

Connection Settings:

  • Protocol: HTTP (default), HTTPS, TCP, or TCPS
  • Host: QuestDB server hostname or IP
  • Port: 9000 (HTTP) or 9009 (TCP)

Security Settings:

  • Enable Auth: Toggle authentication
  • Auth Type: Username/Password or Bearer Token
  • TLS Verify: Verify server certificate (for HTTPS/TCPS)

Advanced Settings:

  • Auto Flush: Enable automatic flushing
  • Flush Rows: Number of rows before auto-flush (default: 75000)
  • Flush Interval: Time interval for auto-flush in ms (default: 1000)
  • Request Timeout: HTTP request timeout in ms
  • Buffer Size: Initial and maximum buffer sizes

Input Message Format

msg.topic = "table_name";
msg.payload = {
    symbols: {
        tag_name: "sensor1",      // Indexed string columns
        location: "warehouse"
    },
    columns: {
        temperature: 23.5,        // Auto-detected as float
        humidity: 65,             // Auto-detected as float
        status: "active",         // String column
        alert: true               // Boolean column
    },
    timestamp: Date.now()         // Optional: milliseconds or Date object
};

Explicit Type Specification

For precise control over column types:

msg.payload = {
    symbols: { device: "sensor1" },
    columns: {
        value: { value: 123456789, type: "long" },
        price: { value: "123.456789", type: "decimal" },
        readings: { value: [1.1, 2.2, 3.3], type: "array", elementType: "double" }
    },
    timestamp: Date.now()
};

Supported Types:

  • int / integer - 32-bit signed integer
  • long - 64-bit signed integer
  • float - 32-bit floating point
  • double - 64-bit floating point
  • decimal - Arbitrary precision decimal
  • string - Text value
  • boolean - true/false
  • timestamp - Date/time value
  • array - Array with auto-detected element type
  • array_double - Array of doubles
  • array_long - Array of longs
  • array_string - Array of strings

QuestDB Mapper

Maps incoming message fields to QuestDB ILP structure. Useful for transforming data from various sources.

Configuration

  • Table Name: Target table (or use msg.topic)
  • Timestamp Field: Path to timestamp field in message
  • Symbol Mappings: Map source fields to QuestDB symbols
  • Column Mappings: Map source fields to columns with type conversion

Example

Input message:

{
    topic: "sensors",
    payload: {
        device: "sensor1",
        temp: 23.5,
        readings: [1.1, 2.2, 3.3],
        ts: 1699999999000
    }
}

With mappings:

  • Symbol: payload.devicedevice_id
  • Column: payload.temptemperature (double)
  • Column: payload.readingsvalues (array_double)
  • Timestamp: payload.ts

Output:

{
    topic: "sensors",
    payload: {
        symbols: { device_id: "sensor1" },
        columns: {
            temperature: { value: 23.5, type: "double" },
            values: { value: [1.1, 2.2, 3.3], type: "array", elementType: "double" }
        },
        timestamp: 1699999999000
    }
}

Examples

The package includes ready-to-use examples. After installation:

  1. Open Node-RED
  2. Go to Menu > Import
  3. Select Examples > node-red-contrib-questdb

Available Examples

  1. Basic Write - Simple sensor data write
  2. Batch Write - Writing arrays of measurements
  3. Using Mapper - Transform MQTT data for QuestDB
  4. Direct Value Write - Simple numeric writes
  5. Multiple Tables - Writing to different tables
  6. With Timestamp - Custom timestamp handling
  7. Continuous Data - Generating continuous metrics

QuestDB Setup

Using Docker

docker run -p 9000:9000 -p 9009:9009 questdb/questdb

Connection String Format

The node uses QuestDB's connection string format internally:

http::addr=localhost:9000;auto_flush_rows=75000;auto_flush_interval=1000;

Compatibility

  • Node-RED: >= 2.0.0
  • Node.js: >= 14.0.0
  • QuestDB: >= 6.0 (recommended: latest)

Troubleshooting

Connection Issues

  1. Verify QuestDB is running: curl http://localhost:9000
  2. Check firewall settings for ports 9000/9009
  3. For HTTPS/TCPS, ensure certificates are properly configured

Data Not Appearing

  1. Check the node status indicator (green = connected)
  2. Verify table creation in QuestDB console
  3. Enable debug output to see write confirmations

Performance Tips

  1. Use symbols for frequently queried columns (they're indexed)
  2. Batch writes when possible using arrays
  3. Adjust auto-flush settings based on your write patterns

License

MIT

Author

Holger Amort

Links