Warning! This page documents an old version of Kapacitor, which is no longer actively developed. Kapacitor v1.2 is the most recent stable version of Kapacitor.

A node that handles creating several child BatchNodes. Each call to query creates a child batch node that can further be configured. See BatchNode The batch variable in batch tasks is an instance of a SourceBatchNode.


     var errors = batch
                      .query('SELECT value from errors')
     var views = batch
                      .query('SELECT value from views')

Chaining Methods

Chaining methods create a new node in the pipeline as a child of the calling node. They do not modify the calling node.


The query to execute. Must not contain a time condition in the WHERE clause or contain a GROUP BY clause. The time conditions are added dynamically according to the period, offset and schedule. The GROUP BY clause is added dynamically according to the dimensions passed to the groupBy method.

node.query(q string)

Returns: BatchNode