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

doris-cubejs-driver

v0.1.9

Published

Cube.js Doris database driver

Readme

Cube.js Doris Database Driver

Apache Doris driver for Cube.js.

Support

This driver has been tested with Apache Doris 2.0+ and is compatible with its MySQL protocol interface.

Features

  • Full support for Doris SQL syntax and data types
  • Optimized time-based operations using Doris's native datetime functions
  • Support for pre-aggregations with table name length validation
  • Proper handling of NULL values in sorting operations
  • Native support for BOOLEAN type
  • Timezone conversion support

Installation

First install the package:

npm install --save doris-cubejs-driver
# or
yarn add doris-cubejs-driver

Configuration

You can configure the driver by providing a set of connection options:

const { DorisDriver } = require('doris-cubejs-driver');

module.exports = {
  driverFactory: () => new DorisDriver({
    host: process.env.CUBEJS_DB_HOST,
    port: process.env.CUBEJS_DB_PORT,
    user: process.env.CUBEJS_DB_USER,
    password: process.env.CUBEJS_DB_PASS,
    database: process.env.CUBEJS_DB_NAME,
    // Optional: SSL configuration
    ssl: process.env.CUBEJS_DB_SSL ? { rejectUnauthorized: false } : undefined,
  })
};

Docker Support

This driver is available as a custom Cube.js Docker image that includes the Doris driver pre-installed and configured.

Using the Docker Image

The repository includes a docker-compose.yml that sets up a complete environment with:

  • Custom Cube.js image with Doris driver pre-installed
  • Apache Doris FE (Frontend) node
  • Apache Doris BE (Backend) node
  • Persistent volumes for data storage

To use it:

# Build and start the environment
docker-compose up -d --build

# View logs
docker-compose logs -f

# Stop the environment
docker-compose down -v  # Add -v to remove volumes

Building Your Own Image

The included Dockerfile builds a custom Cube.js image with the Doris driver pre-installed. You can use this as a base for your own custom images:

FROM cubejs/cube:latest

# Install the Doris driver
RUN npm install doris-cubejs-driver

Or build from scratch using the provided Dockerfile:

# Build the image
docker build -t my-cubejs-doris .

# Run the container
docker run -p 4000:4000 -p 3000:3000 \
  -e CUBEJS_DEV_MODE=true \
  -e CUBEJS_DB_HOST=doris-host \
  -e CUBEJS_DB_PORT=9030 \
  -e CUBEJS_DB_NAME=test \
  -e CUBEJS_DB_USER=root \
  -e CUBEJS_DB_PASS= \
  -e CUBEJS_API_SECRET=secret \
  my-cubejs-doris

Environment Variables

| Environment Variable | Description | Default Value | |--------------------|---------------------------------------------------------------------------------------|---------------| | CUBEJS_DB_HOST | The host URL where your Doris database is running. | localhost | | CUBEJS_DB_PORT | The port number to use for the connection. | 9030 | | CUBEJS_DB_NAME | The name of the database to connect to. | null | | CUBEJS_DB_USER | The username used to connect to the database. | null | | CUBEJS_DB_PASS | The password used to connect to the database. | null | | CUBEJS_DB_SSL | Whether to use SSL for the connection. | null |

Type Mapping

The driver maps Cube.js types to Doris types as follows:

| Cube.js Type | Doris Type | Notes | |--------------|----------------|------------------------------------------| | string | VARCHAR(255) | Default string type | | text | STRING | For longer text content | | decimal | DECIMAL(38,10) | High precision decimal type | | integer | INT | Standard integer type | | smallint | SMALLINT | Small integer type | | bigint | BIGINT | Large integer type | | tinyint | TINYINT | Tiny integer type | | boolean | BOOLEAN | Native boolean support | | timestamp | DATETIME | For date and time values | | binary | STRING | Binary data stored as string |

Limitations

These limitations are inherent to Doris or specific to this driver implementation:

  1. Table Name Length

    • Table names are limited to 64 characters
    • This affects pre-aggregation table names
    • Use 'sqlAlias' in cube definitions for long names
  2. Data Types

    • BLOB data types are not supported (automatically mapped to STRING)
    • INTERVAL type is not supported
    • Binary data must be stored as STRING
  3. SQL Features

    • ILIKE expressions are not supported
    • Use standard LIKE for pattern matching
  4. Time Functions

    • All time operations use DATETIME type
    • Timezone conversions are handled through CONVERT_TZ

Development

To run tests:

# Run all tests
yarn test

# Run unit tests only
yarn unit

# Run integration tests only
yarn integration

Build and Publishing

This package includes a script to automate the build and publishing process:

# Build and publish the package
yarn release

# Build only (no publishing)
yarn release:build

# Publish only (no build)
yarn release:publish

You can also specify version increments that will be based on the latest published version:

# Increment patch version (0.1.4 -> 0.1.5)
yarn release:patch

# Increment minor version (0.1.4 -> 0.2.0)
yarn release:minor

# Increment major version (0.1.4 -> 1.0.0)
yarn release:major

The script automatically:

  • Compares the local version with the latest published version
  • Uses the latest version as the base for incrementation
  • Handles version synchronization between local and remote
  • Ensures you're authenticated with npm before publishing

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create new Pull Request

License

Apache-2.0