Implementation:Apache Druid Ingestion Spec Completions
| Knowledge Sources | |
|---|---|
| Domains | Web_Console, Ingestion |
| Last Updated | 2026-02-10 10:00 GMT |
Overview
Defines comprehensive JSON autocompletion rules for ingestion task and supervisor spec editing in the Druid web console.
Description
INGESTION_SPEC_COMPLETIONS is a large constant array of JsonCompletionRule objects (912 lines) that provides context-aware autocompletion for the full ingestion specification JSON editor. It covers both batch ingestion tasks (index_parallel, index, index_hadoop) and streaming supervisors (kafka, kinesis, rabbit, autocompact). The rules span the complete ingestion spec hierarchy: root-level type and spec, dataSchema (timestampSpec, dimensionsSpec, metricsSpec, granularitySpec, transformSpec), ioConfig (inputSource, inputFormat), and tuningConfig (partitionsSpec). A helper function isSupervisorType is used to conditionally show supervisor-only properties such as suspended.
Usage
This module is consumed by the load data view, which passes the completions array to a JsonInput component when users are authoring or editing ingestion spec JSON directly.
Code Reference
Source Location
- Repository: Apache Druid
- File: web-console/src/views/load-data-view/ingestion-spec-completions.ts
- Lines: 1-912
Signature
export const INGESTION_SPEC_COMPLETIONS: JsonCompletionRule[]
Import
import { INGESTION_SPEC_COMPLETIONS } from './ingestion-spec-completions';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | N/A | N/A | This is a constant data definition with no runtime inputs |
Outputs
| Name | Type | Description |
|---|---|---|
| INGESTION_SPEC_COMPLETIONS | JsonCompletionRule[] |
Array of completion rules covering the full ingestion spec hierarchy: root type/spec, dataSchema (dataSource, timestampSpec, dimensionsSpec, metricsSpec, granularitySpec, transformSpec), ioConfig (inputSource types like local, http, inline, s3, gcs, azure, hdfs; inputFormat types like csv, tsv, json, parquet, orc, avro_stream), tuningConfig (partitionsSpec types: dynamic, hashed, range), and conditional properties for supervisor types (kafka, kinesis, rabbit) |
Usage Examples
Using in the load data JSON editor
import { INGESTION_SPEC_COMPLETIONS } from './ingestion-spec-completions';
<JsonInput
value={ingestionSpec}
onChange={setIngestionSpec}
setError={setJsonError}
jsonCompletions={INGESTION_SPEC_COMPLETIONS}
/>