prorm API Reference
    Preparing search index...

    Class DruidStore

    DruidStore wraps Druid's HTTP query + indexing API behind the NoSqlStore lifecycle: SQL and native queries for reads, task submission for ingestion.

    Implements

    Index
    name: "druid" = 'druid'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "fetch" = 'fetch'

    The client library being used

    • Run a Druid SQL query via POST /druid/v2/sql. Optional positional params are sent as Druid SQL parameters ({ value } objects). Druid returns an array of row objects, which is returned as-is.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • sql: string
      • Optionalparams: unknown[]

      Returns Promise<T[]>

    • Run a native (JSON) Druid query via POST /druid/v2. Returns the parsed response body (shape depends on the native query type).

      Type Parameters

      • T = unknown

      Parameters

      • spec: Record<string, unknown>

      Returns Promise<T>

    • Ingest rows into datasource target by submitting an inline index_parallel task to POST /druid/indexer/v1/task. Returns the task submission response (typically { task: '<id>' }).

      Parameters

      • target: string
      • rows: Record<string, unknown>[]

      Returns Promise<any>

    • Submit an arbitrary task spec to POST /druid/indexer/v1/task.

      Parameters

      • spec: Record<string, unknown>

      Returns Promise<any>